/* MBus WMS v58 - funkcionalen zavihek Skladišče */
#mbus-warehouse-v58-panel {
  position: relative;
  z-index: 1;
  margin: 0 0 16px 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
  overflow: hidden;
  color: #0f172a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.mbus-v58-hidden-native {
  display: none !important;
}
.mbus-wh-v58-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(239, 246, 255, 0.45);
}
.mbus-wh-v58-title {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: -0.02em;
}
.mbus-wh-v58-subtitle {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}
.mbus-wh-v58-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.18);
}
.mbus-wh-v58-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
}
.mbus-wh-v58-card {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.mbus-wh-v58-card-head {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
.mbus-wh-v58-card-title {
  font-size: 15px;
  font-weight: 950;
}
.mbus-wh-v58-card-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: #64748b;
}
.mbus-wh-v58-form,
.mbus-wh-v58-list {
  padding: 14px;
}
.mbus-wh-v58-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.mbus-wh-v58-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mbus-wh-v58-field.full {
  grid-column: 1 / -1;
}
.mbus-wh-v58-field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
  font-weight: 900;
}
.mbus-wh-v58-field input,
.mbus-wh-v58-field select {
  height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  outline: none;
}
.mbus-wh-v58-field input:focus,
.mbus-wh-v58-field select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.mbus-wh-v58-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  padding-top: 22px;
}
.mbus-wh-v58-check input {
  width: 18px;
  height: 18px;
}
.mbus-wh-v58-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.mbus-wh-v58-btn {
  border: 0;
  border-radius: 11px;
  padding: 10px 13px;
  min-height: 40px;
  cursor: pointer;
  font-weight: 950;
  background: #020617;
  color: #fff;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.13);
}
.mbus-wh-v58-btn.secondary {
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: none;
}
.mbus-wh-v58-btn.danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  box-shadow: none;
}
.mbus-wh-v58-btn.small {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}
.mbus-wh-v58-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.mbus-wh-v58-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}
.mbus-wh-v58-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: #f8fafc;
}
.mbus-wh-v58-code {
  min-width: 80px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 950;
  color: #0f172a;
}
.mbus-wh-v58-info {
  flex: 1;
  min-width: 0;
}
.mbus-wh-v58-name {
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mbus-wh-v58-meta {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mbus-wh-v58-badge {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
  background: #dcfce7;
  color: #166534;
}
.mbus-wh-v58-badge.off {
  background: #f1f5f9;
  color: #64748b;
}
.mbus-wh-v58-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mbus-wh-v58-empty,
.mbus-wh-v58-error {
  border: 1px dashed rgba(148, 163, 184, 0.6);
  border-radius: 12px;
  padding: 14px;
  color: #64748b;
  background: #f8fafc;
  font-size: 13px;
}
.mbus-wh-v58-error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}
#mbus-wh-v58-toast {
  position: fixed;
  z-index: 1000000;
  right: 18px;
  bottom: 18px;
  max-width: 520px;
  border-radius: 14px;
  padding: 12px 14px;
  color: #fff;
  background: #065f46;
  box-shadow: 0 18px 44px rgba(0,0,0,0.24);
  font-weight: 900;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#mbus-wh-v58-toast.err {
  background: #991b1b;
}
@media (max-width: 1100px) {
  .mbus-wh-v58-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .mbus-wh-v58-head { flex-direction: column; }
  .mbus-wh-v58-form { grid-template-columns: 1fr; }
  .mbus-wh-v58-check { padding-top: 0; }
  .mbus-wh-v58-row { align-items: flex-start; flex-direction: column; }
  .mbus-wh-v58-row-actions { justify-content: flex-start; }
}
