* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background: #e2e8f0; color: #0f172a; overflow-x: hidden; font-size: 12px; }

.topbar {
  height: 40px; background: #0f172a; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #1e293b;
}
.topbar-left, .topbar-right, .bottom-left, .bottom-right { display: flex; align-items: center; gap: 8px; }
.logo { color: #fff; text-decoration: none; font-weight: 800; font-size: 14px; letter-spacing: 0.6px; margin-right: 4px; }
.tab-btn {
  background: #1e293b; color: #cbd5e1; border: 1px solid #334155;
  padding: 4px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.tab-btn:hover { border-color: #64748b; color: #fff; }
.tab-btn.active { background: #2563eb; color: #fff; border-color: #3b82f6; }
.queue-btn { border-color: #10b981; color: #6ee7b7; }
.queue-btn.active { background: #059669; color: #fff; border-color: #10b981; }
.confirm-queue-btn {
  background: #16a34a; color: #fff; border: none; padding: 5px 12px;
  border-radius: 4px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.hidden-orders-toggle {
  display: inline-flex; align-items: center; gap: 5px; color: #cbd5e1; font-size: 12px;
  cursor: pointer; user-select: none; padding: 3px 8px; border-radius: 4px;
  background: #1e293b; border: 1px solid #334155;
}
.hidden-orders-toggle input { cursor: pointer; accent-color: #3b82f6; }
.worker-pill {
  background: #1e293b; border: 1px solid #475569; padding: 4px 12px;
  border-radius: 12px; font-size: 12px; font-weight: 600; cursor: pointer; color: #93c5fd;
}
.worker-pill:hover { border-color: #93c5fd; color: #fff; }

.grid-header {
  height: 34px; background: #f8fafc; border-bottom: 2px solid #94a3b8;
  display: grid; grid-template-columns: 220px repeat(6, minmax(0, 1fr)) 210px;
  position: sticky; top: 40px; z-index: 40;
}
.gh-cell {
  font-size: 12px; font-weight: 700; color: #1e293b;
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid #cbd5e1; padding: 0 4px; white-space: nowrap;
}
.gh-cell:last-child { border-right: none; }
.gh-order { padding: 3px 5px; }
.gh-order input {
  width: 100%; height: 26px; font-size: 12px; padding: 0 8px;
  border: 1px solid #94a3b8; border-radius: 4px; outline: none; background: #fff;
}
.gh-order input:focus { border-color: #2563eb; }

.board-container { padding: 4px 6px 44px; display: flex; flex-direction: column; gap: 4px; }
.order-row {
  display: grid; grid-template-columns: 220px repeat(6, minmax(0, 1fr)) 210px;
  background: #fff; border: 1px solid #94a3b8; border-radius: 4px; min-height: 86px; overflow: hidden;
}
.order-row.pink-row { background: #ffe4e6; border-color: #f43f5e; }
.order-row.stop-row { background: #fef2f2; border: 2px dashed #dc2626; }

.col-order {
  border-right: 1px solid #94a3b8; padding: 5px 7px;
  display: flex; flex-direction: column; justify-content: space-between; min-width: 0;
}
.ord-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; }
.ord-link { color: #0284c7; text-decoration: none; font-weight: 800; }
.ord-link:hover { text-decoration: underline; }
.ord-client { color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-stop-tag { background: #dc2626; color: #fff; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 3px; text-align: center; }
.ord-note {
  background: rgba(241, 245, 249, 0.9); border: 1px solid #cbd5e1; border-radius: 3px;
  font-size: 11px; padding: 2px 5px; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ord-note.is-urgent { background: #dc2626; color: #fff; font-weight: 700; border-color: #991b1b; }
.ord-bot { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; }
.ord-date { font-weight: 700; color: #334155; }
.ord-date.is-overdue { color: #dc2626; font-weight: 800; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.model-badge { background: #0f172a; color: #fff; font-weight: 800; font-size: 11.5px; padding: 2px 7px; border-radius: 3px; }

.cell {
  border-right: 1px solid #94a3b8; padding: 4px 6px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; user-select: none; min-width: 0; background: #fff;
}
.cell.clickable { cursor: pointer; }
.cell.clickable:hover { filter: brightness(0.96); }

.cell.st-skip { background: #e2e8f0; align-items: center; justify-content: center; color: #94a3b8; }
.cell.st-skip .big-mark { font-size: 17px; font-weight: 800; }
.cell.st-skip .sub-mark { font-size: 9.5px; margin-top: 2px; }
.cell.st-done { background: #e2e8f0; align-items: center; justify-content: center; color: #64748b; }
.cell.st-done .big-mark { font-size: 17px; font-weight: 800; }

.cell.st-start  { background: #fff; box-shadow: inset 0 0 0 2.5px #f97316; }
.cell.st-frozen { background: #fff1f2; box-shadow: inset 0 0 0 2px #ef4444; }
.cell.st-work   { background: #fef08a; box-shadow: inset 0 0 0 1.5px #eab308; }
.cell.st-otk    { background: #ef4444; color: #fff; }

.cell.q-empty   { background: #e2e8f0; align-items: center; justify-content: center; color: #94a3b8; font-weight: 700; }
.cell.q-present { background: #dcfce7; align-items: center; justify-content: center; color: #166534; font-weight: 700; }

.cell-bang { position: absolute; top: 2px; right: 5px; color: #dc2626; font-weight: 900; font-size: 15px; }
.cell.st-otk .cell-bang { color: #fef08a; }
.cell-list { list-style: none; font-size: 11px; line-height: 1.25; color: #1e293b; padding-right: 16px; }
.cell.st-otk .cell-list { color: #fff; }
.cell-list li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-list li.alert-line { color: #b91c1c; font-weight: 700; }
.cell.st-otk .cell-list li.alert-line { color: #fef08a; }
.cell-more { color: #2563eb; font-weight: 700; font-size: 10.5px; }
.cell.st-otk .cell-more { color: #fef08a; }

.cell-foot {
  border-top: 1px dashed rgba(0,0,0,0.15); padding-top: 2px; margin-top: 2px;
  display: flex; justify-content: space-between; align-items: center; font-size: 10.5px;
}
.badge-st { padding: 1px 5px; border-radius: 3px; font-weight: 700; font-size: 9.5px; color: #fff; }
.badge-start { background: #f97316; } .badge-frozen { background: #991b1b; }
.badge-work { background: #ca8a04; } .badge-otk { background: #991b1b; }
.foot-meta { color: #334155; font-weight: 700; white-space: nowrap; }
.cell.st-otk .foot-meta, .cell.st-done .foot-meta { color: inherit; }

.col-sklad { display: grid; grid-template-columns: 2fr 1fr; min-width: 0; }
.sklad-nums {
  padding: 5px 6px; border-right: 1px solid #94a3b8;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: #1e293b; min-width: 0;
}
.sklad-nums div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sklad-nums.sklad-missing { background: #dc2626; color: #fff; font-weight: 700; }
.sklad-actions { display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 5px 4px; background: #f8fafc; }
.stop-sign { width: 28px; height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; background: #dc2626; }
.stop-sign.is-dim { background: #fca5a5; color: #7f1d1d; }
.btn-gear { width: 28px; height: 28px; background: #2563eb; color: #fff; border: none; border-radius: 4px; font-size: 15px; cursor: pointer; }
.q-plus { width: 34px; height: 34px; border-radius: 4px; border: 2px solid #16a34a; background: #fff; color: #16a34a; font-size: 20px; font-weight: 800; cursor: pointer; }
.q-plus.selected { background: #16a34a; color: #fff; }

.bottombar {
  height: 36px; background: #0f172a; color: #cbd5e1; font-size: 12px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; border-top: 1px solid #1e293b;
}
.bottom-nav-link { color: #fff; text-decoration: none; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 4px; }
.bottom-nav-link:hover, .bottom-nav-link.active { background: #1e293b; color: #93c5fd; }
.ver-badge { color: #94a3b8; font-size: 11.5px; }
.orders-counter { font-weight: 700; color: #fff; background: #1e293b; border: 1px solid #334155; border-radius: 4px; padding: 2px 9px; }

.board-empty, .board-error { padding: 20px; text-align: center; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; }
.board-error { color: #991b1b; background: #fee2e2; border-color: #ef4444; font-weight: 600; }

.hidden { display: none !important; }
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.6); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: #fff; border-radius: 8px; max-width: 520px; width: 100%; padding: 16px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.25); }
.m-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e2e8f0; padding-bottom: 8px; margin-bottom: 12px; }
.m-close { background: #e2e8f0; border: none; width: 28px; height: 28px; border-radius: 4px; cursor: pointer; font-weight: 700; }
.act-btns { display: flex; gap: 10px; margin-top: 14px; }
.act-btn { flex: 1; padding: 10px; border: none; border-radius: 6px; color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; }
.btn-blue { background: #2563eb; }

/* Общие стили для внутренних страниц (stage, order, cnc, reports, products) */
.wrap-page { max-width: 1500px; margin: 12px auto 48px; padding: 0 12px; font-size: 12px; }
Используйте код с осторожностью.
.card-box { background: #fff; border: 1px solid #94a3b8; border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; }
.flex-b { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.erp-tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: 12px; }
.erp-tbl th, .erp-tbl td { border: 1px solid #cbd5e1; padding: 6px 8px; text-align: left; }
.erp-tbl th { background: #f1f5f9; font-weight: 700; color: #1e293b; }
.erp-tbl tr:hover { background: #f8fafc; }
.btn-lg { padding: 9px 20px; border: none; border-radius: 5px; font-size: 13px; font-weight: 700; color: #fff; cursor: pointer; }
.b-green { background: #16a34a; } .b-red { background: #dc2626; } .b-slate { background: #334155; }
.b-tool { padding: 6px 12px; border: 1px solid #94a3b8; border-radius: 4px; background: #f8fafc; font-weight: 700; cursor: pointer; font-size: 12px; }
.x-circle { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #94a3b8; background: #f8fafc; color: #0f172a; font-size: 18px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.x-circle:hover { background: #fee2e2; color: #dc2626; }
@media print { .topbar, .bottombar, .no-print { display: none !important; } .wrap-page { margin: 0; max-width: 100%; } }