/* MBus WMS v59 - nov uporabnik samo v zavihku Uporabniki, ne prekriva zgornjega menija */
#mbus-admin-new-user-panel {
  position: fixed !important;
  left: clamp(260px, 22vw, 340px) !important;
  right: auto !important;
  top: auto !important;
  bottom: 24px !important;
  z-index: 999995 !important;
  clear: none !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  width: auto !important;
  max-width: calc(100vw - 36px) !important;
  pointer-events: none !important;
}
.mbus-new-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.mbus-new-user-title {
  font-weight: 900;
  font-size: 15px;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.mbus-new-user-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.mbus-new-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mbus-new-user-btn {
  border: 0;
  background: #020617;
  color: #fff;
  border-radius: 11px;
  font-weight: 900;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(2,6,23,0.16);
}
.mbus-new-user-btn.secondary {
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: none;
}
.mbus-admin-floating-new-user {
  position: fixed;
  top: 86px;
  right: 22px;
  z-index: 99990;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(30, 64, 175, 0.25);
  background: #020617;
  color: #fff;
  border-radius: 999px;
  padding: 11px 15px;
  font-weight: 950;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(2, 6, 23, .24);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
}
.mbus-admin-floating-new-user:hover { transform: translateY(-1px); }
.mbus-admin-floating-plus {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  font-size: 18px;
}
.mbus-user-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(2, 6, 23, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.mbus-user-modal {
  width: min(650px, 100%);
  max-height: min(820px, 94vh);
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 90px rgba(0,0,0,0.35);
  padding: 20px;
  color: #0f172a;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
}
.mbus-user-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.mbus-user-modal h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 950;
}
.mbus-user-modal p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}
.mbus-user-modal-close {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-weight: 950;
  font-size: 24px;
}
.mbus-user-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.mbus-user-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mbus-user-field.full { grid-column: 1 / -1; }
.mbus-user-field label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  font-weight: 900;
}
.mbus-user-field input,
.mbus-user-field select {
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 15px;
  outline: none;
  background: #fff;
}
.mbus-user-field input:focus,
.mbus-user-field select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.mbus-password-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}
.mbus-user-field small {
  color: #64748b;
  line-height: 1.35;
}
.mbus-user-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.mbus-user-submit,
.mbus-user-copy-link,
.mbus-user-copy-password,
.mbus-user-new-password {
  border: 0;
  border-radius: 13px;
  padding: 12px 16px;
  font-weight: 950;
  cursor: pointer;
}
.mbus-user-submit {
  flex: 1 1 220px;
  background: #020617;
  color: #fff;
}
.mbus-user-copy-link,
.mbus-user-copy-password,
.mbus-user-new-password {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.2);
}
.mbus-user-help {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
}
.mbus-user-message {
  margin-top: 12px;
  border-radius: 14px;
  padding: 12px;
  font-size: 13px;
  display: none;
  line-height: 1.45;
}
.mbus-user-message code {
  display: inline-block;
  background: rgba(15,23,42,.06);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 8px;
  padding: 3px 6px;
  font-weight: 900;
}
.mbus-user-message.ok {
  display: block;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.mbus-user-message.err {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
@media (max-width: 900px) {
  .mbus-admin-floating-new-user { top: auto; right: 16px; bottom: 86px; padding: 12px 14px; }
}
@media (max-width: 700px) {
  .mbus-user-form-grid { grid-template-columns: 1fr; }
  #mbus-admin-new-user-panel {
  position: relative;
  z-index: 2;
  clear: both; padding: 10px; }
  .mbus-password-row { grid-template-columns: 1fr; }
  .mbus-admin-floating-new-user span:last-child { display: none; }
  .mbus-admin-floating-plus { width: 24px; height: 24px; }
}

/* v56 hotfix: varnostno skrij star globalni v55 floating gumb, če ga brskalnik še drži v cache-u. */
#mbus-admin-new-user-float,
.mbus-admin-floating-new-user {
  display: none !important;
}

/* v58: če bi brskalnik iz cache-a držal star napačno vstavljen panel v glavi, ga ne prikažemo v vrstici zavihkov. */
[role="tablist"] #mbus-admin-new-user-panel,
header #mbus-admin-new-user-panel,
nav #mbus-admin-new-user-panel {
  display: none !important;
}


/* v59: panel je namenoma samo majhen fiksni gumb spodaj levo, da ga sticky zgornji meni ne pokrije. */
#mbus-admin-new-user-panel .mbus-new-user-row {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  pointer-events: auto !important;
}
#mbus-admin-new-user-panel .mbus-new-user-title,
#mbus-admin-new-user-panel .mbus-new-user-subtitle {
  display: none !important;
}
#mbus-admin-new-user-panel .mbus-new-user-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}
#mbus-admin-new-user-panel .mbus-new-user-btn {
  border-radius: 999px !important;
  padding: 12px 18px !important;
  min-height: 46px !important;
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.28) !important;
  white-space: nowrap !important;
}
#mbus-admin-new-user-panel .mbus-new-user-btn.secondary {
  display: none !important;
}
@media (max-width: 900px) {
  #mbus-admin-new-user-panel {
    left: 16px !important;
    bottom: 92px !important;
  }
}
