.sto-stat-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 10px; margin-bottom: 20px;
}
@media (max-width: 560px) { .sto-stat-grid { grid-template-columns: repeat(2,1fr); } }
.sto-stat-card {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--r-lg,10px); padding: 14px 12px; text-align: center;
}
.sto-stat-ico { font-size: 22px; margin-bottom: 6px; }
.sto-stat-val {
  font-family: 'Oswald',sans-serif;
  font-size: 24px; font-weight: 700; color: var(--text1); line-height: 1;
}
.sto-stat-lbl { font-size: 11px; color: var(--text3); margin-top: 4px; }
.sto-section {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--r-xl,18px); overflow: hidden; margin-bottom: 14px;
}
.sto-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.sto-section-title {
  font-family: 'Oswald',sans-serif;
  font-size: 15px; font-weight: 700; color: var(--text1);
}
.sto-master-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
}
.sto-master-row:last-child { border-bottom: none; }
.sto-master-av {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald',sans-serif; font-size: 15px; font-weight: 700;
}
.sto-master-body { flex: 1; min-width: 0; }
.sto-master-name { font-size: 14px; font-weight: 700; color: var(--text1); }
.sto-master-spec { font-size: 12px; color: var(--text3); }
.sto-master-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.sto-badge {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 99px;
}
.sto-badge--busy { background: rgba(251,191,36,.12); color: #f59e0b; border: 1px solid rgba(251,191,36,.25); }
.sto-badge--done { background: rgba(34,197,94,.1); color: #22c55e; border: 1px solid rgba(34,197,94,.2); }
.sto-master-open {
  font-size: 16px; padding: 6px 8px; border-radius: var(--ui-radius-md,10px);
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
}
.sto-order-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
}
.sto-order-row:last-child { border-bottom: none; }
.sto-order-ico { font-size: 20px; flex-shrink: 0; }
.sto-order-body { flex: 1; min-width: 0; }
.sto-order-name { font-size: 14px; font-weight: 600; color: var(--text1); }
.sto-order-meta { font-size: 12px; color: var(--text3); }

/* ═══════════════════════════════════════════════════════════════════
   APP SETTINGS — страница настроек
═══════════════════════════════════════════════════════════════════ */

/* r148: STO dispatch business workflow */
.sto-dispatch-page{padding-bottom:calc(var(--bnav-h,0px) + 24px)}
.sto-dispatch-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap}
.sto-dispatch-title{font-size:24px;margin:2px 0 0}
.sto-dispatch-sub{font-size:13px;color:var(--text3);margin-top:4px}
.sto-dispatch-head-actions{display:flex;gap:8px;flex-wrap:wrap}
.sto-section-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 7px;margin-left:6px;border-radius:999px;background:rgba(255,107,0,.14);color:var(--orange);font-size:11px;font-weight:800}
.sto-dispatch-row{align-items:flex-start}
.sto-lead-chips{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}
.sto-lead-chip{display:inline-flex;align-items:center;border:1px solid var(--line);background:rgba(255,255,255,.04);border-radius:999px;padding:3px 7px;font-size:10px;color:var(--text3);font-weight:700;line-height:1.1}
.sto-order-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;min-width:190px}
.sto-row-btn{font-size:12px!important;padding:7px 10px!important;min-height:34px!important;border-radius:var(--ui-radius-md,10px)!important}
.sto-empty-line{padding:var(--ui-radius-lg,18px) var(--ui-radius-lg,18px);text-align:center;color:var(--text3);font-size:13px;line-height:1.45}
@media (max-width:680px){
  .sto-dispatch-head{gap:10px;margin-bottom:14px}
  .sto-dispatch-head-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .sto-dispatch-head-actions .btn{width:100%;justify-content:center;min-height:42px}
  .sto-dispatch-title{font-size:21px}
  .sto-order-row.sto-dispatch-row{display:grid;grid-template-columns:28px minmax(0,1fr);gap:10px;padding:12px 14px}
  .sto-order-actions{grid-column:1 / -1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;min-width:0;width:100%}
  .sto-row-btn{width:100%;padding:8px 6px!important;font-size:11px!important}
  .sto-section-head{padding:12px 14px}
  .sto-section-title{font-size:14px}
}

/* STO-ASSIGN-r2: assignment modal hints */
.pf-hint{
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:var(--ui-radius-md,10px);
  background:rgba(255,255,255,.04);
  color:var(--text2);
  font-size:12px;
  line-height:1.45;
}
.pf-hint b{color:var(--text1)}

/* STO-ASSIGN-r3 — assignment history in order detail */
.odet-assignment-history .odet-assign-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
  margin:8px 0 10px;
  font-size:12px;
  color:var(--text3);
}
.odet-assign-state{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:99px;
  font-size:12px;
  font-weight:700;
}
.odet-assign-state--active{
  color:#22c55e;
  background:rgba(34,197,94,.10);
  border:1px solid rgba(34,197,94,.25);
}
.odet-assign-state--empty{
  color:#f59e0b;
  background:rgba(245,158,11,.10);
  border:1px solid rgba(245,158,11,.25);
}
.odet-assign-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.odet-assign-item{
  display:grid;
  grid-template-columns:34px 1fr;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:var(--ui-radius-md,10px);
  background:var(--surface);
}
.odet-assign-dot{
  width:30px;
  height:30px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(148,163,184,.12);
  border:1px solid rgba(148,163,184,.22);
  font-size:13px;
}
.odet-assign-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
  font-size:13px;
  color:var(--text);
}
.odet-assign-top span{
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--text3);
}
.odet-assign-meta{
  margin-top:3px;
  font-size:11px;
  color:var(--text3);
}
.odet-assign-comment{
  margin-top:7px;
  padding:7px 9px;
  border-left:2px solid rgba(245,158,11,.35);
  border-radius:var(--ui-radius-sm,5px);
  background:var(--bg2);
  font-size:12px;
  color:var(--text2);
  line-height:1.5;
}
.odet-assign-empty{
  padding:12px;
  border:1px dashed var(--line);
  border-radius:var(--ui-radius-md,10px);
  color:var(--text3);
  font-size:12px;
  text-align:center;
}
.odet-assign-item--active .odet-assign-dot{
  color:#22c55e;
  background:rgba(34,197,94,.10);
  border-color:rgba(34,197,94,.25);
}
.odet-assign-item--superseded .odet-assign-dot{
  color:#60a5fa;
  background:rgba(96,165,250,.10);
  border-color:rgba(96,165,250,.25);
}
.odet-assign-item--removed .odet-assign-dot{
  color:#ef4444;
  background:rgba(239,68,68,.10);
  border-color:rgba(239,68,68,.25);
}
@media (max-width: 640px){
  .odet-assign-item{grid-template-columns:28px 1fr;padding:9px 10px;gap:8px}
  .odet-assign-dot{width:26px;height:26px;font-size:12px}
  .odet-assignment-history .odet-assign-summary{align-items:flex-start;flex-direction:column}
}

/* STO-DISPATCH-r1 — dispatcher sync/health strip */
.sto-dispatch-sync{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:-6px 0 14px;
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:var(--ui-radius-md,10px);
  background:rgba(255,255,255,.035);
  color:var(--text3);
  font-size:11px;
  font-weight:700;
  line-height:1.25;
}
.sto-dispatch-sync span{
  display:inline-flex;
  align-items:center;
  min-height:18px;
}
.sto-dispatch-sync--loading{color:#f59e0b;background:rgba(245,158,11,.08);border-color:rgba(245,158,11,.22)}
.sto-dispatch-sync--error{color:#ef4444;background:rgba(239,68,68,.08);border-color:rgba(239,68,68,.24)}
.sto-dispatch-sync-error{font-weight:800;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:680px){
  .sto-dispatch-sync{margin:-2px 0 12px;padding:9px 10px;font-size:10.5px;gap:6px}
  .sto-dispatch-sync span{max-width:100%}
}
