:root {
  --bg-root: #061634;
  --bg-shell: #0b2045;
  --bg-shell-deep: #0a1c3e;
  --card: #142d5b;
  --card-soft: #12305f;
  --line: rgba(132, 170, 227, 0.34);
  --text-main: #f4f8ff;
  --text-muted: #bfd0f2;
  --brand-orange: #f3a73c;
  --green: #58ba78;
  --red: #c98594;
  --chip-blue: #2f68b1;
  --chip-green: #4aa468;
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #020916;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

body {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(1200px 760px at 90% -20%, rgba(33, 72, 138, 0.32), rgba(33, 72, 138, 0) 64%),
    radial-gradient(1100px 740px at -10% 120%, rgba(11, 37, 78, 0.44), rgba(11, 37, 78, 0) 58%),
    linear-gradient(180deg, #020916 0%, #01040d 100%);
  padding: 0;
}

#app {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0) + 8px) 10px calc(env(safe-area-inset-bottom, 0) + 6px);
  overflow: hidden;
}

.worker-shell {
  width: min(100%, 430px);
  height: 100%;
  min-height: 0;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(94, 137, 207, 0.52);
  background: linear-gradient(180deg, var(--bg-shell) 0%, var(--bg-shell-deep) 100%);
  box-shadow:
    0 24px 42px rgba(1, 7, 22, 0.72),
    0 0 0 1px rgba(5, 18, 43, 0.9);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  will-change: transform, opacity;
}

.worker-top {
  padding: 22px 16px 14px;
  border-bottom: 1px solid rgba(126, 167, 229, 0.26);
  background: linear-gradient(180deg, rgba(7, 31, 69, 0.95), rgba(8, 24, 56, 0.88));
}

.top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.top-side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-button {
  border: 0;
  background: transparent;
  margin: 0;
  padding: 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1;
  color: #f7fbff;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.brand-button span {
  color: var(--brand-orange);
}

.top-badge {
  border-radius: 999px;
  min-height: 26px;
  padding: 4px 10px;
  background: rgba(56, 185, 101, 0.9);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 130px;
  text-align: center;
  white-space: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-caption {
  margin: 8px 0 0;
  font-size: 13px;
  color: #b9cbef;
}

.shift-status {
  border-radius: 999px;
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.shift-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.shift-open {
  color: #ccffe0;
  border-color: rgba(94, 217, 144, 0.44);
  background: rgba(50, 146, 90, 0.25);
}

.shift-open .shift-dot {
  background: #4fd57f;
  box-shadow: 0 0 8px rgba(79, 213, 127, 0.65);
}

.shift-closed {
  color: #ffd7d7;
  border-color: rgba(228, 118, 118, 0.45);
  background: rgba(136, 54, 54, 0.25);
}

.shift-closed .shift-dot {
  background: #e26d6d;
  box-shadow: 0 0 8px rgba(226, 109, 109, 0.55);
}

.worker-main {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.worker-main-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0));
}

.worker-main-home {
  height: 100%;
}

.home-top-stack {
  display: grid;
  gap: 12px;
}

.worker-main-home .activity-card {
  margin-top: auto;
}

@media (max-width: 390px) {
  .brand-button {
    font-size: 30px;
  }

  .card h2,
  .card h3 {
    font-size: 19px;
  }

  .task-name {
    font-size: 20px;
  }

  .detail-card p.task-name {
    font-size: 20px;
  }
}

/* ── Bottom-sheet (delete confirm) ─────────────────────── */

.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 12, 28, 0.62);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 9999;
  animation: sheet-fade-in 160ms ease;
}

.sheet-card {
  width: 100%;
  max-width: 520px;
  background: #16315e;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45);
  animation: sheet-slide-up 200ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.sheet-grip {
  width: 42px;
  height: 4px;
  border-radius: 4px;
  background: rgba(180, 200, 235, 0.4);
  margin: 0 auto 14px;
}

.sheet-title {
  font: 700 18px/1.25 Montserrat, "Segoe UI", sans-serif;
  color: #f4f8ff;
  margin: 0 0 6px;
}

.sheet-desc {
  font: 500 14px/1.4 Montserrat, "Segoe UI", sans-serif;
  color: #bfd0f2;
  margin: 0 0 18px;
  word-break: break-word;
}

.sheet-actions {
  display: flex;
  gap: 10px;
}

.sheet-btn {
  flex: 1;
  border: 0;
  border-radius: 14px;
  padding: 14px 12px;
  font: 700 15px/1 Montserrat, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: transform 80ms ease, opacity 120ms ease;
}

.sheet-btn:active {
  transform: scale(0.97);
  opacity: 0.92;
}

.sheet-btn-cancel {
  background: linear-gradient(180deg, #243d6a, #1a2e54);
  color: #e9eefc;
  border: 1px solid rgba(180, 200, 235, 0.22);
}

.sheet-btn-delete {
  background: linear-gradient(180deg, #c25360, #8c2f3c);
  color: #fff5f5;
}

.sheet-btn-primary {
  background: linear-gradient(180deg, #3d7fd4, #2752a8);
  color: #f4f8ff;
}

.sheet-btn-primary[disabled] {
  background: linear-gradient(180deg, #3a4666, #2a3654);
  color: rgba(244, 248, 255, 0.45);
  cursor: not-allowed;
}

/* ── Mode selection sheet (выбор режима смены) ─────────── */

.mode-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
  max-height: 50vh;
  overflow-y: auto;
}

.mode-pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(180, 200, 235, 0.18);
  background: linear-gradient(180deg, #1f3563, #182a4f);
  color: #e9eefc;
  font: 600 15px/1.2 Montserrat, "Segoe UI", sans-serif;
  cursor: pointer;
  text-align: left;
  transition: border-color 120ms ease, background 120ms ease;
}

.mode-pick-row:active {
  transform: scale(0.99);
}

.mode-pick-row.is-selected {
  border-color: #f5a524;
  background: linear-gradient(180deg, #4a3a16, #3a2c0e);
  box-shadow: 0 0 0 1px rgba(245, 165, 36, 0.35) inset;
}

.mode-pick-row.is-selected .mode-pick-name {
  color: #ffd676;
}

.mode-pick-row.is-selected .mode-pick-time {
  color: #ffd676;
}

.mode-pick-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(180, 200, 235, 0.45);
  flex-shrink: 0;
  position: relative;
}

.mode-pick-radio.is-selected {
  border-color: #f5a524;
}

.mode-pick-radio.is-selected::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #f5a524;
}

.mode-pick-name {
  flex: 1 1 auto;
  font-weight: 700;
}

.mode-pick-time {
  font-size: 13px;
  color: #bfd0f2;
  font-weight: 500;
}

.mode-pick-hint {
  font-size: 11px;
  color: #6b7a92;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@keyframes sheet-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes sheet-slide-up {
  from { transform: translateY(40px); opacity: 0.6; }
  to   { transform: translateY(0); opacity: 1; }
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(21, 48, 93, 0.94), rgba(17, 39, 79, 0.92));
  padding: 12px;
}

.card h2,
.card h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}

.card p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.45;
}

.hero-card {
  background: linear-gradient(180deg, rgba(25, 58, 110, 0.92), rgba(19, 44, 87, 0.92));
}

.home-actions {
  display: grid;
  gap: 10px;
}

.activity-card {
  display: grid;
  gap: 8px;
}

.activity-head {
  display: block;
}

.activity-head h3 {
  margin: 0;
  font-size: 18px;
}

.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.activity-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.activity-text {
  color: #e4eeff;
  font-size: 14px;
}

.activity-empty {
  color: #a5badc;
  font-size: 14px;
}

.action-btn {
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  min-height: 46px;
  padding: 0 12px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

.action-btn:active {
  transform: translateY(1px);
}

.action-btn-open {
  color: #f2fff7;
  background: linear-gradient(180deg, #4da06b, #3f8458);
  border-color: rgba(118, 203, 149, 0.55);
}

.action-btn-close {
  color: #1d2530;
  background: linear-gradient(180deg, #e8b150, #cf9436);
  border-color: rgba(255, 210, 127, 0.58);
}

.action-btn-tasks {
  color: #e9f2ff;
  background: linear-gradient(180deg, #3a72b6, #2b5690);
  border-color: rgba(125, 171, 236, 0.52);
}

.action-btn-salary {
  color: #e9f2ff;
  background: linear-gradient(180deg, #4f6794, #3d5278);
  border-color: rgba(149, 176, 223, 0.46);
}

.scanner-card {
  padding: 10px;
}

.video-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(149, 183, 236, 0.46);
  background: #040c1d;
  min-height: 340px;
}

.qr-video {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}

.scan-line {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 14%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 171, 75, 0), rgba(255, 171, 75, 0.95), rgba(255, 171, 75, 0));
  box-shadow: 0 0 14px rgba(255, 171, 75, 0.85);
  animation: scanMove 2.4s ease-in-out infinite;
}

.scanner-status {
  margin: 10px 2px 2px;
  color: #d6e4ff;
  font-size: 14px;
}

.message-card {
  border-color: rgba(136, 185, 247, 0.42);
}

.message-success {
  background: linear-gradient(180deg, rgba(33, 74, 128, 0.92), rgba(23, 61, 109, 0.94));
}

.message-error {
  background: linear-gradient(180deg, rgba(96, 42, 62, 0.9), rgba(74, 31, 48, 0.92));
}

.message-warning {
  background: linear-gradient(180deg, rgba(127, 83, 29, 0.95), rgba(97, 59, 18, 0.94));
}

.task-greeting {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(132, 176, 241, 0.42);
  background: linear-gradient(180deg, rgba(28, 62, 114, 0.96), rgba(20, 49, 95, 0.95));
  box-shadow: 0 8px 22px rgba(6, 20, 49, 0.28);
}

.task-greeting-title {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 800;
  color: #ffffff;
}

.task-greeting-text {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: #dce9ff;
}

@keyframes scanMove {
  0% {
    top: 12%;
    opacity: 0.55;
  }

  50% {
    top: 84%;
    opacity: 1;
  }

  100% {
    top: 12%;
    opacity: 0.55;
  }
}
.task-list {
  display: grid;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.task-swipe-zone {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  margin-top: 2px;
}

#task-list-track {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  will-change: transform, opacity;
}

.task-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  border: 0;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 12px;
  color: #294168;
  background: #cfdae9;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.tab-btn.is-active {
  color: #ffffff;
  background: #35a35b;
}

.task-card {
  border: 1px solid rgba(131, 170, 231, 0.36);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(22, 50, 96, 0.94), rgba(18, 42, 83, 0.94));
  padding: 12px;
  display: grid;
  gap: 5px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  color: #f3f8ff;
}

.task-meta {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  border-bottom: 1px dashed rgba(120, 156, 214, 0.42);
  padding-bottom: 5px;
}

.task-meta span {
  color: #95b5e5;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.task-meta strong {
  color: #f2f8ff;
  font-weight: 800;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.2px;
}

.task-op-label {
  margin: 0;
  color: #f4be65;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.task-name {
  margin: 0;
  padding: 7px 10px;
  border-left: 3px solid #f3a73c;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 39, 78, 0.92), rgba(12, 30, 61, 0.92));
  font-size: 23px;
  line-height: 1.22;
  color: #f6fbff;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(2, 10, 28, 0.45);
}

.task-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.task-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0a2458;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
}

.task-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

/* Верхняя строка карточки: бригада слева, № СЗ справа. Всегда присутствует
   (№ СЗ есть на любой карточке) → высота карточек одинаковая. */
.task-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 17px;
}

.task-brigade-line {
  margin: 0;
  color: #f4be65;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* № СЗ — спокойный, как дата: не яркий, тот же размер. Прижат в правый угол. */
.task-card-sz {
  margin-left: auto;
  color: #8ba6cf;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.task-foot-when {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.task-card-date {
  color: #b6cbef;
  font-size: 14px;
  font-weight: 600;
}

/* Время рядом с датой — мельче и тусклее, чтобы не резало глаз. */
.task-card-time {
  color: #7e97bd;
  font-size: 12px;
  font-weight: 500;
}

.task-state-done {
  background: rgba(120, 156, 214, 0.22);
  color: #cdddf6;
}

.task-state-paused {
  background: #a86a20;
  color: #fff3e0;
}

.task-state-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
}

.task-state-available {
  background: rgba(84, 177, 114, 0.26);
  color: #d7ffe5;
}

.task-state-work {
  background: rgba(88, 136, 194, 0.24);
  color: #cce0ff;
}

.task-data-grid {
  margin-top: 1px;
  display: grid;
  gap: 3px;
}

.task-data-row {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #b6cbef;
}

.task-data-row span {
  color: #a9c2e8;
}

.task-data-row strong {
  color: #f0f6ff;
  font-weight: 700;
  text-align: right;
}

.task-result-tag {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
}

.chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
}

.chip-urgent {
  background: rgba(243, 167, 60, 0.24);
  color: #ffd594;
}

.chip-comment {
  background: rgba(65, 128, 204, 0.25);
  color: #bcdcff;
}

.chip-result-default {
  background: rgba(88, 136, 194, 0.24);
  color: #cce0ff;
}

.chip-result-done {
  background: rgba(84, 177, 114, 0.26);
  color: #d7ffe5;
}

.chip-result-partial {
  background: rgba(215, 180, 79, 0.28);
  color: #fff0be;
}

.chip-result-overfulfilled {
  background: rgba(33, 145, 166, 0.28);
  color: #c8f4ff;
}

.chip-result-not-done {
  background: rgba(202, 98, 98, 0.28);
  color: #ffd8d8;
}

/* «остаток» — нейтральный слейт-серый (нормальный перенос, не проблема). */
.chip-result-remainder {
  background: rgba(110, 123, 136, 0.34);
  color: #e7eef5;
}

.task-qty {
  font-size: 16px;
  font-weight: 700;
  color: #f2f7ff;
}

.task-status {
  margin: 0;
  color: #9ec2ff;
  font-size: 13px;
}

.empty-card p {
  margin: 0;
}
.detail-card {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.detail-meta {
  margin: 0;
  color: #9fbae7;
  font-size: 15px;
}

.detail-card p.task-op-label {
  margin: 0;
  color: #f4be65;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.detail-card p.task-name {
  margin: 0;
  padding: 9px 10px;
  border-left: 3px solid #f3a73c;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 39, 78, 0.92), rgba(12, 30, 61, 0.92));
  font-size: 23px;
  line-height: 1.22;
  color: #f6fbff;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(2, 10, 28, 0.45);
}

.detail-grid {
  display: grid;
  gap: 3px;
  margin-top: 1px;
}

.detail-row {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.detail-row span {
  color: #b4c9ed;
}

.detail-row strong {
  color: #f2f8ff;
  font-weight: 700;
  text-align: right;
}

/* Комментарий (менеджера/исполнителя) — отдельный блок-заметка: отделён от
   строк-данных выше, подпись мелкая приглушённая, текст слева на всю ширину
   и помельче (влезает больше). Сдержанно, без вычурности. */
.detail-comment-row {
  display: block;
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(16, 39, 78, 0.55);
  border: 1px solid rgba(120, 156, 214, 0.22);
}

.detail-comment-row > span {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #95b5e5;
}

.detail-comment-row > strong {
  display: block;
  text-align: left;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.35;
  color: #dce8fb;
}

.detail-result-tag {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 13px;
}

.detail-main-btn,
.detail-back-btn {
  border: 0;
  border-radius: var(--radius-md);
  min-height: 46px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.task-brigade-chip {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #0b1a36;
  background: linear-gradient(180deg, #ffd67e, #f3b844);
  letter-spacing: 0.02em;
}

.detail-main-btn {
  color: #f2fff7;
  background: linear-gradient(180deg, #4da06b, #3f8458);
}

.detail-main-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: linear-gradient(180deg, #4a5a6e, #3b475a);
}

.detail-main-btn-ok {
  background: linear-gradient(180deg, #3f8458, #2f6644) !important;
  opacity: 1 !important;
}

.brigade-roster-block {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(118, 165, 226, 0.34);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 38, 75, 0.86), rgba(13, 31, 63, 0.9));
}

.brigade-roster-block h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #bcd1f5;
  font-weight: 600;
}

.brigade-roster-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.brigade-roster-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(11, 25, 51, 0.6);
  border: 1px solid rgba(118, 165, 226, 0.18);
  font-size: 14px;
  color: #e6edfb;
}

.brigade-roster-item.brigade-roster-lead {
  background: rgba(37, 68, 115, 0.6);
  border-color: rgba(255, 199, 71, 0.42);
}

.brigade-roster-item.brigade-roster-ready {
  border-color: rgba(100, 180, 120, 0.52);
}

.brigade-roster-status {
  color: #a8c1ec;
  font-size: 12px;
  font-weight: 600;
  text-transform: lowercase;
}

.brigade-roster-item.brigade-roster-ready .brigade-roster-status {
  color: #8fe3a5;
}

.brigade-roster-item.brigade-roster-lead .brigade-roster-status {
  color: #ffd67e;
}

.brigade-roster-summary {
  margin: 8px 0 0;
  font-size: 13px;
  color: #bcd1f5;
}

.brigade-roster-summary-ok {
  color: #8fe3a5;
}

.brigade-roster-empty {
  margin: 0;
  font-size: 13px;
  color: #a8c1ec;
}

.brigade-observer-block {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(46, 180, 110, 0.18), rgba(34, 130, 80, 0.12));
  border: 1px solid rgba(143, 227, 165, 0.35);
  text-align: center;
}

.brigade-observer-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #9eefb3;
}

.brigade-observer-note {
  margin: 6px 0 0;
  font-size: 13px;
  color: #bcd9c6;
}

.detail-complete-block {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(118, 165, 226, 0.34);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 38, 75, 0.86), rgba(13, 31, 63, 0.9));
  padding: 10px;
  min-width: 0;
}

.detail-complete-block h3 {
  margin: 2px 2px 0;
  font-size: 15px;
  color: #bcd1f5;
  font-weight: 600;
}

.detail-pause-flag {
  margin: 0;
  border: 1px solid rgba(236, 188, 96, 0.54);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(120, 82, 31, 0.48), rgba(94, 62, 20, 0.5));
  color: #ffe7b9;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  padding: 7px 9px;
}

.detail-complete-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.detail-complete-col {
  display: grid;
  gap: 8px;
}

.detail-complete-btn {
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  min-height: 42px;
  width: 100%;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10px;
  box-shadow: 0 2px 8px rgba(3, 13, 34, 0.26);
}

.detail-complete-done {
  color: #f1fff8;
  background: linear-gradient(180deg, #4aa569, #3a8454);
  border-color: rgba(132, 216, 162, 0.34);
}

.detail-complete-partial {
  color: #33250c;
  background: linear-gradient(180deg, #e9be66, #d3a44d);
  border-color: rgba(245, 214, 137, 0.32);
}

.detail-complete-not-done {
  color: #fff3f3;
  background: linear-gradient(180deg, #c76f7d, #ac5663);
  border-color: rgba(227, 151, 170, 0.35);
}

.detail-side-btn {
  color: #ebf4ff;
  background: linear-gradient(180deg, #4a7ebd, #3b6da9);
  border-color: rgba(150, 195, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(219, 235, 255, 0.25), 0 0 0 1px rgba(78, 133, 208, 0.34), 0 4px 12px rgba(4, 17, 45, 0.3);
}

/* «Брак» заблокирован на производственном СЗ (есть № ПЗ) — серый, неактивный. */
.pz-brak-blocked,
.pz-finish-blocked {
  color: #93a4bd;
  background: linear-gradient(180deg, #45566e, #38465c);
  border-color: rgba(120, 140, 170, 0.4);
  cursor: not-allowed;
  box-shadow: none;
}

/* Строка «по составу ПЗ выполнено: X из плана» в блоке/форме завершения СЗ. */
.detail-pz-count {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: #9fb6da;
}
.detail-pz-count strong { color: #e6eefb; font-weight: 700; }

.detail-side-btn.is-pause-active {
  color: #fff7de;
  background: linear-gradient(180deg, #d49a3e, #b67624);
  border-color: rgba(248, 208, 136, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 239, 205, 0.35), 0 0 0 1px rgba(216, 153, 68, 0.4), 0 0 14px rgba(213, 152, 66, 0.34);
}

.detail-complete-btn-locked {
  filter: saturate(0.42) brightness(0.9);
  opacity: 0.85;
  pointer-events: none;
  cursor: not-allowed;
}

.detail-complete-btn-locked:active {
  transform: none;
}

.detail-inline-form {
  border: 1px solid rgba(118, 165, 226, 0.38);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(17, 42, 82, 0.9), rgba(14, 34, 67, 0.92));
  padding: 10px;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.detail-inline-form h4 {
  margin: 0;
  color: #f2f8ff;
  font-size: 16px;
}

.detail-inline-form p {
  margin: 0;
  color: #9fc0ef;
  font-size: 13px;
}

.detail-inline-form label {
  display: grid;
  gap: 5px;
  color: #c5d8f7;
  font-size: 13px;
}

.detail-inline-input,
.detail-inline-textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(124, 171, 236, 0.42);
  border-radius: 10px;
  background: rgba(9, 27, 56, 0.84);
  color: #f2f8ff;
  font-family: inherit;
  font-size: 16px;
  padding: 8px 10px;
}

.detail-inline-textarea {
  resize: vertical;
  min-height: 56px;
}

.detail-inline-error {
  margin: 0;
  color: #ffd6d6;
  font-size: 13px;
}

/* min-height:0 — пустая строка «Осталось» (до ввода факта) не создаёт зазор. */
.detail-inline-remainder {
  margin: 0;
  color: #9fe0c4;
  font-size: 13px;
  font-weight: 700;
  min-height: 0;
}

.detail-inline-remainder:empty {
  display: none;
}

.finish-type-group {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(124, 171, 236, 0.42);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 0;
}

.finish-type-group legend {
  color: #c5d8f7;
  font-size: 12px;
  padding: 0 4px;
}

/* Карточный вид: radio слева сверху, название и пояснение в столбик. Специфичнее
   `.detail-inline-form label { display:grid }` (0,2,0 > 0,1,1) — иначе ломается flex.
   align-items:flex-start + padding — удобная зона нажатия пальцем. */
.finish-type-group .finish-type-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 3px 2px;
  color: #f2f8ff;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
}

.finish-type-group .finish-type-option input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 1px 0 0 0;
  flex: 0 0 auto;
}

.finish-type-text {
  display: grid;
  gap: 1px;
}

.finish-type-text small {
  color: #9fc0ef;
  font-size: 12px;
}

.detail-inline-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.detail-inline-actions-stack {
  grid-template-columns: minmax(0, 1fr);
}

.detail-inline-btn {
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 38px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.detail-inline-submit {
  color: #f1fff8;
  background: linear-gradient(180deg, #4aa569, #3a8454);
  border-color: rgba(132, 216, 162, 0.34);
}

.detail-inline-cancel {
  color: #d8e8ff;
  background: linear-gradient(180deg, #355c8f, #2b4a76);
  border-color: rgba(126, 172, 236, 0.38);
}

.pause-reason-grid {
  display: grid;
  gap: 6px;
}

.pause-reason-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.pause-reason-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8fb4e8;
  padding-left: 2px;
}

.pause-reason-btn {
  border: 1px solid rgba(126, 172, 236, 0.38);
  border-radius: 10px;
  min-height: 38px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(35, 68, 116, 0.88), rgba(30, 57, 99, 0.9));
  color: #d8e8ff;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.pause-reason-btn.is-selected {
  border-color: rgba(133, 217, 164, 0.5);
  background: linear-gradient(180deg, rgba(63, 132, 88, 0.95), rgba(50, 112, 74, 0.95));
  color: #f1fff8;
}

.pause-active-summary {
  border: 1px solid rgba(118, 165, 226, 0.34);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 38, 75, 0.86), rgba(13, 31, 63, 0.9));
  padding: 9px;
  display: grid;
  gap: 5px;
}

.pause-active-summary p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #b5cdf0;
  font-size: 13px;
}

.pause-active-summary strong {
  color: #f2f8ff;
  font-size: 14px;
}

.detail-events-section {
  display: grid;
  gap: 6px;
  padding: 2px 2px 0;
  min-width: 0;
}

.detail-events-section h3 {
  margin: 0;
  font-size: 15px;
  color: #c8ddff;
}

.detail-events-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.detail-events-list li {
  border: 1px solid rgba(118, 165, 226, 0.3);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(15, 34, 68, 0.82), rgba(12, 28, 56, 0.86));
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.detail-events-pause-active {
  border-color: rgba(238, 191, 101, 0.62);
  background: linear-gradient(180deg, rgba(108, 74, 24, 0.62), rgba(79, 53, 17, 0.66));
  box-shadow: inset 0 0 0 1px rgba(247, 214, 149, 0.22);
}

.detail-events-pause-active strong {
  color: #fff0cd;
}

.detail-events-empty {
  justify-content: flex-start;
  color: #a8bfe4;
  font-size: 13px;
}

.detail-events-list strong {
  display: block;
  color: #f1f7ff;
  font-size: 14px;
}

.detail-events-list p {
  margin: 2px 0 0;
  color: #b5cdf0;
  font-size: 12px;
}

.detail-events-list span {
  color: #8eafdf;
  font-size: 12px;
}

.worker-toast {
  margin: 8px 14px 0;
  border: 1px solid rgba(230, 184, 99, 0.6);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(125, 84, 30, 0.54), rgba(96, 64, 24, 0.58));
  color: #ffe9be;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  padding: 8px 10px;
}

/* Тон «успех» — позитивное подтверждение (напр. «Уведомление мастеру отправлено»).
   Зелёная палитра, чтобы отличаться от оранжевого warning-тона. */
.worker-toast-success {
  border-color: rgba(88, 186, 120, 0.6);
  background: linear-gradient(180deg, rgba(34, 92, 56, 0.62), rgba(24, 70, 42, 0.66));
  color: #d9f5e3;
}

.detail-report-block {
  border: 1px solid rgba(118, 165, 226, 0.34);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 38, 75, 0.86), rgba(13, 31, 63, 0.9));
  padding: 10px;
  display: grid;
  gap: 8px;
}

.detail-report-block h3 {
  margin: 0;
  font-size: 15px;
  color: #c8ddff;
}

.detail-report-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.detail-report-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.detail-report-list strong {
  display: block;
  color: #f1f7ff;
  font-size: 14px;
}

.detail-report-list p {
  margin: 2px 0 0;
  color: #b5cdf0;
  font-size: 12px;
}

.detail-report-list span {
  color: #8eafdf;
  font-size: 12px;
}

.detail-back-btn {
  color: #d7e6ff;
  background: linear-gradient(180deg, #2d528a, #234273);
  border: 1px solid rgba(124, 171, 236, 0.42);
  box-shadow: 0 2px 10px rgba(2, 9, 25, 0.28);
}

/* ── Экран «Состав ПЗ» (позиции производственного заказа) ──── */

.pz-comp-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 8px;
  background: linear-gradient(180deg, #0b1f3f, #0a1a34);
}
.pz-comp-back {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: rgba(124, 171, 236, 0.16);
  color: #d7e6ff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.pz-comp-head-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.pz-comp-op {
  font-size: 18px;
  font-weight: 800;
  color: #eaf2ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pz-comp-chip {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #06210f;
  background: linear-gradient(180deg, #57d98a, #34b86a);
}

/* Тело экрана: фиксированный верх + отдельный скролл списка.
   worker-shell = flex column; header (flex-shrink:0) → body (flex:1) заполняет
   остаток, внутри: top (фикс) + scroll (auto). Список листается сам по себе,
   над шапку не вылезает (он в своём overflow-контейнере). */
.pz-comp-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 14px 0;
  gap: 10px;
}

/* Верх (счётчики+поиск+табы) — ФИКСИРОВАН, не скроллится. В единой рамке. */
.pz-comp-top {
  flex-shrink: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(118, 165, 226, 0.3);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 35, 68, 0.5), rgba(11, 27, 56, 0.55));
}

/* Разделитель «Список заданий» между шапкой и списком (иконка + линии по бокам). */
.pz-comp-listhead {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
}
.pz-comp-listhead::before,
.pz-comp-listhead::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(120, 160, 220, 0.28);
}
.pz-comp-listhead-lbl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8aa6d2;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Единственный скроллируемый блок — список. */
.pz-comp-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0));
}

.pz-comp-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 12px;
  margin: 0;
  border: 1px solid rgba(118, 165, 226, 0.28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 38, 75, 0.86), rgba(13, 31, 63, 0.9));
}
.pz-comp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.pz-comp-stat-l {
  font-size: 12px;
  color: #8eafdf;
  font-weight: 500;
  line-height: 1.15;
  min-height: 1.4em;
  display: flex;
  align-items: center;
  text-align: center;
  white-space: nowrap;
}
.pz-comp-stat-v {
  font-size: 20px;
  font-weight: 800;
  color: #eaf2ff;
}
.pz-comp-stat-v.is-av { color: #4fd07a; }
.pz-comp-stat-v.is-dn { color: #4fd07a; }
.pz-comp-stat-v.is-rm { color: #f3b24a; }
.pz-comp-stat-v.is-df { color: #eaf2ff; }
.pz-comp-stat-v.is-defect  { color: #5aa6f0; }
.pz-comp-stat-v.is-notdone { color: #e58a96; }

/* 6 счётчиков (План/Доступно/Брак/Не вып/Готово/Осталось) — компактнее, в одну строку. */
.pz-comp-stats-5 {
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 10px 8px;
}
.pz-comp-stats-5 .pz-comp-stat-l { font-size: 10.5px; }
.pz-comp-stats-5 .pz-comp-stat-v { font-size: 17px; }

/* Строка поиска: суженное поле + кнопка «Скан QR» справа. */
.pz-comp-searchrow {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.pz-comp-search {
  position: relative;
  margin: 0;
  flex: 1;
  min-width: 0;
}

/* Кнопка «Скан QR» — синий акцент (НЕ зелёный, как табы); нажатие — ярче. */
.pz-comp-scan {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  min-height: 50px;
  border-radius: 12px;
  border: 1px solid rgba(124, 171, 236, 0.5);
  background: linear-gradient(180deg, #2a4f86, #21406d);
  color: #e7f0ff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.pz-comp-scan:active {
  background: linear-gradient(180deg, #3d7fd4, #2f63ac);
  border-color: rgba(150, 192, 247, 0.7);
}
/* Помощник без права фиксации: скан погашен, карточки только для просмотра. */
.pz-comp-scan-locked {
  opacity: 0.45;
  cursor: default;
  background: linear-gradient(180deg, #243a5e, #1d3050);
  border-color: rgba(124, 171, 236, 0.3);
}
.pz-comp-card-readonly {
  opacity: 0.78;
  cursor: default;
}
.pz-comp-fixlock {
  margin: 2px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(243, 167, 60, 0.4);
  background: rgba(243, 167, 60, 0.12);
  color: #f6d8a6;
  font-size: 13px;
  line-height: 1.35;
}
.pz-comp-search input {
  width: 100%;
  box-sizing: border-box;
  min-height: 50px;
  padding: 0 46px 0 16px;
  border: 1px solid rgba(118, 165, 226, 0.34);
  border-radius: 12px;
  background: rgba(11, 28, 56, 0.7);
  color: #eaf2ff;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
.pz-comp-search input::placeholder { color: #6f8cb8; }
.pz-comp-search-ico {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.pz-comp-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}
/* Раскладка вкладок состава ПЗ: ВЕРХ — 2 пошире (Брак/Готово), НИЗ — 3 (Все/Ожидают/В работе). */
.pz-comp-tabs-top {
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}
.pz-comp-tabs-bot {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.pz-comp-tabs-top .pz-comp-tab,
.pz-comp-tabs-bot .pz-comp-tab {
  min-height: 40px;
  font-size: 13px;
  padding: 5px 4px;
  line-height: 1.1;
  white-space: nowrap;
}
.pz-comp-tab {
  min-height: 46px;
  border: 1px solid rgba(124, 171, 236, 0.34);
  border-radius: 12px;
  background: rgba(18, 44, 86, 0.55);
  color: #cfe0ff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pz-comp-tab.is-active {
  color: #06210f;
  background: linear-gradient(180deg, #57d98a, #34b86a);
  border-color: transparent;
}

.pz-comp-list {
  display: grid;
  gap: 10px;
}
.pz-comp-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(118, 165, 226, 0.26);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 38, 75, 0.7), rgba(12, 29, 58, 0.78));
}
.pz-comp-card-main {
  flex: 1;
  min-width: 0;
}
.pz-comp-card-label {
  margin: 0 0 6px;
  font-size: 14px;
  color: #8eafdf;
  font-weight: 500;
}
.pz-comp-card-label b {
  color: #eaf2ff;
  font-weight: 800;
}
.pz-comp-card-name {
  margin: 0;
  font-size: 15px;
  color: #cfe0ff;
  line-height: 1.35;
}
.pz-comp-card-side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.pz-comp-ringwrap {
  position: relative;
  display: inline-flex;
  width: 54px;
  height: 54px;
}
.pz-comp-ring {
  width: 54px;
  height: 54px;
  transform: rotate(-90deg);
}
.pz-comp-ring-bg {
  fill: none;
  stroke: #243c5e;
  stroke-width: 5;
}
.pz-comp-ring-fg {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}
.pz-comp-ring-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #eaf2ff;
}
.pz-comp-card-status {
  font-size: 12px;
  font-weight: 600;
  color: #8eafdf;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(124, 171, 236, 0.16);
}
/* Живой статус позиции — единый стиль: залитый фон + светлый текст, цвет фона
   по статусу (палитра как на основной странице / кнопках фиксации). */
.pz-comp-card-status.is-wait    { color: #dbe7fb; background: linear-gradient(180deg, #3f5578, #344762); }
.pz-comp-card-status.is-work    { color: #f1fff8; background: linear-gradient(180deg, #4aa569, #3a8454); }
.pz-comp-card-status.is-done    { color: #f1fff8; background: linear-gradient(180deg, #4aa569, #3a8454); }
.pz-comp-card-status.is-notdone { color: #fff3f3; background: linear-gradient(180deg, #c76f7d, #ac5663); }
.pz-comp-card-status.is-defect  { color: #eaf3ff; background: linear-gradient(180deg, #4a7ebd, #3b6da9); }
.pz-comp-msg {
  text-align: center;
  color: #8eafdf;
  font-size: 15px;
  padding: 28px 12px;
}
.pz-comp-footer {
  text-align: center;
  color: #6f8cb8;
  font-size: 13px;
  padding: 14px 0 4px;
}

/* ── Экран «Карточка состава ПЗ» (одна позиция) ───────────── */

.pz-pos-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.pz-pos-fix-title {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: #eaf2ff;
}
/* Подсказка под заблокированным «Старт» (уже есть задание в работе). */
.pz-pos-busy-hint {
  margin: 2px 0 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.3;
  color: #e7b96a;
}
/* Кнопки фиксации — цвет из detail-complete-done/not-done/side-btn (как на
   основной карточке), здесь только размер + раскладка иконка/текст/стрелка. */
.pz-pos-fix-btn {
  min-height: 56px;
  font-size: 17px;
  justify-content: space-between;
  padding: 0 16px;
}
.pz-pos-fix-ico {
  display: flex;
  flex-shrink: 0;
}
.pz-pos-fix-label {
  flex: 1;
  text-align: center;
}
.pz-pos-arrow {
  flex-shrink: 0;
  font-size: 22px;
  line-height: 1;
  opacity: 0.85;
}
/* Цвет статуса — палитра как на основной странице. */
.pz-pos-status.is-wait    { color: #8eafdf; }
.pz-pos-status.is-work    { color: #4fd07a; }
.pz-pos-status.is-done    { color: #4fd07a; }
.pz-pos-status.is-notdone { color: #e58a96; }
.pz-pos-status.is-defect  { color: #6db0ff; }

/* ── Блок «Документы» в карточке задания ──────────────────── */

.docs-block {
  border: 1px solid rgba(118, 165, 226, 0.34);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 38, 75, 0.86), rgba(13, 31, 63, 0.9));
  padding: 10px;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.docs-block-title {
  margin: 0 0 2px;
  font-size: 15px;
  color: #c8ddff;
  font-weight: 600;
}

.docs-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border: 1px solid rgba(118, 165, 226, 0.28);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(18, 44, 86, 0.8), rgba(14, 35, 70, 0.85));
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: #d8e8ff;
  font-weight: 600;
  width: 100%;
  text-align: left;
  min-height: 48px;
  box-sizing: border-box;
}

.docs-row:active {
  opacity: 0.82;
  transform: scale(0.985);
}

.docs-row-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.docs-row-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.docs-row-label-line {
  color: #d8e8ff;
  font-size: 14px;
  font-weight: 600;
}

.docs-row-sublabel {
  color: #8eafdf;
  font-size: 11px;
  font-weight: 400;
}

.docs-row-count {
  flex-shrink: 0;
  color: #8eafdf;
  font-size: 13px;
  white-space: nowrap;
  font-weight: 400;
}

.docs-row-arrow {
  flex-shrink: 0;
  color: #6a8fc0;
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
}

/* ── Шторка «Документы» ────────────────────────────────────── */

.docs-sheet-card {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.docs-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 12px;
  flex-shrink: 0;
}

.docs-sheet-head-text {
  display: grid;
  gap: 5px;
}

.docs-sheet-sub {
  margin: 0;
  color: #8eafdf;
  font-size: 12px;
}

.docs-sheet-count {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(61, 127, 212, 0.25);
  border: 1px solid rgba(100, 168, 235, 0.38);
  color: #9fc8f5;
  font-size: 11px;
  font-weight: 700;
}

.docs-sheet-x {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(120, 165, 230, 0.38);
  border-radius: 50%;
  background: rgba(14, 32, 66, 0.7);
  color: #9fbae7;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.docs-file-list {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  padding: 2px 0;
}

.docs-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  border: 1px solid rgba(118, 165, 226, 0.28);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(18, 44, 86, 0.75), rgba(14, 35, 70, 0.8));
  min-height: 54px;
}

.docs-file-badge {
  flex-shrink: 0;
  width: 38px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.docs-file-badge-pdf {
  background: linear-gradient(180deg, #c04045, #8c2828);
  color: #fff5f5;
}

.docs-file-badge-img {
  background: linear-gradient(180deg, #3d8c50, #2a6637);
  color: #f0fff4;
}

.docs-file-info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.docs-file-name {
  color: #f0f7ff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-file-meta {
  color: #8eafdf;
  font-size: 12px;
}

.docs-file-eye {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(120, 165, 230, 0.36);
  border-radius: 8px;
  background: rgba(14, 32, 66, 0.6);
  color: #9fbae7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.docs-sheet-close-btn {
  margin-top: 12px;
  flex-shrink: 0;
}

.docs-row-empty {
  opacity: 0.55;
  pointer-events: none;
}

/* Приглушённый тон как docs-row-empty, но КЛИКАБЕЛЬНО (напр. «Состав ПЗ»). */
.docs-row-dim {
  opacity: 0.55;
}

.docs-file-row {
  text-decoration: none;
}

.docs-file-empty {
  margin: 4px 0;
  color: #8eafdf;
  font-size: 13px;
  text-align: center;
  padding: 12px 0;
}

.shift-summary-card,
.salary-summary-card {
  display: grid;
  gap: 8px;
}

.shift-summary-card h3,
.salary-summary-card h3 {
  margin: 0;
  font-size: 17px;
}

.shift-summary-card p,
.salary-summary-card p,
.earnings-total-card p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  color: #b5cdf0;
  font-size: 14px;
}

.shift-summary-card strong,
.salary-summary-card strong,
.earnings-total-card strong {
  color: #f4fbff;
  font-size: 15px;
}

.salary-summary-note {
  margin-top: 2px;
  justify-content: flex-start;
  color: #93aed7;
  font-size: 12px;
}

.report-actions {
  display: grid;
  gap: 8px;
}

.report-earnings-btn {
  background: linear-gradient(180deg, #3f628f, #2f4f7b);
}

.earnings-head-card h2 {
  margin: 0;
  font-size: 22px;
}

.earnings-head-card p {
  margin: 6px 0 0;
  color: #a9c3eb;
  font-size: 13px;
}

.earnings-month-switch {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.earnings-month-btn {
  border: 1px solid rgba(125, 171, 236, 0.42);
  border-radius: 10px;
  min-height: 34px;
  background: linear-gradient(180deg, rgba(33, 61, 101, 0.9), rgba(24, 47, 84, 0.92));
  color: #c7dcfb;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

.earnings-month-btn.is-active {
  border-color: rgba(248, 210, 143, 0.62);
  background: linear-gradient(180deg, rgba(130, 86, 30, 0.88), rgba(101, 66, 23, 0.9));
  color: #ffeec9;
}

.earnings-month-title {
  margin-top: 8px;
  color: #dbe9ff;
  font-size: 13px;
  font-weight: 700;
  text-transform: capitalize;
}

.earnings-main {
  min-height: 0;
  overflow: hidden;
  gap: 10px;
}

.earnings-reset-note {
  margin: 0;
  border: 1px solid rgba(236, 188, 96, 0.54);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(120, 82, 31, 0.48), rgba(94, 62, 20, 0.5));
  color: #ffe7b9;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  padding: 7px 9px;
}

.earnings-table-wrap {
  border: 1px solid rgba(118, 165, 226, 0.34);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 38, 75, 0.86), rgba(13, 31, 63, 0.9));
  overflow: hidden;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.earnings-table-head,
.earnings-list li {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
}

.earnings-table-head {
  border-bottom: 1px solid rgba(118, 165, 226, 0.25);
  color: #a9c4ea;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.earnings-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.earnings-scroll-body {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.earnings-list li {
  border-bottom: 1px solid rgba(118, 165, 226, 0.18);
  color: #c9ddfb;
  font-size: 12px;
}

.earnings-list li:last-child {
  border-bottom: none;
}

.earnings-list strong {
  color: #f5d8a0;
}

.earnings-date {
  color: #e7f0ff;
}

.earnings-empty {
  display: block;
  padding: 10px;
  color: #9ab6df;
  font-size: 13px;
}

.earnings-total-card {
  display: grid;
  gap: 6px;
}

.earnings-grand {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(118, 165, 226, 0.24);
}

.activation-card {
  display: grid;
  gap: 8px;
}

.activation-card h2 {
  margin: 0;
  font-size: 22px;
}

.activation-status {
  margin: 0;
  color: #b8cff0;
  font-size: 14px;
  font-weight: 700;
}

.activation-status-ok {
  color: #bff4cf;
}

.activation-status-warn {
  color: #ffdba4;
}

.activation-identity,
.activation-message,
.activation-error {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.activation-identity {
  color: #d8e7ff;
}

.activation-message {
  color: #9ec2f2;
}

.activation-error {
  color: #ffc4c9;
  font-weight: 700;
}

.activation-form {
  display: grid;
  gap: 6px;
}

.activation-form label {
  color: #c2d8fa;
  font-size: 12px;
  font-weight: 700;
}

.activation-field-error {
  margin: -2px 0 2px;
  color: #ffc4c9;
  font-size: 12px;
  font-weight: 700;
}

.input-invalid {
  border-color: rgba(236, 123, 133, 0.8) !important;
  box-shadow: 0 0 0 1px rgba(236, 123, 133, 0.36) !important;
}

.activation-actions {
  display: grid;
  gap: 8px;
}

.install-card {
  display: grid;
  gap: 8px;
}

.install-steps {
  margin: 4px 0 0;
  padding-left: 20px;
  color: #d7e7ff;
  font-size: 14px;
  line-height: 1.45;
  display: grid;
  gap: 6px;
}

.install-steps strong {
  color: #ffffff;
}

.install-inapp-banner {
  border: 1px solid rgba(255, 196, 87, 0.55);
  background: rgba(255, 196, 87, 0.16);
  color: #ffe7b3;
  padding: 12px 14px;
  border-radius: 12px;
  display: grid;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
}

.install-inapp-banner p {
  margin: 0;
}

.install-inapp-banner strong {
  color: #ffd278;
}

.install-inapp-copy {
  background: #d99820;
  color: #1a1408;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font: 700 14px sans-serif;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.install-now-btn {
  margin-top: 4px;
}

/* Кнопки-ссылки воронки установки (Открыть в Chrome / Яндекс) — выглядят как
   обычные кнопки: <a> с базой detail-main-btn / detail-back-btn, но центрируем
   текст и убираем подчёркивание (ширину даёт grid карточки .install-card). */
.install-open-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  text-decoration: none;
  box-sizing: border-box;
}

.install-hint-sm {
  font-size: 13px;
  margin-top: 2px;
}

/* ── Лёгкий экран установки (иконка + 2 шага + указатель) ── */
.install-hero {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 4px 0 2px;
}

.install-app-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.install-hero-name {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.install-headline {
  margin: 6px 0 2px;
  text-align: center;
  font-size: 18px;
  line-height: 1.3;
  color: #ffffff;
}

.install-steps-v {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.install-steps-v li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e6f0ff;
  font-size: 16px;
  line-height: 1.35;
}

.install-step-n {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #3d7fd4;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  width: 30px;
  height: 30px;
  margin: 0 2px;
  border-radius: 7px;
  background: rgba(61, 127, 212, 0.18);
  color: #6fb0ff;
}

.install-glyph .ig-svg {
  width: 18px;
  height: 18px;
}

.install-glyph-dots {
  font-size: 20px;
  color: #cde0ff;
  background: transparent;
}

.install-pointer {
  display: grid;
  justify-items: center;
  margin-top: 16px;
}

.install-pointer-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #3d7fd4;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 9px 16px;
  border-radius: 16px;
}

.install-pointer-bubble .ig-svg {
  width: 18px;
  height: 18px;
}

.install-pointer-tip {
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 10px solid #3d7fd4;
  margin-top: -1px;
}

.install-hint {
  margin: 6px 0 0;
  text-align: center;
  color: #9ec2f2;
  font-size: 14px;
  line-height: 1.4;
}

.install-foot {
  margin: 16px 0 0;
  text-align: center;
  color: #8fb0e0;
  font-size: 13px;
  line-height: 1.4;
}

.access-lock-card {
  border-color: rgba(236, 123, 133, 0.45);
  background: linear-gradient(180deg, rgba(82, 30, 44, 0.9), rgba(64, 24, 36, 0.92));
}

.access-lock-text {
  color: #ffd6da;
  font-size: 14px;
  font-weight: 700;
}

.access-lock-hint {
  color: #f1c7cc;
  font-size: 13px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-card {
  padding: 10px;
}

.report-card p {
  margin: 0;
  font-size: 13px;
  color: #a8c4ee;
}

.report-card strong {
  display: block;
  margin-top: 8px;
  font-size: 27px;
  color: #f4b452;
}

.report-note {
  margin: 0;
  color: #98b7e8;
  font-size: 12px;
}

/* ── offline banner ── */
#worker-offline-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  padding: 9px 16px;
  padding-top: calc(9px + env(safe-area-inset-top, 0px));
  background: #b33a1e;
  color: #fff;
  font: 600 13px/1.4 -apple-system, BlinkMacSystemFont, sans-serif;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}

