.page-shell.qr-settings-mode {
  padding: 12px 10px 12px 8px;
  overflow: auto;
}

.qr-settings-shell {
  width: min(1140px, 100%);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qr-settings-head h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.06;
}

.qr-settings-head .muted {
  margin: 4px 0 0;
  font-size: 13px;
}

.qr-layout {
  display: grid;
  grid-template-columns: minmax(620px, 760px) minmax(280px, 340px);
  gap: 12px;
  align-items: start;
  margin-top: 4px;
}

.qr-config-card,
.qr-preview-card {
  border: 1px solid rgba(124, 164, 220, 0.28);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(22, 43, 82, 0.72), rgba(13, 29, 57, 0.76));
  box-shadow: inset 0 1px 0 rgba(220, 235, 255, 0.06);
}

.qr-config-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.qr-config-table td {
  border: 1px solid rgba(127, 160, 205, 0.32);
  padding: 8px 10px;
  vertical-align: middle;
}

.qr-config-table td:nth-child(1) {
  width: 42%;
  color: #b7c9e4;
}

.qr-config-table td:nth-child(2) {
  width: 58%;
  color: #edf4ff;
  font-weight: 620;
}

.qr-days-input {
  max-width: 142px;
}

.qr-worker-url {
  word-break: break-all;
  color: #9fd0ff;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.qr-status {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(144, 171, 212, 0.45);
  background: rgba(18, 43, 78, 0.55);
  color: #d2e1f6;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 650;
}

.qr-status.is-ok {
  color: #8dd9a3;
}

.qr-status.is-warn {
  color: #ffdb9d;
  border-color: rgba(223, 177, 112, 0.56);
  background: rgba(107, 76, 26, 0.32);
}

.qr-preview-card h2 {
  margin: 0;
  font-size: 15px;
}

.qr-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.qr-preview-box {
  margin-top: 10px;
  border: 1px solid rgba(135, 164, 203, 0.35);
  border-radius: 10px;
  min-height: 332px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 18, 36, 0.36);
  padding: 10px;
}

.qr-preview-image {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.qr-preview-empty {
  color: #9cb6da;
  font-size: 12px;
}

.qr-preview-note {
  margin: 10px 0 0;
  color: #a8c0e1;
  font-size: 11px;
  line-height: 1.35;
}

.page-shell.loss-settings-mode {
  padding: 12px 10px 12px 8px;
  overflow: auto;
}

.loss-settings-shell {
  width: min(1240px, 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.loss-settings-head h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
}

.loss-settings-head .muted {
  margin: 2px 0 0;
  font-size: 11px;
}

.loss-settings-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.loss-settings-layout {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(560px, 1fr);
  gap: 10px;
  align-items: start;
}

.loss-settings-card {
  border: 1px solid rgba(124, 164, 220, 0.28);
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(22, 43, 82, 0.72), rgba(13, 29, 57, 0.76));
  box-shadow: inset 0 1px 0 rgba(220, 235, 255, 0.06);
}

.loss-settings-card h2 {
  margin: 0 0 6px;
  font-size: 15px;
}

.page-shell.loss-settings-mode .org-input {
  border-color: #a5b6cf;
  background: #d3dae4;
  color: #173255;
}

.page-shell.loss-settings-mode .org-input::placeholder {
  color: #5b718f;
}

.page-shell.loss-settings-mode .org-input:focus {
  border-color: #7f9ec8;
  box-shadow: 0 0 0 2px rgba(114, 145, 193, 0.2);
}

.loss-metric-table,
.loss-reason-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
}

.loss-metric-table td,
.loss-reason-table th,
.loss-reason-table td {
  border: 1px solid rgba(128, 162, 208, 0.35);
  padding: 6px 8px;
}

.loss-metric-table td:nth-child(1) {
  width: 58%;
  color: #b8cbe7;
}

.loss-metric-table td:nth-child(2) {
  width: 42%;
}

.loss-metric-value {
  display: inline-block;
  min-height: 28px;
  width: 100%;
  border: 1px solid rgba(151, 179, 218, 0.4);
  border-radius: 8px;
  background: rgba(10, 23, 45, 0.45);
  color: #f0f6ff;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
}

.loss-reason-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.loss-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.loss-reason-table th {
  text-align: left;
  color: #d8e6fa;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.loss-reason-wrap {
  max-height: 510px;
  overflow: auto;
}

.loss-reason-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.loss-reason-wrap::-webkit-scrollbar-thumb {
  background: rgba(128, 162, 208, 0.45);
  border-radius: 999px;
}

.loss-reason-input {
  min-height: 28px;
}

.loss-reason-table .loss-reason-input {
  background: #cfd6e0;
  color: #1b3557;
}

.loss-settings-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.loss-settings-status {
  color: #d2e1f6;
  font-size: 11px;
  font-weight: 600;
}

.loss-settings-status.is-ok {
  color: #8dd9a3;
}

.loss-settings-status.is-error {
  color: #f5b0bf;
}

.page-shell.workmode-settings-mode {
  padding: 12px 10px 12px 8px;
  overflow: auto;
}

.workmode-settings-shell {
  width: min(1440px, 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workmode-settings-head h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
}

.workmode-settings-head .muted {
  margin: 2px 0 0;
  font-size: 11px;
  color: #95aecf;
}

.workmode-settings-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workmode-settings-layout {
  display: grid;
  grid-template-columns: 47% 53%;
  gap: 8px;
  align-items: start;
}

.workmode-settings-card {
  border: 1px solid rgba(124, 164, 220, 0.28);
  border-radius: 12px;
  padding: 8px;
  background: linear-gradient(180deg, rgba(22, 43, 82, 0.72), rgba(13, 29, 57, 0.76));
  box-shadow: inset 0 1px 0 rgba(220, 235, 255, 0.06);
}

.workmode-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(136, 170, 218, 0.28);
}

.workmode-card-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #f1f6ff;
}

.workmode-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workmode-table-wrap {
  border: 1px solid rgba(126, 162, 196, 0.75);
  border-radius: 8px;
  background: #e8edf5;
  overflow-x: hidden;
  overflow-y: auto;
}

.workmode-table-wrap.is-scroll {
  max-height: 590px;
}

.workmode-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
  color: #122642;
}

.workmode-table th,
.workmode-table td {
  border: 1px solid #c3cfdf;
  padding: 4px 5px;
  vertical-align: top;
}

.workmode-table th {
  text-align: left;
  color: #2a466e;
  background: #dde7f5;
  font-size: 10px;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: normal;
}

.workmode-shift-table th:nth-child(1),
.workmode-shift-table td:nth-child(1) { width: 18%; }
.workmode-shift-table th:nth-child(2),
.workmode-shift-table td:nth-child(2) { width: 25%; }
.workmode-shift-table th:nth-child(3),
.workmode-shift-table td:nth-child(3) { width: 9%; }
.workmode-shift-table th:nth-child(4),
.workmode-shift-table td:nth-child(4) { width: 10%; }
.workmode-shift-table th:nth-child(5),
.workmode-shift-table td:nth-child(5) { width: 10%; }
.workmode-shift-table th:nth-child(6),
.workmode-shift-table td:nth-child(6) { width: 14%; }
.workmode-shift-table th:nth-child(7),
.workmode-shift-table td:nth-child(7) { width: 14%; }

.workmode-break-table th:nth-child(1),
.workmode-break-table td:nth-child(1) { width: 11%; }
.workmode-break-table th:nth-child(2),
.workmode-break-table td:nth-child(2) { width: 20%; }
.workmode-break-table th:nth-child(3),
.workmode-break-table td:nth-child(3) { width: 16%; }
.workmode-break-table th:nth-child(4),
.workmode-break-table td:nth-child(4) { width: 14%; }
.workmode-break-table th:nth-child(5),
.workmode-break-table td:nth-child(5) { width: 11%; }
.workmode-break-table th:nth-child(6),
.workmode-break-table td:nth-child(6) { width: 11%; }
.workmode-break-table th:nth-child(7),
.workmode-break-table td:nth-child(7) { width: 17%; }

.workmode-table td {
  background: #e8edf5;
}

.workmode-id-cell {
  color: #284a77;
  font-weight: 700;
  text-align: center;
}

.workmode-input {
  width: 100%;
  min-height: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #173255;
  padding: 1px 3px;
  font-size: 13px;
  line-height: 1.2;
  outline: none;
  box-shadow: none;
}

.workmode-input::placeholder {
  color: #5b718f;
}

.workmode-input:focus {
  border: 0;
  box-shadow: none;
}

.workmode-input[readonly] {
  color: #203d63;
  font-weight: 700;
}

.workmode-input[data-field="paid"] {
  padding-right: 4px;
}

.workmode-table select.workmode-input {
  appearance: auto;
  -webkit-appearance: menulist;
}

.workmode-row-actions .plan-btn {
  min-width: 96px;
  min-height: 23px;
  padding: 2px 8px;
  font-size: 9px;
  border-radius: 8px;
}

.workmode-tolerance-block,
.workmode-autoclose-block {
  margin-top: 16px;
}

.workmode-autoclose-hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: #c8d4e8;
}

.workmode-autoclose-hint b {
  color: #f1f6ff;
}

.workmode-settings-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.workmode-settings-status {
  color: #d2e1f6;
  font-size: 11px;
  font-weight: 600;
}

.workmode-settings-status.is-ok {
  color: #8dd9a3;
}

.workmode-settings-status.is-error {
  color: #f5b0bf;
}

