/* MBus WMS v43 – globalni File Explorer pogled za desktop sezname
   Velja samo na računalniku. Mobilni terminal ostane nespremenjen. */

@media (min-width: 901px) {
  body.mbus-desktop-pro {
    --mbus-explorer-bg: rgba(255,255,255,.97);
    --mbus-explorer-head: #f7f9fc;
    --mbus-explorer-line: rgba(203,213,225,.82);
    --mbus-explorer-soft-line: rgba(226,232,240,.92);
    --mbus-explorer-hover: rgba(37,99,235,.07);
    --mbus-explorer-selected: rgba(37,99,235,.13);
    --mbus-explorer-ink: #0f172a;
    --mbus-explorer-muted: #64748b;
  }

  body.mbus-desktop-pro main {
    font-size: 13px;
  }

  /* Enoten okvir za vse tabele – kot seznam datotek v Explorerju. */
  body.mbus-desktop-pro main .mbus-desktop-table-wrap,
  body.mbus-desktop-pro main .mbus-global-explorer-table-wrap,
  body.mbus-desktop-pro main [class*="overflow-x-auto"]:has(> table) {
    width: 100% !important;
    max-width: 100% !important;
    overflow: auto !important;
    border: 1px solid var(--mbus-explorer-line) !important;
    border-radius: 14px !important;
    background: var(--mbus-explorer-bg) !important;
    box-shadow: 0 12px 28px rgba(15,23,42,.055) !important;
  }

  body.mbus-desktop-pro main table,
  body.mbus-desktop-pro main table.mbus-desktop-table,
  body.mbus-desktop-pro main table.mbus-global-explorer-table {
    width: 100% !important;
    min-width: 980px;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: auto;
    background: transparent !important;
  }

  body.mbus-desktop-pro main table thead th,
  body.mbus-desktop-pro main table.mbus-desktop-table thead th,
  body.mbus-desktop-pro main table.mbus-global-explorer-table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    height: 32px !important;
    padding: 7px 10px !important;
    border-bottom: 1px solid var(--mbus-explorer-line) !important;
    background: linear-gradient(180deg, #fff 0%, var(--mbus-explorer-head) 100%) !important;
    color: #475569 !important;
    font-size: 10.5px !important;
    font-weight: 950 !important;
    letter-spacing: .055em !important;
    line-height: 1.1 !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    text-align: left;
    box-shadow: none !important;
  }

  body.mbus-desktop-pro main table tbody td,
  body.mbus-desktop-pro main table.mbus-desktop-table tbody td,
  body.mbus-desktop-pro main table.mbus-global-explorer-table tbody td {
    height: 34px !important;
    min-height: 34px !important;
    padding: 5px 10px !important;
    border-bottom: 1px solid var(--mbus-explorer-soft-line) !important;
    color: var(--mbus-explorer-ink) !important;
    font-size: 12.25px !important;
    line-height: 1.18 !important;
    vertical-align: middle !important;
    background: transparent !important;
  }

  body.mbus-desktop-pro main table tbody tr:last-child td {
    border-bottom: 0 !important;
  }

  body.mbus-desktop-pro main table tbody tr:hover td {
    background: var(--mbus-explorer-hover) !important;
  }

  body.mbus-desktop-pro main table tbody tr[aria-selected="true"] td,
  body.mbus-desktop-pro main table tbody tr.is-selected td,
  body.mbus-desktop-pro main table tbody tr[data-state="selected"] td {
    background: var(--mbus-explorer-selected) !important;
  }

  body.mbus-desktop-pro main table .font-mono,
  body.mbus-desktop-pro main table .tabular-nums {
    font-variant-numeric: tabular-nums;
  }

  body.mbus-desktop-pro main table button,
  body.mbus-desktop-pro main table a.inline-flex,
  body.mbus-desktop-pro main table [role="button"] {
    min-height: 26px !important;
    height: 26px !important;
    padding: 0 8px !important;
    border-radius: 7px !important;
    font-size: 11px !important;
    font-weight: 850 !important;
  }

  body.mbus-desktop-pro main table svg {
    width: 14px !important;
    height: 14px !important;
  }

  body.mbus-desktop-pro main table [class*="rounded-full"],
  body.mbus-desktop-pro main table [class*="badge"],
  body.mbus-desktop-pro main table [data-slot="badge"] {
    min-height: 19px !important;
    padding: 1px 7px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  /* Dinamično označeni kartični seznami postanejo Explorer vrstice. */
  body.mbus-desktop-pro main .mbus-global-explorer-list {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    gap: 0 !important;
    margin-top: 8px !important;
    border: 1px solid var(--mbus-explorer-line) !important;
    border-radius: 14px !important;
    background: var(--mbus-explorer-bg) !important;
    box-shadow: 0 12px 28px rgba(15,23,42,.055) !important;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 5px 9px !important;
    border-width: 0 0 1px 0 !important;
    border-style: solid !important;
    border-color: var(--mbus-explorer-soft-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item:last-child {
    border-bottom-width: 0 !important;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item:hover {
    background: var(--mbus-explorer-hover) !important;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item::before {
    content: "";
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background:
      linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid rgba(59,130,246,.35);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  }

  body.mbus-desktop-route-lokacije main .mbus-global-explorer-list > .mbus-global-explorer-item::before,
  body.mbus-desktop-route-zaloga main .mbus-global-explorer-list > .mbus-global-explorer-item::before {
    background: linear-gradient(180deg, #ecfdf5 0%, #bbf7d0 100%);
    border-color: rgba(16,185,129,.38);
  }

  body.mbus-desktop-route-dobavnice main .mbus-global-explorer-list > .mbus-global-explorer-item::before,
  body.mbus-desktop-route-narocila main .mbus-global-explorer-list > .mbus-global-explorer-item::before,
  body.mbus-desktop-route-odpreme main .mbus-global-explorer-list > .mbus-global-explorer-item::before {
    background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
    border-color: rgba(245,158,11,.45);
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item > * {
    min-width: 0 !important;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item > [class*="p-"] {
    padding: 0 !important;
    width: 100% !important;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item [class*="text-2xl"],
  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item [class*="text-xl"],
  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item h2,
  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item h3 {
    font-size: 13px !important;
    line-height: 1.18 !important;
    letter-spacing: 0 !important;
    margin: 0 !important;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item [class*="text-sm"] {
    font-size: 12px !important;
    line-height: 1.18 !important;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item [class*="text-xs"] {
    font-size: 11px !important;
    line-height: 1.15 !important;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item [class*="mt-1"],
  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item [class*="mt-2"],
  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item [class*="mb-1"],
  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item [class*="mb-2"] {
    margin-top: 1px !important;
    margin-bottom: 1px !important;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item button,
  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item a.inline-flex,
  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item [role="button"] {
    min-height: 26px !important;
    height: 26px !important;
    padding: 0 8px !important;
    border-radius: 7px !important;
    font-size: 11px !important;
    font-weight: 850 !important;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item svg {
    width: 14px !important;
    height: 14px !important;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item [class*="rounded-full"],
  body.mbus-desktop-pro main .mbus-global-explorer-list > .mbus-global-explorer-item [data-slot="badge"] {
    min-height: 19px !important;
    padding: 1px 7px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-list .truncate,
  body.mbus-desktop-pro main .mbus-global-explorer-list [class*="truncate"] {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Ne spreminjaj obrazcev, dialogov, kartic povzetkov in inventurnega skenerja v Explorer vrstico. */
  body.mbus-desktop-pro main form,
  body.mbus-desktop-pro main [role="dialog"],
  body.mbus-desktop-pro main .mbus-desktop-overview,
  body.mbus-desktop-pro main .mbus-location-print-panel,
  body.mbus-desktop-pro main .mbus-inventory-scan-panel {
    font-size: initial;
  }

  body.mbus-desktop-pro main .mbus-global-explorer-protected {
    display: revert !important;
    border: revert !important;
    box-shadow: revert !important;
    background: revert !important;
  }

  /* Glavne kartice/statistike naj ostanejo kartice, samo kompaktnejše. */
  body.mbus-desktop-pro main > div > [class*="grid"]:not(.mbus-global-explorer-list) > [class*="border"]:not(.mbus-global-explorer-item) {
    min-height: auto;
  }

  /* Windows Explorer občutek: fokus/izbrana vrstica je jasna. */
  body.mbus-desktop-pro main .mbus-global-explorer-item:focus-within,
  body.mbus-desktop-pro main table tbody tr:focus-within td {
    outline: 2px solid rgba(37,99,235,.22) !important;
    outline-offset: -2px !important;
    background: var(--mbus-explorer-selected) !important;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  body.mbus-desktop-pro main table,
  body.mbus-desktop-pro main table.mbus-desktop-table,
  body.mbus-desktop-pro main table.mbus-global-explorer-table {
    min-width: 900px;
  }
}

@media print {
  body.mbus-desktop-pro main table thead th,
  body.mbus-desktop-pro main table tbody td {
    height: auto !important;
    padding: 3px 5px !important;
    font-size: 9.5px !important;
  }
}
