/* ORBIN Admin UI/UX clean-up styles (staging first). Source: /home/claude/ux/src/ux-admin.css */
[data-ux-hide] { display: none !important; }
.row:has(> [data-ux-hide]) > [class*="col-xl-"]:not([data-ux-hide]) { flex: 1 1 0; max-width: none; }
/* Products: bulk panels fold to their title line */
[data-ux-fold]:not([data-ux-open]) > .card-body > :not(:first-child) { display: none !important; }
[data-ux-fold]:not([data-ux-open]) > .card-body > :first-child p { display: none !important; }
[data-ux-fold-h] { cursor: pointer; user-select: none; }
[data-ux-fold-h]::after { content: '  ▸ show'; font-size: 12px; font-weight: 500; color: #1d4ed8; }
[data-ux-open] [data-ux-fold-h]::after { content: '  ▾ hide'; }
/* Products, Categories, Shipping Rules: Delete set apart from Edit */
html:not([data-ux-keep]) td.text-end .btn-outline-danger { margin-left: 16px; position: relative; }
html:not([data-ux-keep]) td.text-end .btn-outline-danger::before { content: ''; position: absolute; left: -9px; top: 4px; bottom: 4px; border-left: 1px solid #d5dbe1; }
/* stock / availability conflict */
.badge[data-ux-stock]::after { content: ' · ' attr(data-ux-stock) ' in stock'; font-weight: 600; }
.badge[data-ux-stock] { background: #b45309 !important; }
/* explanatory note */
.ux-note { background: #fff4e0; border: 1px solid #f3d9a6; color: #5b3b06; border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; font-size: 14px; }
/* Orders at laptop width (1366 px): long addresses and product names wrap inside their cell instead of pushing
   the ORBIN history column off screen */
@media (max-width: 1500px) { #ows table th, #ows table td { overflow-wrap: anywhere; } #ows table { width: 100%; } }
/* ---------------- Phase 4: phones and small tablets ---------------- */
@media (max-width: 991.98px) {
  /* module panels open BELOW the app header, so the menu button stays visible; the menu drawer opens above them */
  #oci, #ogd, #oad, #odc, #olp, #olx, #osi, #v2p { top: 56px !important; bottom: 0 !important; height: auto !important; }
  nav.sb-topnav { z-index: 100600 !important; }
  #layoutSidenav_nav { z-index: 100590 !important; }
  /* the signed-in badge no longer floats over buttons: it sits at the end of the menu drawer */
  #orbin-staff-badge[data-ux-docked] { position: static !important; margin: 10px 12px 16px !important; display: inline-block; box-shadow: none !important; }
  #oci ::-webkit-scrollbar, #ogd ::-webkit-scrollbar, #oad ::-webkit-scrollbar { height: 4px; }
}
@media (max-width: 767.98px) {
  /* dense tables become cards: one row = one card, each value with its column name */
  table[data-ux-cards] thead { display: none; }
  table[data-ux-cards], table[data-ux-cards] tbody, table[data-ux-cards] tr, table[data-ux-cards] td { display: block; width: 100%; }
  table[data-ux-cards] tr { border: 1px solid #e4e7eb; border-radius: 10px; margin: 0 0 10px; padding: 8px 12px; background: #fff; }
  table[data-ux-cards] td { border: 0 !important; padding: 3px 0 !important; display: flex; gap: 10px; align-items: baseline; min-height: 24px; }
  table[data-ux-cards] td::before { content: attr(data-label); flex: 0 0 104px; color: #5f6b76; font-size: 12px; }
  table[data-ux-cards] td[data-label=""]::before { content: none; }
  .table-responsive:has(> table[data-ux-cards]) { overflow: visible; }
}
@media (max-width: 575.98px) {
  /* KPI cards two per row instead of one, so the list starts on the first screen */
  /* RELEASE 1: not on the Payment History page (html[data-ux-keep]), which stays exactly as it is */
  html:not([data-ux-keep]) #layoutSidenav_content .row.g-3 > [class*="col-"]:has(> [class*="kpi"]) { flex: 0 0 50%; max-width: 50%; }
  html:not([data-ux-keep]) #layoutSidenav_content [class$="-kpi"], html:not([data-ux-keep]) #layoutSidenav_content [class*="-kpi "] { padding: 10px 12px !important; }
}
