/* ==========================================================================
   FILE: mobile.css
   VERSION: 7.6.5
   PURPOSE: Mobile-only layout and module-specific UI overrides.

   Notes:
   - This file was created to keep mobile styling out of app.js/index.html.
   - Desktop/global styling stays in style.css.
   - Logic stays in app.js.
   ========================================================================== */



/* ============================================================
   7.5.3 — Material Stock navigation scope fix
   Material Stock belongs to Inventory only. When the active module
   is Invoice / Task, hide the WorkDesk Material Stock nav item.
   On mobile Inventory, Material Stock is also intentionally hidden.
   ============================================================ */
body:not(.inventory-mode) #workdesk-nav .wd-nav-material {
  display: none !important;
}

@media (max-width: 900px) {
  body.iba-mobile-ui #workdesk-nav .wd-nav-material,
  body.inventory-mode #workdesk-nav .wd-nav-material {
    display: none !important;
  }
}

/* ============================================================
   iba-inventory-mobile-nav-guard
   Moved from index.html in 7.4.7 for easier mobile UI maintenance.
   ============================================================ */
/* 7.3.9: In Inventory mobile, keep only the compact mobile actions visible.
   Material Stock and Reporting/Job Records must not appear in the bottom nav. */
@media (max-width: 900px) {
  body.inventory-mode #workdesk-nav .wd-nav-material,
  body.inventory-mode #workdesk-nav .wd-nav-reporting,
  body.inventory-mode #workdesk-nav .wd-nav-im-reporting-mobile,
  body.inventory-mode #inventory-view #inv-nav {
    display: none !important;
  }
}


/* ============================================================
   iba-mobile-invoice-records-card-style
   Moved from index.html in 7.4.7 for easier mobile UI maintenance.
   ============================================================ */
/* 7.4.2: Mobile-only Invoice Records search modal + PO cards. Desktop table is unchanged. */
@media (max-width: 900px) {
  #im-reporting .daily-report-section,
  #im-reporting #im-reporting-form,
  #im-reporting .reporting-legend,
  #im-reporting .grid-header,
  #im-reporting #im-reporting-content {
    display: none !important;
  }
  #im-reporting .header-top {
    align-items: center;
    gap: 10px;
  }
  #im-reporting .header-title {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  #im-reporting .header-title h1 {
    flex: 1;
    font-size: 1.15rem !important;
    line-height: 1.2;
  }
  #im-reporting .header > p {
    margin: 8px 0 0 0 !important;
    font-size: 12px !important;
  }
  #im-reporting-mobile-view {
    display: block !important;
    padding: 10px 0 80px;
  }
  #im-reporting-mobile-view.hidden {
    display: none !important;
  }
  .im-mobile-search-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 86px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: var(--primary-blue, #003A5C);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(0,58,92,.18);
  }
  .im-mobile-search-btn span { display: inline; }
  .im-search-modal-container {
    width: min(92vw, 430px) !important;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 18px;
  }
  .im-mobile-empty-state {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 26px 16px;
    text-align: center;
    color: #64748b;
    box-shadow: 0 10px 25px rgba(15,23,42,.06);
  }
  .im-mobile-empty-state i {
    display: block;
    font-size: 2rem;
    color: #94a3b8;
    margin-bottom: 8px;
  }
  .im-mobile-empty-state h3 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 1rem;
  }
  .im-mobile-results-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 8px 0 12px;
  }
  .im-mobile-results-summary .summary-pill {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 6px 18px rgba(15,23,42,.05);
  }
  .im-mobile-results-summary .summary-pill.full { grid-column: 1 / -1; }
  .im-mobile-results-summary .label {
    display: block;
    font-size: 11px;
    color: #64748b;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
  }
  .im-mobile-results-summary .value {
    display: block;
    margin-top: 2px;
    color: #0f172a;
    font-weight: 900;
    font-size: .95rem;
  }
  .im-po-balance-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 6px solid #00748C;
    border-radius: 18px;
    padding: 14px;
    margin: 10px 0;
    box-shadow: 0 10px 24px rgba(15,23,42,.06);
  }
  .im-po-balance-card.status-close { border-left-color: #16a34a; }
  .im-po-balance-card.status-open { border-left-color: #00748C; }
  .im-po-balance-card.status-new { border-left-color: #f59e0b; }
  .im-po-balance-card.status-pending { border-left-color: #dc3545; }
  .po-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }
  .po-card-label {
    display: block;
    font-size: 10px;
    color: #64748b;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  .po-card-ponum,
  .po-card-vendor {
    display: block;
    color: #0f172a;
    font-weight: 900;
    font-size: .95rem;
    overflow-wrap: anywhere;
  }
  .po-card-vendor { margin-top: 6px; color: #334155; font-size: .9rem; }
  .po-card-site {
    display: inline-flex;
    margin-top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-weight: 800;
    font-size: 12px;
  }
  .po-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }
  .po-card-value {
    display: block;
    margin-top: 2px;
    font-weight: 900;
    color: #0f172a;
    font-size: .92rem;
  }
  .po-card-balance.negative { color: #dc3545; }
  .po-card-chevron {
    color: #64748b;
    transition: transform .2s ease;
    margin-top: 4px;
  }
  .hidden-invoice-list { display: none !important; }
  .im-mobile-po-detail {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 12px;
    margin: -3px 0 14px 0;
  }
  .im-invoice-list-header h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: .95rem;
  }
  .im-invoice-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .im-invoice-item {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px;
  }
  .im-tx-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
  }
  .im-tx-title {
    color: #00748C;
    font-size: .95rem;
    font-weight: 900;
    overflow-wrap: anywhere;
  }
  .im-tx-status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
  }
  .im-tx-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
  }
  .im-tx-field-label {
    display: block;
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }
  .im-tx-field-value {
    display: block;
    margin-top: 2px;
    color: #0f172a;
    font-weight: 900;
    overflow-wrap: anywhere;
  }
  .im-tx-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
  }
  .im-tx-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 9px;
    border-radius: 9px;
    color: #fff !important;
    text-decoration: none;
    font-size: 11px;
    font-weight: 900;
  }
  .im-tx-action-btn.invoice-pdf-btn { background: #00748C; }
  .im-tx-action-btn.srv-pdf-btn { background: #16a34a; }
  .im-tx-action-btn.report-pdf-btn { background: #6f42c1; }
  .im-mobile-po-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
  }
  .im-mobile-po-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-weight: 900;
    color: #0f172a;
  }
  .im-mobile-po-summary-row span:first-child { color: #64748b; }
  .im-mobile-po-summary-row.negative span:last-child { color: #dc3545; }
}

/* 7.4.5: Runtime mobile identity. This does not depend only on CSS screen width;
   app.js adds body.iba-mobile-ui when the system detects mobile/tablet mode. */
body.iba-mobile-ui #im-reporting .daily-report-section,
body.iba-mobile-ui #im-reporting #im-reporting-form,
body.iba-mobile-ui #im-reporting .reporting-legend,
body.iba-mobile-ui #im-reporting .grid-header,
body.iba-mobile-ui #im-reporting #im-reporting-content,
body.im-mobile-reporting-mode #im-reporting .daily-report-section,
body.im-mobile-reporting-mode #im-reporting #im-reporting-form,
body.im-mobile-reporting-mode #im-reporting .reporting-legend,
body.im-mobile-reporting-mode #im-reporting .grid-header,
body.im-mobile-reporting-mode #im-reporting #im-reporting-content,
body.im-mobile-reporting-mode #im-reporting #im-reporting-grand-total-container {
  display: none !important;
}
body.iba-mobile-ui #im-reporting #im-reporting-mobile-view,
body.im-mobile-reporting-mode #im-reporting #im-reporting-mobile-view {
  display: block !important;
  padding: 10px 0 80px;
}
body.iba-mobile-ui #im-reporting #im-reporting-mobile-view.hidden,
body.im-mobile-reporting-mode #im-reporting #im-reporting-mobile-view.hidden {
  display: none !important;
}
body.iba-mobile-ui #im-reporting .im-mobile-search-btn,
body.im-mobile-reporting-mode #im-reporting .im-mobile-search-btn {
  display: inline-flex !important;
}
body.iba-desktop-ui #im-reporting .im-mobile-search-btn {
  display: none !important;
}


/* 7.4.5: Mobile Invoice Records inline search card. */
body.iba-mobile-ui #im-reporting .im-mobile-search-btn,
body.im-mobile-reporting-mode #im-reporting .im-mobile-search-btn {
  display: none !important;
}
.im-mobile-inline-search-panel {
  display: none;
  background: #ffffff;
  border: 1px solid #dbe6f2;
  border-radius: 18px;
  padding: 14px;
  margin: 10px 0 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
body.iba-mobile-ui #im-reporting .im-mobile-inline-search-panel,
body.im-mobile-reporting-mode #im-reporting .im-mobile-inline-search-panel {
  display: block !important;
}
body.iba-desktop-ui #im-reporting .im-mobile-inline-search-panel,
#im-reporting .im-mobile-inline-search-panel.hidden {
  display: none !important;
}
.im-mobile-inline-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--primary-blue, #003A5C);
  margin-bottom: 10px;
}
.im-mobile-inline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.im-mobile-inline-search-panel .form-group {
  margin: 0;
}
.im-mobile-inline-search-panel label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.im-mobile-inline-search-panel input,
.im-mobile-inline-search-panel select {
  width: 100%;
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
}
.im-mobile-inline-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.im-mobile-inline-actions button {
  flex: 1;
  min-height: 42px;
  border-radius: 12px;
  font-weight: 800;
}


/* 7.4.6: Mobile Invoice Records polish — clean cards, collapsible search, no harsh status colors. */
body.im-mobile-reporting-mode #im-reporting .im-mobile-inline-search-panel,
body.iba-mobile-ui #im-reporting .im-mobile-inline-search-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-color: #dbe6f2;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}
.im-mobile-inline-title {
  justify-content: space-between;
}
.im-mobile-inline-title > span {
  flex: 1;
}
.im-mobile-inline-edit-btn {
  display: none;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #003A5C;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 900;
  font-size: 12px;
}
.im-mobile-inline-collapsed-summary {
  display: none;
  border: 1px solid #dbe6f2;
  background: #ffffff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.im-mobile-inline-collapsed-summary .summary-caption {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  font-weight: 900;
  margin-bottom: 3px;
}
.im-mobile-inline-collapsed-summary strong {
  display: block;
  color: #0f172a;
  font-size: .92rem;
  overflow-wrap: anywhere;
}
.im-mobile-inline-search-panel.is-collapsed .im-mobile-inline-grid,
.im-mobile-inline-search-panel.is-collapsed .im-mobile-inline-actions {
  display: none !important;
}
.im-mobile-inline-search-panel.is-collapsed .im-mobile-inline-edit-btn,
.im-mobile-inline-search-panel.is-collapsed .im-mobile-inline-collapsed-summary {
  display: block !important;
}

body.im-mobile-reporting-mode #im-reporting .im-mobile-results-summary,
body.iba-mobile-ui #im-reporting .im-mobile-results-summary {
  display: none !important;
}

body.im-mobile-reporting-mode #im-reporting .im-po-balance-card,
body.iba-mobile-ui #im-reporting .im-po-balance-card,
body.im-mobile-reporting-mode #im-reporting .im-po-balance-card.status-close,
body.im-mobile-reporting-mode #im-reporting .im-po-balance-card.status-open,
body.im-mobile-reporting-mode #im-reporting .im-po-balance-card.status-new,
body.im-mobile-reporting-mode #im-reporting .im-po-balance-card.status-pending {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 5px solid #00748C !important;
  border-radius: 22px !important;
  padding: 16px !important;
  margin: 12px 0 10px !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .10) !important;
}
body.im-mobile-reporting-mode #im-reporting .im-po-balance-card.status-close,
body.iba-mobile-ui #im-reporting .im-po-balance-card.status-close {
  border-left-color: #16a34a !important;
}
body.im-mobile-reporting-mode #im-reporting .im-po-balance-card.status-new,
body.iba-mobile-ui #im-reporting .im-po-balance-card.status-new {
  border-left-color: #f59e0b !important;
}
body.im-mobile-reporting-mode #im-reporting .im-po-balance-card.status-pending,
body.iba-mobile-ui #im-reporting .im-po-balance-card.status-pending {
  border-left-color: #dc3545 !important;
}
.po-card-title-wrap { min-width: 0; }
.po-card-right-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.po-card-count {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef6fb;
  color: #003A5C;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.po-card-vendor-block {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.po-card-vendor-block strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
  font-size: .94rem;
  font-weight: 900;
  line-height: 1.35;
}
.po-card-site {
  background: #eef6fb !important;
  color: #003A5C !important;
  border: 1px solid #dbeafe;
  gap: 5px;
}
.po-card-grid {
  gap: 10px !important;
}
.po-card-metric {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 11px 10px;
  min-width: 0;
}
.po-card-value {
  font-size: .92rem !important;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.po-card-balance.negative {
  color: #b42318 !important;
}
.im-mobile-po-detail {
  background: #f8fafc !important;
  border: 1px solid #dbe6f2 !important;
  border-radius: 22px !important;
  padding: 14px !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.im-invoice-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.im-invoice-list-header h3 {
  margin: 0 !important;
  font-size: 1rem !important;
}
.im-invoice-list-header span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.im-invoice-item {
  border-radius: 18px !important;
  padding: 14px !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}
.im-tx-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.im-tx-invoice-main { min-width: 0; }
.im-tx-title {
  font-size: 1.02rem !important;
  line-height: 1.25;
}
.im-tx-status {
  background: #eef2f7 !important;
  color: #334155 !important;
  max-width: 46%;
  text-align: center;
  white-space: normal !important;
  line-height: 1.15;
}
.im-tx-amount-panel {
  margin-top: 12px;
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6fb 100%);
  border: 1px solid #dbeafe;
}
.im-tx-amount-panel strong {
  display: block;
  color: #003A5C;
  font-size: 1rem;
  font-weight: 950;
  overflow-wrap: anywhere;
}
.im-tx-meta-line {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.im-tx-meta-line strong {
  color: #0f172a;
  font-size: .92rem;
}
.im-tx-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px !important;
}
.im-tx-action-btn {
  min-height: 38px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
}
.im-tx-actions .im-tx-action-btn:only-child {
  grid-column: 1 / -1;
}
.im-tx-no-pdf {
  margin-top: 10px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}
.im-mobile-po-summary {
  grid-template-columns: 1fr !important;
  gap: 9px !important;
  border-top: none !important;
  margin-top: 14px !important;
  padding-top: 0 !important;
}
.im-mobile-po-summary-row {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 12px;
}
.im-mobile-po-summary-row strong {
  color: #0f172a;
  text-align: right;
  overflow-wrap: anywhere;
}
.im-mobile-po-summary-row.negative strong {
  color: #b42318 !important;
}

body.im-mobile-reporting-mode #im-mobile-search-modal:not(.hidden) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  background: rgba(15, 23, 42, .55) !important;
  padding: 14px !important;
}

@media (min-width: 901px) {
  .im-mobile-search-btn { display: none !important; }
}


/* ============================================================
   iba-mobile-module-switcher-style
   Moved from index.html in 7.4.7 for easier mobile UI maintenance.
   ============================================================ */
/* 7.4.1: Mobile-only Invoice/Inventory switcher near the version display. */
.mobile-module-switcher-wrap { display: none; }
@media (max-width: 900px) {
  .mobile-module-switcher-wrap {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    margin: 8px 0 6px;
    text-align: left;
  }
  .mobile-module-switcher-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255,255,255,.72);
  }
  .mobile-module-switcher-select {
    width: 100%;
    min-height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(255,255,255,.12);
    color: #fff;
    font-weight: 800;
    padding: 6px 10px;
    outline: none;
  }
  .mobile-module-switcher-select option {
    color: #111;
    background: #fff;
  }
}



/* ============================================================
   7.4.8 — Mobile Invoice Records visual refinement only
   - smaller aligned PDF buttons
   - clearer labels/titles
   - stronger balance text contrast
   - PO detail card and transaction cards now look visually distinct
   ============================================================ */
body.im-mobile-reporting-mode #im-reporting .im-po-balance-card,
body.iba-mobile-ui #im-reporting .im-po-balance-card {
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  border: 1px solid #d8e5ef !important;
  border-left: 0 !important;
  border-top: 5px solid #0f6f85 !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .11) !important;
}
body.im-mobile-reporting-mode #im-reporting .im-po-balance-card::before,
body.iba-mobile-ui #im-reporting .im-po-balance-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 52px;
  background: linear-gradient(90deg, rgba(0,58,92,.08), rgba(0,116,140,.03));
  pointer-events: none;
}
.po-card-header,
.po-card-vendor-block,
.po-card-body {
  position: relative;
  z-index: 1;
}
.po-card-label,
.im-tx-field-label {
  color: #334155 !important;
  opacity: 1 !important;
  font-weight: 950 !important;
  letter-spacing: .055em !important;
}
.po-card-ponum {
  font-size: 1.03rem !important;
  color: #0b2239 !important;
}
.po-card-vendor-block {
  background: #f4f8fb !important;
  border: 1px solid #d8e5ef !important;
  border-radius: 17px !important;
}
.po-card-vendor-block strong {
  color: #0f172a !important;
}
.po-card-site {
  color: #003A5C !important;
  background: #eaf6fb !important;
  border-color: #b9deea !important;
}
.po-card-metric {
  background: #ffffff !important;
  border: 1px solid #d8e5ef !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.po-card-metric.balance-metric {
  background: #fff7ed !important;
  border-color: #fed7aa !important;
}
.po-card-metric.balance-metric .po-card-label {
  color: #7c2d12 !important;
}
.po-card-metric.balance-metric .po-card-value,
.po-card-balance {
  color: #7c2d12 !important;
  font-weight: 950 !important;
}
.po-card-balance.negative,
.po-card-metric.balance-metric .po-card-balance.negative {
  color: #b42318 !important;
}

/* The expanded PO detail area must not look like another transaction card. */
.im-mobile-po-detail {
  background: linear-gradient(180deg, #eef6fb 0%, #f8fbff 100%) !important;
  border: 1px solid #c8ddea !important;
  border-radius: 24px !important;
  padding: 13px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 10px 22px rgba(15,23,42,.05) !important;
}
.im-invoice-list-header {
  background: #003A5C !important;
  color: #ffffff !important;
  border-radius: 16px !important;
  padding: 10px 12px !important;
  margin-bottom: 12px !important;
}
.im-invoice-list-header h3,
.im-invoice-list-header span {
  color: #ffffff !important;
  opacity: 1 !important;
}

/* Transaction cards: distinct, compact, clean. */
.im-invoice-item {
  background: #ffffff !important;
  border: 1px solid #e1e8f0 !important;
  border-left: 4px solid #94a3b8 !important;
  border-radius: 16px !important;
  padding: 12px !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .055) !important;
}
.im-tx-title {
  color: #003A5C !important;
  font-weight: 950 !important;
  opacity: 1 !important;
}
.im-tx-status {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border: 1px solid #dbe3ec !important;
  font-size: 10.5px !important;
  padding: 5px 8px !important;
}
.im-tx-amount-panel {
  background: #f8fafc !important;
  border: 1px solid #e1e8f0 !important;
  border-radius: 14px !important;
  padding: 10px !important;
}
.im-tx-amount-panel strong {
  color: #0b2239 !important;
}
.im-tx-meta-line {
  background: #ffffff !important;
  border: 1px dashed #d8e5ef !important;
  border-radius: 12px !important;
  padding: 8px 10px !important;
  color: #334155 !important;
}
.im-tx-meta-line strong {
  color: #0f172a !important;
}

/* PDF buttons: smaller and aligned in one row when space allows. */
.im-tx-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  overflow-x: auto !important;
  padding-bottom: 2px !important;
  -webkit-overflow-scrolling: touch;
}
.im-tx-action-btn {
  flex: 1 0 0 !important;
  min-width: 78px !important;
  min-height: 32px !important;
  padding: 6px 7px !important;
  border-radius: 10px !important;
  font-size: 10.5px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: 0 5px 12px rgba(15,23,42,.10);
}
.im-tx-action-btn i {
  font-size: 10px !important;
}
.im-tx-actions .im-tx-action-btn:only-child {
  flex: 0 0 100% !important;
}

.im-mobile-po-summary-row {
  background: #ffffff !important;
  border-color: #d8e5ef !important;
}
.im-mobile-po-summary-row span:first-child {
  color: #334155 !important;
  opacity: 1 !important;
}
.im-mobile-po-summary-row strong {
  color: #0b2239 !important;
}
.im-mobile-po-summary-row.negative strong {
  color: #b42318 !important;
}

@media (max-width: 360px) {
  .im-tx-action-btn {
    min-width: 72px !important;
    font-size: 10px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
}


/* ============================================================
   7.4.9 - Mobile Invoice/Task navigation cleanup
   Hide Help only in mobile Invoice/Task navigation/footer.
   Desktop Help remains available.
   ============================================================ */
@media (max-width: 900px) {
  body.iba-mobile-ui #workdesk-view #wd-help-link,
  body.iba-mobile-ui #invoice-management-view .im-nav-help,
  body.iba-mobile-ui #invoice-management-view a[data-section="im-help"],
  body.iba-mobile-ui #invoice-management-view .workdesk-footer-nav a[data-section="im-help"] {
    display: none !important;
  }

  /* Fallback when the mobile class has not been applied yet. */
  #workdesk-view #wd-help-link,
  #invoice-management-view .im-nav-help,
  #invoice-management-view a[data-section="im-help"] {
    display: none !important;
  }
}

/* ============================================================
   7.6.5 — Inventory mobile Item Finder / Suggestion picker
   Mobile-only, preview-only: type material name/ID, pick one suggestion, then preview photo and movement history.
   ============================================================ */
#workdesk-nav .wd-nav-inv-mobile-material-search {
  display: none !important;
}
@media (max-width: 900px) {
  body.inventory-mode #workdesk-nav .wd-nav-inv-mobile-material-search {
    display: list-item !important;
  }
  body:not(.inventory-mode) #workdesk-nav .wd-nav-inv-mobile-material-search {
    display: none !important;
  }

  .inv-mobile-finder-section {
    padding: 12px 12px 88px !important;
    background: #f4f7fb !important;
    min-height: calc(100vh - 120px);
  }
  .inv-mobile-finder-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }
  .inv-mobile-finder-head h1 {
    margin: 0 !important;
    font-size: 1.35rem !important;
    color: #0f2942 !important;
    border: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .inv-mobile-finder-head p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #64748b;
  }
  .inv-mobile-finder-search {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(244, 247, 251, .94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 0 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .inv-mobile-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #dbe7f3;
    border-radius: 16px;
    padding: 0 12px;
    min-height: 46px;
    box-shadow: 0 8px 22px rgba(15, 41, 66, .08);
  }
  .inv-mobile-search-box i {
    color: #0b7285;
    font-size: 15px;
  }
  .inv-mobile-search-box input {
    border: 0;
    outline: 0;
    flex: 1;
    min-width: 0;
    font-size: 14px;
    background: transparent;
    color: #0f172a;
  }
  #inv-mobile-material-search-clear {
    min-height: 46px;
    padding: 0 12px !important;
    border-radius: 14px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    white-space: nowrap;
  }
  .inv-mobile-material-status {
    font-size: 12px;
    color: #64748b;
    margin: 4px 2px 10px;
  }
  .inv-mobile-material-suggestions {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: -2px 0 10px;
  }
  .inv-mobile-material-suggestion-item {
    width: 100%;
    border: 1px solid #dbe7f3;
    background: #ffffff;
    border-radius: 16px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    text-align: left;
    box-shadow: 0 8px 22px rgba(15, 41, 66, .08);
    cursor: pointer;
  }
  .inv-mobile-material-suggestion-item:active {
    transform: scale(.99);
    background: #f8fbfd;
  }
  .inv-mobile-material-suggestion-photo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e6f4f8, #f8fafc);
    color: #94a3b8;
  }
  .inv-mobile-material-suggestion-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .inv-mobile-material-suggestion-photo.photo-error::after {
    content: 'No Photo';
    font-size: 8px;
    font-weight: 800;
    color: #64748b;
    text-align: center;
    line-height: 1.05;
  }
  .inv-mobile-material-suggestion-photo.no-photo i {
    font-size: 18px;
  }
  .inv-mobile-material-suggestion-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .inv-mobile-material-suggestion-text strong {
    color: #0f172a;
    font-size: 13px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .inv-mobile-material-suggestion-text small {
    color: #64748b;
    font-size: 11px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .inv-mobile-material-suggestion-qty {
    align-self: center;
    border-radius: 999px;
    background: #e8f6f9;
    color: #0b7285;
    font-size: 11px;
    font-weight: 900;
    padding: 4px 8px;
    white-space: nowrap;
  }
  .inv-mobile-material-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .inv-mobile-material-empty {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    padding: 28px 18px;
    text-align: center;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  }
  .inv-mobile-material-empty i {
    font-size: 34px;
    color: #94a3b8;
  }
  .inv-mobile-material-empty strong {
    color: #0f172a;
    font-size: 16px;
  }
  .inv-mobile-material-empty span {
    font-size: 12px;
  }
  .inv-mobile-material-card {
    background: #ffffff;
    border: 1px solid #dbe7f3;
    border-radius: 22px;
    padding: 12px;
    box-shadow: 0 14px 34px rgba(15, 41, 66, .10);
    overflow: hidden;
  }
  .inv-mobile-material-card-top {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    align-items: stretch;
  }
  .inv-mobile-material-photo,
  .inv-mobile-material-photo-link,
  .inv-mobile-material-photo-placeholder {
    width: 92px;
    height: 92px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #e6f4f8, #f8fafc);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }
  .inv-mobile-material-photo-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .inv-mobile-material-photo-link.photo-error {
    background: #f1f5f9;
  }
  .inv-mobile-material-photo-link.photo-error::after {
    content: 'No Photo';
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
  }
  .inv-mobile-material-photo-placeholder {
    flex-direction: column;
    gap: 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
  }
  .inv-mobile-material-photo-placeholder i {
    font-size: 24px;
    color: #94a3b8;
  }
  .inv-mobile-material-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .inv-mobile-material-id {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e8f6f9;
    color: #0b7285;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .03em;
    margin-bottom: 6px;
    overflow-wrap: anywhere;
  }
  .inv-mobile-material-info h3 {
    margin: 0 0 5px;
    font-size: 16px;
    line-height: 1.2;
    color: #0f172a;
    overflow-wrap: anywhere;
  }
  .inv-mobile-material-info p {
    margin: 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .inv-mobile-material-stats {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .inv-mobile-material-stats.single-stat {
    grid-template-columns: 1fr;
  }
  .inv-mobile-material-stats > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    padding: 9px 8px;
    min-width: 0;
  }
  .inv-mobile-material-stats span {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 800;
    color: #64748b;
  }
  .inv-mobile-material-stats strong {
    display: block;
    margin-top: 3px;
    font-size: 14px;
    color: #0f172a;
    overflow-wrap: anywhere;
  }
  .inv-mobile-material-stats .ok strong { color: #137333; }
  .inv-mobile-material-stats .warning strong { color: #b7791f; }
  .inv-mobile-material-stats .danger strong { color: #b42318; }
  .inv-mobile-material-history {
    margin-top: 12px;
    background: #f8fbfd;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 10px;
  }
  .inv-mobile-material-history-title {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #0f2942;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 8px;
  }
  .inv-mobile-material-history-row {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 14px;
    padding: 9px 10px;
    margin-top: 7px;
  }
  .history-main,
  .history-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
  }
  .history-main strong {
    color: #0f172a;
    font-size: 12px;
  }
  .history-main span,
  .history-meta span {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
  }
  .history-route {
    margin: 6px 0;
    color: #334155;
    font-size: 11px;
    line-height: 1.35;
  }
  .inv-mobile-material-history-empty {
    color: #64748b;
    font-size: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
  }
}


/* ============================================================
   7.6.5 — Inventory mobile Item Finder page-scroll fix
   Use the main page scroll only. No inner scrollbar inside the result/history card.
   Extra bottom spacing keeps the last movement rows above the fixed bottom navigation.
   ============================================================ */
@media (max-width: 900px) {
  body.inventory-mode .inv-mobile-finder-section {
    padding-bottom: 240px !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  body.inventory-mode .inv-mobile-material-results {
    padding-bottom: 190px !important;
    overflow: visible !important;
  }

  body.inventory-mode .inv-mobile-material-card {
    margin-bottom: 150px !important;
    overflow: visible !important;
  }

  body.inventory-mode .inv-mobile-material-history {
    max-height: none !important;
    overflow: visible !important;
    -webkit-overflow-scrolling: auto !important;
    overscroll-behavior: auto !important;
    padding-bottom: 16px !important;
  }

  body.inventory-mode .inv-mobile-material-history::after {
    content: "";
    display: block;
    height: 28px;
  }
}

/* ============================================================
   7.6.5 — Inventory mobile barcode scanner for Item Finder
   Camera scan is optional. Manual search remains the fallback.
   ============================================================ */
@media (max-width: 900px) {
  body.inventory-mode .inv-mobile-finder-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
  }

  body.inventory-mode .inv-mobile-scan-btn {
    min-height: 46px;
    padding: 0 12px !important;
    border: 0;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #0b7285, #0e7490);
    color: #ffffff;
    font-size: 12px !important;
    font-weight: 900 !important;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(14, 116, 144, .22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  body.inventory-mode .inv-mobile-scan-btn:active {
    transform: scale(.98);
  }

  body.inventory-mode .inv-mobile-barcode-scanner.hidden {
    display: none !important;
  }

  body.inventory-mode .inv-mobile-barcode-scanner {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(8, 18, 32, .72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
  }

  body.inventory-mode .inv-mobile-barcode-box {
    width: min(100%, 440px);
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .35);
  }

  body.inventory-mode .inv-mobile-barcode-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #083344;
    color: #ffffff;
  }

  body.inventory-mode .inv-mobile-barcode-head strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
  }

  body.inventory-mode #inv-mobile-barcode-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.inventory-mode .inv-mobile-barcode-video-wrap {
    position: relative;
    background: #020617;
    aspect-ratio: 4 / 3;
    overflow: hidden;
  }

  body.inventory-mode #inv-mobile-barcode-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  body.inventory-mode .inv-mobile-barcode-guide {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 78%;
    height: 36%;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(255, 255, 255, .92);
    border-radius: 18px;
    box-shadow: 0 0 0 999px rgba(2, 6, 23, .28), inset 0 0 0 1px rgba(14, 165, 233, .65);
    pointer-events: none;
  }

  body.inventory-mode .inv-mobile-barcode-guide::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    top: 50%;
    height: 2px;
    background: rgba(34, 211, 238, .95);
    box-shadow: 0 0 18px rgba(34, 211, 238, .9);
  }

  body.inventory-mode .inv-mobile-barcode-status {
    padding: 12px 16px 16px;
    font-size: 12px;
    line-height: 1.35;
    color: #334155;
    background: #f8fafc;
  }
}

@media (max-width: 390px) {
  body.inventory-mode .inv-mobile-finder-search {
    grid-template-columns: 1fr !important;
  }

  body.inventory-mode .inv-mobile-finder-actions {
    width: 100%;
  }

  body.inventory-mode .inv-mobile-scan-btn,
  body.inventory-mode #inv-mobile-material-search-clear {
    flex: 1;
  }
}

/* ============================================================
   7.7.1 — Inventory request review containment fix
   Request-only foundation: no official stock movement yet.
   ============================================================ */
@media (max-width: 900px) {
  .inv-transfer-request-start {
    width: 100%;
    margin-top: 12px;
    border: 0;
    border-radius: 16px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #0b7285, #0f766e);
    color: #fff;
    font-weight: 900;
    font-size: 13px;
    box-shadow: 0 12px 26px rgba(11, 114, 133, .24);
  }

  .inv-transfer-request-form,
  .inv-transfer-request-cart {
    margin-top: 12px;
    border: 1px solid #dbe7f3;
    border-radius: 18px;
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(15, 41, 66, .08);
  }

  .inv-transfer-request-form-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 900;
    color: #0f2942;
    margin-bottom: 10px;
  }

  .inv-transfer-request-form label {
    display: block;
    margin-bottom: 9px;
    color: #334155;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
  }

  .inv-transfer-request-form input,
  .inv-transfer-request-form textarea {
    width: 100%;
    margin-top: 5px;
    border: 1px solid #dbe7f3;
    border-radius: 13px;
    padding: 10px 11px;
    font-size: 13px;
    color: #0f172a;
    background: #f8fafc;
    box-sizing: border-box;
    outline: none;
  }

  .inv-transfer-request-form input:focus,
  .inv-transfer-request-form textarea:focus {
    border-color: #0b7285;
    box-shadow: 0 0 0 3px rgba(11, 114, 133, .12);
    background: #fff;
  }

  .inv-transfer-request-form-actions,
  .inv-transfer-request-cart-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
  }

  .inv-transfer-request-form-actions button,
  .inv-transfer-request-cart-actions button {
    flex: 1;
    min-height: 40px;
    border-radius: 13px !important;
    font-size: 12px !important;
    font-weight: 900 !important;
  }

  .inv-transfer-request-cart-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
  }

  .inv-transfer-request-cart-head strong {
    color: #0f2942;
    font-size: 13px;
  }

  .inv-transfer-request-cart-head span {
    color: #0b7285;
    background: #e8f6f9;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
  }

  .inv-transfer-cart-item {
    display: grid;
    grid-template-columns: 1fr 32px;
    gap: 8px;
    align-items: center;
    border: 1px solid #edf2f7;
    background: #f8fbfd;
    border-radius: 14px;
    padding: 9px 10px;
    margin-top: 7px;
  }

  .inv-transfer-cart-item strong,
  .inv-transfer-cart-item span,
  .inv-transfer-cart-item small {
    display: block;
    overflow-wrap: anywhere;
  }

  .inv-transfer-cart-item strong { color: #0f172a; font-size: 12px; }
  .inv-transfer-cart-item span { color: #475569; font-size: 11px; font-weight: 800; margin-top: 2px; }
  .inv-transfer-cart-item small { color: #64748b; font-size: 11px; margin-top: 2px; }

  .inv-transfer-cart-item button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: #fee2e2;
    color: #b42318;
  }
}


/* 7.7.1 — Keep Inventory Request Review visible only when its own menu is open. */
.inventory-request-review-section {
  display: none !important;
}
body.inventory-request-review-active .inventory-request-review-section.is-open:not(.hidden) {
  display: block !important;
}

.inventory-request-review-section {
  padding: 20px;
}

.inventory-request-review-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.inventory-request-review-head h1 {
  margin: 0;
  color: #0f2942;
  display: flex;
  align-items: center;
  gap: 9px;
}

.inventory-request-review-head p,
.inventory-request-review-status {
  color: #64748b;
  margin: 4px 0 0;
}

.inventory-request-review-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.inventory-request-review-card,
.inventory-request-empty {
  background: #ffffff;
  border: 1px solid #dbe7f3;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(15, 41, 66, .08);
}

.inventory-request-review-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 10px;
}

.inventory-request-code {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f6f9;
  color: #0b7285;
  font-size: 11px;
  font-weight: 900;
}

.inventory-request-review-card h3 {
  margin: 7px 0 0;
  color: #0f172a;
}

.inventory-request-status {
  background: #fff7ed;
  color: #c2410c;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.inventory-request-review-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 12px 0;
  color: #334155;
  font-size: 12px;
}

.inventory-request-review-items {
  display: grid;
  gap: 7px;
}

.inventory-request-review-item {
  border: 1px solid #edf2f7;
  background: #f8fbfd;
  border-radius: 14px;
  padding: 9px 10px;
}

.inventory-request-review-item strong,
.inventory-request-review-item span,
.inventory-request-review-item small {
  display: block;
}

.inventory-request-review-item strong { color: #0f172a; font-size: 13px; }
.inventory-request-review-item span { color: #475569; font-size: 12px; font-weight: 800; margin-top: 2px; }
.inventory-request-review-item small { color: #64748b; font-size: 11px; margin-top: 2px; }

.inventory-request-review-note {
  margin-top: 11px;
  border-radius: 14px;
  background: #f1f5f9;
  color: #475569;
  padding: 10px;
  font-size: 12px;
  font-weight: 800;
}

.inventory-request-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: #64748b;
  padding: 28px 18px;
}

.inventory-request-empty i { font-size: 34px; color: #94a3b8; }
.inventory-request-empty strong { color: #0f172a; font-size: 16px; }
.inventory-request-empty span { font-size: 12px; }

/* ============================================================
   7.6.9 — Transfer Request source-site auto split
   ============================================================ */
@media (max-width: 900px) {
  .inv-transfer-source-box {
    border: 1px solid #dbe7f3;
    border-radius: 15px;
    background: #f8fbfd;
    padding: 10px;
    margin-bottom: 10px;
  }

  .inv-transfer-source-title {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    color: #0f2942;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 8px;
  }

  .inv-transfer-source-title span {
    flex-shrink: 0;
    background: #e8f6f9;
    color: #0b7285;
    border-radius: 999px;
    padding: 4px 7px;
    font-size: 10px;
    font-weight: 900;
    text-transform: none;
    letter-spacing: 0;
  }

  .inv-transfer-source-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    border: 1px solid #edf2f7;
    background: #fff;
    border-radius: 12px;
    padding: 8px 9px;
    margin-top: 6px;
  }

  .inv-transfer-source-row span {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
  }

  .inv-transfer-source-row strong {
    color: #0f766e;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }

  .inv-transfer-source-hint {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: 0;
  }
}

/* ============================================================
   7.7.1 — Request Review official transfer conversion controls
   ============================================================ */
.inventory-request-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.inventory-request-review-actions .primary-btn {
  min-height: 38px;
  border-radius: 12px;
  font-weight: 900;
}


/* ============================================================
   7.7.3 — Delete wrong pending inventory request
   ============================================================ */
.inventory-request-review-actions .danger-btn {
  min-height: 38px;
  border-radius: 12px;
  font-weight: 900;
  padding: 8px 12px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b91c1c;
  cursor: pointer;
}
.inventory-request-review-actions .danger-btn:hover {
  background: #fee2e2;
}
.inventory-request-review-actions .danger-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
}

/* ============================================================
   7.7.4 — Proper Request Conversion Modal / Designation
   ============================================================ */
.inventory-request-convert-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(15, 23, 42, .58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.inventory-request-convert-backdrop.hidden {
  display: none !important;
}
.inventory-request-convert-modal {
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .35);
  display: flex;
  flex-direction: column;
}
.inventory-request-convert-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
}
.inventory-request-convert-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}
.inventory-request-convert-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}
.inventory-request-convert-close {
  border: 0;
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 12px;
  width: 38px;
  height: 38px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.inventory-request-convert-body {
  padding: 16px 20px;
  overflow: auto;
}
.inventory-request-convert-warning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}
.inventory-request-convert-route {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
  background: #f8fafc;
}
.inventory-request-convert-route-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.inventory-request-convert-route-head strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}
.inventory-request-convert-route-head span {
  display: block;
  color: #00748C;
  font-size: 13px;
  font-weight: 900;
  margin-top: 3px;
}
.inventory-request-convert-route-head em {
  color: #64748b;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.inventory-request-convert-lines {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.inventory-request-convert-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 9px 11px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}
.inventory-request-convert-line strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}
.inventory-request-convert-line small {
  display: block;
  color: #64748b;
  font-size: 11px;
  margin-top: 2px;
}
.inventory-request-convert-line b {
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.inventory-request-convert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.inventory-request-convert-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}
.inventory-request-convert-grid select {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
}
.inventory-request-convert-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}
@media (max-width: 760px) {
  .inventory-request-convert-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .inventory-request-convert-modal {
    width: 100vw;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
  }
  .inventory-request-convert-grid {
    grid-template-columns: 1fr;
  }
  .inventory-request-convert-route-head,
  .inventory-request-convert-line,
  .inventory-request-convert-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .inventory-request-convert-route-head em {
    white-space: normal;
  }
}


/* ============================================================
   7.7.5 — Mobile Transfer Request manual source picker + shopping cart feel
   ============================================================ */
@media (max-width: 900px) {
  .inv-shopping-form,
  .inv-shopping-cart {
    border: 1px solid rgba(15, 41, 66, .10) !important;
    border-radius: 22px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    box-shadow: 0 18px 38px rgba(15, 41, 66, .12) !important;
    overflow: hidden;
  }

  .inv-shopping-form .inv-transfer-request-form-title,
  .inv-shopping-cart .inv-transfer-request-cart-head {
    margin: -12px -12px 12px;
    padding: 13px 14px;
    background: linear-gradient(135deg, #0f766e, #0b7285);
    color: #fff;
  }

  .inv-shopping-form .inv-transfer-request-form-title i,
  .inv-shopping-cart .inv-transfer-request-cart-head i {
    color: #fff;
  }

  .inv-shopping-cart .inv-transfer-request-cart-head strong {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .inv-shopping-cart .inv-transfer-request-cart-head span {
    background: rgba(255,255,255,.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,.22);
  }

  .inv-transfer-source-picker {
    display: grid;
    gap: 8px;
  }

  .inv-transfer-source-card {
    display: grid !important;
    grid-template-columns: 24px 1fr auto;
    gap: 9px;
    align-items: center;
    padding: 10px 11px !important;
    margin: 0 !important;
    border-radius: 15px;
    border: 1px solid #dbe7f3;
    background: #fff;
    box-shadow: 0 6px 16px rgba(15, 41, 66, .05);
    text-transform: none !important;
    letter-spacing: 0 !important;
  }

  .inv-transfer-source-card input {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    accent-color: #0f766e;
  }

  .inv-transfer-source-card span,
  .inv-transfer-source-card strong,
  .inv-transfer-source-card small,
  .inv-transfer-source-card em {
    display: block;
  }

  .inv-transfer-source-card span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .inv-transfer-source-card strong {
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.25;
  }

  .inv-transfer-source-card small {
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    margin-top: 2px;
  }

  .inv-transfer-source-card em {
    min-width: 54px;
    text-align: center;
    padding: 6px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }

  .inv-transfer-source-card.disabled {
    opacity: .55;
    background: #f1f5f9;
  }

  .inv-transfer-source-card.disabled em {
    background: #e2e8f0;
    color: #64748b;
  }

  .inv-shopping-form label:not(.inv-transfer-source-card) {
    color: #0f2942;
    font-size: 11px;
    font-weight: 900;
  }

  .inv-shopping-form input,
  .inv-shopping-form textarea {
    background: #fff !important;
    border-color: #d8e4ef !important;
  }

  .inv-shopping-cart-list {
    display: grid;
    gap: 9px;
  }

  .shop-cart-line {
    grid-template-columns: 30px minmax(0, 1fr) auto 34px !important;
    align-items: center;
    gap: 9px !important;
    padding: 10px !important;
    border-radius: 18px !important;
    background: #fff !important;
    border: 1px solid #e5edf5 !important;
    box-shadow: 0 8px 18px rgba(15, 41, 66, .06);
  }

  .shop-cart-line-index {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f6f9;
    color: #0b7285;
    font-size: 12px;
    font-weight: 900;
  }

  .shop-cart-line-main {
    min-width: 0;
  }

  .shop-cart-line-main strong {
    color: #0f172a;
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
  }

  .shop-cart-line-main span {
    color: #475569;
    font-size: 10px;
    margin-top: 3px;
  }

  .shop-cart-line-main small {
    color: #64748b;
    font-size: 10px;
    line-height: 1.35;
    margin-top: 4px;
  }

  .shop-cart-line-qty {
    text-align: center;
    min-width: 48px;
    padding: 6px 8px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
  }

  .shop-cart-line-qty span {
    color: #64748b;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .shop-cart-line-qty strong {
    color: #0f766e;
    font-size: 13px;
    line-height: 1.1;
    margin-top: 2px;
  }

  .shop-cart-line button {
    background: #fff1f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
  }

  .inv-shopping-cart .inv-transfer-request-cart-actions {
    background: #f8fafc;
    border-radius: 16px;
    padding: 8px;
    margin-top: 12px;
  }

  .inv-shopping-cart .inv-transfer-request-cart-actions .primary-btn {
    background: linear-gradient(135deg, #0f766e, #0b7285) !important;
    box-shadow: 0 12px 22px rgba(15, 118, 110, .22);
  }
}

/* ============================================================
   7.8.0 — Request Review filter / reject polish
   ============================================================ */
.inventory-request-review-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
}
.inventory-request-review-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  color: #334155;
}
.inventory-request-review-toolbar select {
  min-height: 36px;
  border: 1px solid #dbe7f3;
  border-radius: 11px;
  padding: 6px 32px 6px 10px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
}
.inventory-request-review-card.status-converted .inventory-request-status,
.inventory-request-review-note.is-converted {
  background: #ecfdf5;
  color: #047857;
}
.inventory-request-review-card.status-rejected .inventory-request-status,
.inventory-request-review-note.is-rejected {
  background: #fff1f2;
  color: #be123c;
}
.inventory-request-review-actions .secondary-btn.inv-request-reject-btn {
  min-height: 38px;
  border-radius: 12px;
  font-weight: 900;
  padding: 8px 12px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #c2410c;
  cursor: pointer;
}
.inventory-request-review-actions .secondary-btn.inv-request-reject-btn:hover {
  background: #ffedd5;
}

/* 7.8.1 — Inventory Job Records Active / Completed switch */
.inv-job-stage-switch {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin: -4px 0 16px 0;
  padding: 8px;
  border: 1px solid #dbe3ea;
  background: #f8fafc;
  border-radius: 14px;
  width: fit-content;
  max-width: 100%;
}
.inv-stage-btn {
  border: 1px solid #d5dee7;
  background: #ffffff;
  color: #334155;
  border-radius: 12px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.inv-stage-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.10);
}
.inv-stage-btn.active {
  background: #003A5C;
  border-color: #003A5C;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 58, 92, 0.20);
}
.inv-stage-main {
  white-space: nowrap;
}
.inv-stage-count {
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #0f172a;
  font-size: .82rem;
  font-weight: 900;
}
.inv-stage-btn.active .inv-stage-count {
  background: #ffffff;
  color: #003A5C;
}
@media (max-width: 768px) {
  .inv-job-stage-switch {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .inv-stage-btn {
    justify-content: center;
    padding: 10px 8px;
    font-size: .86rem;
  }
  .inv-stage-main {
    white-space: normal;
    text-align: center;
  }
}


/* =====================================================================
   7.8.2 — Mobile Item QR label card
   ===================================================================== */
@media (max-width: 900px) {
  .inv-mobile-qr-label-card {
    margin-top: 12px;
    border: 1px solid #dbe5f3;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
  }
  .inv-mobile-qr-label-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #e8eef8;
  }
  .inv-mobile-qr-label-head strong {
    display: block;
    font-size: 13px;
    color: #0f172a;
  }
  .inv-mobile-qr-label-head span {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #64748b;
  }
  .inv-mobile-qr-label-head button {
    border: 0;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 9px 12px;
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.18);
  }
  .inv-mobile-qr-label-body {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
  }
  .inv-mobile-qr-label-body img {
    width: 94px;
    height: 94px;
    border: 1px solid #d7e3f5;
    border-radius: 14px;
    background: #fff;
    padding: 6px;
    flex: 0 0 auto;
  }
  .inv-mobile-qr-label-body div { min-width: 0; }
  .inv-mobile-qr-label-body span {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .08em;
  }
  .inv-mobile-qr-label-body strong {
    display: block;
    margin-top: 3px;
    font-size: 15px;
    color: #0f172a;
    word-break: break-all;
  }
  .inv-mobile-qr-label-body small {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #64748b;
    line-height: 1.35;
  }
}


/* ============================================================
   7.8.3 — Compact mobile top header
   - Reduces the tall blue Inventory header area on mobile
   - Keeps the module switcher, but removes unnecessary vertical spacing
   - Inventory-only to avoid disturbing other module layouts
   ============================================================ */
@media (max-width: 900px) {
  body.iba-mobile-ui #inventory-view .workdesk-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 72px !important;
    min-height: 72px !important;
    max-height: 72px !important;
    padding: 10px 14px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    border-radius: 0 0 14px 14px !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .16) !important;
    z-index: 1000 !important;
  }

  body.iba-mobile-ui #inventory-view .wd-user-profile,
  body.iba-mobile-ui #inventory-view .wd-back-button,
  body.iba-mobile-ui #inventory-view .workdesk-navigation,
  body.iba-mobile-ui #inventory-view .workdesk-footer-nav {
    display: none !important;
  }

  body.iba-mobile-ui #inventory-view .mobile-module-switcher-wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: auto !important;
    max-width: calc(100% - 100px) !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }

  body.iba-mobile-ui #inventory-view .mobile-module-switcher-label {
    display: none !important;
  }

  body.iba-mobile-ui #inventory-view .mobile-module-switcher-select {
    width: 170px !important;
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 11px !important;
    padding: 7px 12px !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
  }

  body.iba-mobile-ui #inventory-view .version-display,
  body.iba-mobile-ui #inventory-view .sidebar-version-display {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    color: rgba(255,255,255,.78) !important;
    white-space: nowrap !important;
    text-align: right !important;
  }

  body.iba-mobile-ui #inventory-view .workdesk-main {
    padding-top: 78px !important;
  }
}


/* ============================================================
   7.8.5 — Ultra compact mobile Inventory header
   - Places module dropdown and version in one row
   - Removes stacked MODULE label / version spacing
   - Broad selectors are used because some mobile states do not keep body.iba-mobile-ui
   ============================================================ */
@media (max-width: 900px) {
  #inventory-view .workdesk-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    padding: 8px 12px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .14) !important;
    z-index: 1000 !important;
  }

  #inventory-view .wd-user-profile,
  #inventory-view .wd-back-button,
  #inventory-view .workdesk-navigation,
  #inventory-view .workdesk-footer-nav {
    display: none !important;
  }

  #inventory-view .mobile-module-switcher-wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    width: auto !important;
    max-width: calc(100% - 95px) !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    flex: 0 1 auto !important;
  }

  #inventory-view .mobile-module-switcher-label {
    display: none !important;
  }

  #inventory-view .mobile-module-switcher-select {
    width: 152px !important;
    min-height: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    padding: 6px 11px !important;
    font-size: 14px !important;
    line-height: 1.15 !important;
  }

  #inventory-view .inventory-sidebar-version,
  #inventory-view .version-display,
  #inventory-view .sidebar-version-display {
    display: block !important;
    position: static !important;
    flex: 0 0 auto !important;
    margin: 0 2px 0 auto !important;
    padding: 0 !important;
    font-size: 11px !important;
    line-height: 1 !important;
    color: rgba(255,255,255,.78) !important;
    white-space: nowrap !important;
    text-align: right !important;
  }

  #inventory-view .workdesk-main {
    padding-top: 60px !important;
  }
}


/* ============================================================
   7.8.5 — Inventory-mode WorkDesk mobile header compact fix
   - The mobile Item Search / Active Task screens run inside #workdesk-view
     while body has inventory-mode, not inside #inventory-view.
   - This makes Inventory mobile header match the compact design.
   ============================================================ */
@media (max-width: 900px) {
  body.inventory-mode #workdesk-view .workdesk-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    padding: 6px 10px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    border-radius: 0 0 10px 10px !important;
    box-shadow: 0 5px 12px rgba(15, 23, 42, .14) !important;
    z-index: 1000 !important;
  }

  body.inventory-mode #workdesk-view .wd-user-profile,
  body.inventory-mode #workdesk-view .wd-back-button,
  body.inventory-mode #workdesk-view .workdesk-navigation,
  body.inventory-mode #workdesk-view .workdesk-footer-nav {
    display: none !important;
  }

  body.inventory-mode #workdesk-view .sidebar-footer-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 8px !important;
  }

  body.inventory-mode #workdesk-view #workdesk-datetime {
    display: none !important;
  }

  body.inventory-mode #workdesk-view .mobile-module-switcher-wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    max-width: calc(100% - 92px) !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    flex: 0 1 auto !important;
  }

  body.inventory-mode #workdesk-view .mobile-module-switcher-label {
    display: none !important;
  }

  body.inventory-mode #workdesk-view .mobile-module-switcher-select {
    width: 152px !important;
    min-width: 152px !important;
    max-width: 152px !important;
    height: 34px !important;
    min-height: 34px !important;
    border-radius: 10px !important;
    padding: 5px 10px !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
  }

  body.inventory-mode #workdesk-view .version-display,
  body.inventory-mode #workdesk-view .sidebar-version-display {
    display: block !important;
    position: static !important;
    flex: 0 0 auto !important;
    margin: 0 2px 0 auto !important;
    padding: 0 !important;
    font-size: 11px !important;
    line-height: 1 !important;
    color: rgba(255,255,255,.78) !important;
    white-space: nowrap !important;
    text-align: right !important;
  }

  body.inventory-mode #workdesk-view .workdesk-main {
    padding-top: 56px !important;
  }

  body.inventory-mode #workdesk-view .workdesk-section {
    margin-top: 0 !important;
  }
}


/* ============================================================
   7.8.6 — Inventory mobile header/navigation repair
   - Restores the MODULE title label inside the compact Inventory header.
   - Restores the Inventory mobile bottom navigation in #workdesk-view.
   - Keeps the blue Inventory header compact without hiding the bottom nav.
   ============================================================ */
@media (max-width: 900px) {
  body.inventory-mode #workdesk-view .workdesk-sidebar {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    padding: 6px 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: visible !important;
  }

  body.inventory-mode #workdesk-view .sidebar-footer-info {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  body.inventory-mode #workdesk-view .mobile-module-switcher-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    max-width: calc(100% - 88px) !important;
  }

  body.inventory-mode #workdesk-view .mobile-module-switcher-label {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .04em !important;
    color: rgba(226, 232, 240, .92) !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
  }

  body.inventory-mode #workdesk-view .mobile-module-switcher-select {
    width: 138px !important;
    min-width: 138px !important;
    max-width: 138px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 4px 9px !important;
    font-size: 13px !important;
    border-radius: 9px !important;
  }

  body.inventory-mode #workdesk-view .version-display,
  body.inventory-mode #workdesk-view .sidebar-version-display {
    font-size: 10px !important;
    margin-left: auto !important;
    color: rgba(255,255,255,.78) !important;
  }

  /* Restore and control the Inventory mobile bottom nav. */
  body.inventory-mode #workdesk-view #workdesk-nav.workdesk-navigation {
    display: block !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: 56px !important;
    min-height: 56px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    border-top: 1px solid #e5e7eb !important;
    box-shadow: 0 -7px 18px rgba(15, 23, 42, .10) !important;
    z-index: 1200 !important;
    overflow: hidden !important;
  }

  body.inventory-mode #workdesk-view #workdesk-nav > ul {
    display: flex !important;
    align-items: stretch !important;
    justify-content: space-around !important;
    height: 56px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }

  body.inventory-mode #workdesk-view #workdesk-nav li {
    display: none !important;
  }

  body.inventory-mode #workdesk-view #workdesk-nav .wd-nav-activetask,
  body.inventory-mode #workdesk-view #workdesk-nav .wd-nav-inv-mobile-material-search,
  body.inventory-mode #workdesk-view #workdesk-nav .wd-nav-messages-mobile,
  body.inventory-mode #workdesk-view #workdesk-nav .mobile-only-nav-item {
    display: flex !important;
    flex: 1 1 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.inventory-mode #workdesk-view #workdesk-nav a {
    width: 100% !important;
    height: 56px !important;
    padding: 5px 2px 4px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.05 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  body.inventory-mode #workdesk-view #workdesk-nav a i {
    font-size: 18px !important;
    line-height: 1 !important;
    margin: 0 !important;
  }

  body.inventory-mode #workdesk-view #workdesk-nav a.active,
  body.inventory-mode #workdesk-view #workdesk-nav a:hover {
    color: #078197 !important;
    background: transparent !important;
  }

  body.inventory-mode #workdesk-view #workdesk-nav a.active::before {
    content: '';
    position: absolute;
    top: 0;
    width: 36px;
    height: 3px;
    border-radius: 999px;
    background: #078197;
  }

  body.inventory-mode #workdesk-view .workdesk-footer-nav {
    display: none !important;
  }

  body.inventory-mode #workdesk-view .workdesk-main {
    padding-top: 62px !important;
    padding-bottom: 68px !important;
  }
}

/* =====================================================================
   7.8.7 — QR label print actions for thermal label printer + Office/PDF
   ===================================================================== */
@media (max-width: 900px) {
  .inv-mobile-qr-label-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 14px 12px;
  }
  .inv-mobile-qr-label-actions button {
    border: 0;
    border-radius: 14px;
    min-height: 40px;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #0b7285);
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.16);
  }
  .inv-mobile-qr-label-actions button:nth-child(2) {
    background: linear-gradient(135deg, #334155, #0f2942);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.16);
  }
  .inv-mobile-qr-label-note {
    margin: -3px 14px 12px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.35;
    text-align: center;
  }
}


/* =====================================================================
   7.8.8 — QR label card minimized by default
   ===================================================================== */
@media (max-width: 900px) {
  .inv-mobile-qr-label-card.inv-mobile-qr-label-collapsed {
    margin-top: 10px;
    border-radius: 16px;
    border: 1px solid #dbe5f3;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    overflow: hidden;
  }
  .inv-mobile-qr-label-card.inv-mobile-qr-label-collapsed[open] {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  }
  .inv-mobile-qr-label-summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px 10px;
    padding: 11px 14px;
    min-height: 48px;
    user-select: none;
  }
  .inv-mobile-qr-label-summary::-webkit-details-marker {
    display: none;
  }
  .inv-mobile-qr-label-summary span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 900;
    color: #0f172a;
  }
  .inv-mobile-qr-label-summary span i {
    color: #0f766e;
  }
  .inv-mobile-qr-label-summary span em {
    font-style: normal;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #64748b;
    background: #eef6f6;
    border: 1px solid #d1e7e5;
    border-radius: 999px;
    padding: 3px 7px;
  }
  .inv-mobile-qr-label-summary small {
    grid-column: 1 / 2;
    font-size: 11px;
    color: #64748b;
    line-height: 1.25;
  }
  .inv-mobile-qr-label-chevron {
    grid-row: 1 / span 2;
    grid-column: 2 / 3;
    color: #64748b;
    transition: transform .18s ease;
  }
  .inv-mobile-qr-label-card[open] .inv-mobile-qr-label-chevron {
    transform: rotate(180deg);
  }
  .inv-mobile-qr-label-content {
    border-top: 1px solid #e8eef8;
  }
}


/* =====================================================================
   7.9.0 — Mobile page isolation + Item Finder focus repair
   - Keeps Item Finder only inside Inventory > Item Search.
   - Prevents Inventory dynamic sections from leaking into Active Task,
     Invoice/Task, Reporting, or other mobile pages.
   ===================================================================== */
@media (max-width: 900px) {
  body:not(.inventory-mode) #wd-inv-mobile-material-finder,
  body:not(.inventory-mode) #wd-inv-request-review,
  body.inventory-mode:not(.inventory-mobile-finder-active) #wd-inv-mobile-material-finder,
  body.inventory-mode:not(.inventory-request-review-active) #wd-inv-request-review {
    display: none !important;
  }

  body.inventory-mobile-finder-active #wd-inv-mobile-material-finder:not(.hidden) {
    display: block !important;
  }

  body.inventory-request-review-active #wd-inv-request-review:not(.hidden) {
    display: block !important;
  }

  body.inventory-mobile-finder-active #wd-activetask,
  body.inventory-mobile-finder-active #wd-reporting,
  body.inventory-mobile-finder-active #im-reporting,
  body.inventory-request-review-active #wd-activetask,
  body.inventory-request-review-active #wd-reporting,
  body.inventory-request-review-active #im-reporting {
    display: none !important;
  }
}


/* =====================================================================
   7.9.0 — Mobile shell separation guard
   Invoice/Task mobile should not display the desktop dashboard standby as
   the default screen. The mobile landing is WorkDesk Active Task.
   ===================================================================== */
@media (max-width: 900px) {
  body.iba-mobile-ui:not(.inventory-mode) #im-dashboard {
    display: none !important;
  }
}


/* ============================================================
   7.9.3 — Unified mobile module header
   - Makes Invoice/Task, Invoice Records, and Inventory use the
     same compact blue header layout.
   - Keeps MODULE label visible, dropdown clear, and short version
     text at the right (V 7.9.3 from app.js).
   ============================================================ */
@media (max-width: 900px) {
  body.iba-mobile-ui #workdesk-view > .workdesk-sidebar,
  body.inventory-mode #workdesk-view > .workdesk-sidebar,
  body.iba-mobile-ui #inventory-view > .workdesk-sidebar,
  body.iba-mobile-ui #invoice-management-view > .workdesk-sidebar,
  #inventory-view > .workdesk-sidebar,
  #invoice-management-view > .workdesk-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    padding: 6px 8px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    overflow: visible !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .14) !important;
    z-index: 1000 !important;
  }

  body.iba-mobile-ui #workdesk-view > .workdesk-sidebar .wd-user-profile,
  body.iba-mobile-ui #workdesk-view > .workdesk-sidebar .wd-back-button,
  body.iba-mobile-ui #workdesk-view > .workdesk-sidebar .workdesk-footer-nav,
  body.inventory-mode #workdesk-view > .workdesk-sidebar .wd-user-profile,
  body.inventory-mode #workdesk-view > .workdesk-sidebar .wd-back-button,
  body.inventory-mode #workdesk-view > .workdesk-sidebar .workdesk-footer-nav,
  body.iba-mobile-ui #inventory-view > .workdesk-sidebar .wd-user-profile,
  body.iba-mobile-ui #inventory-view > .workdesk-sidebar .wd-back-button,
  body.iba-mobile-ui #inventory-view > .workdesk-sidebar .workdesk-navigation,
  body.iba-mobile-ui #inventory-view > .workdesk-sidebar .workdesk-footer-nav,
  body.iba-mobile-ui #invoice-management-view > .workdesk-sidebar .wd-user-profile,
  body.iba-mobile-ui #invoice-management-view > .workdesk-sidebar .wd-back-button,
  body.iba-mobile-ui #invoice-management-view > .workdesk-sidebar .workdesk-footer-nav,
  body.iba-mobile-ui #invoice-management-view > .workdesk-sidebar #im-datetime {
    display: none !important;
  }

  /* Make the WorkDesk footer holder behave like the direct Inventory/Invoice holders. */
  body.iba-mobile-ui #workdesk-view > .workdesk-sidebar .sidebar-footer-info,
  body.inventory-mode #workdesk-view > .workdesk-sidebar .sidebar-footer-info {
    width: 100% !important;
    height: 52px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.iba-mobile-ui #workdesk-view > .workdesk-sidebar #workdesk-datetime,
  body.inventory-mode #workdesk-view > .workdesk-sidebar #workdesk-datetime {
    display: none !important;
  }

  body.iba-mobile-ui #workdesk-view .mobile-module-switcher-wrap,
  body.inventory-mode #workdesk-view .mobile-module-switcher-wrap,
  body.iba-mobile-ui #inventory-view .mobile-module-switcher-wrap,
  body.iba-mobile-ui #invoice-management-view .mobile-module-switcher-wrap,
  #inventory-view .mobile-module-switcher-wrap,
  #invoice-management-view .mobile-module-switcher-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 3px !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 52px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }

  body.iba-mobile-ui #workdesk-view .mobile-module-switcher-label,
  body.inventory-mode #workdesk-view .mobile-module-switcher-label,
  body.iba-mobile-ui #inventory-view .mobile-module-switcher-label,
  body.iba-mobile-ui #invoice-management-view .mobile-module-switcher-label,
  #inventory-view .mobile-module-switcher-label,
  #invoice-management-view .mobile-module-switcher-label {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .035em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    color: rgba(226, 232, 240, .90) !important;
    white-space: nowrap !important;
  }

  body.iba-mobile-ui #workdesk-view .mobile-module-switcher-select,
  body.inventory-mode #workdesk-view .mobile-module-switcher-select,
  body.iba-mobile-ui #inventory-view .mobile-module-switcher-select,
  body.iba-mobile-ui #invoice-management-view .mobile-module-switcher-select,
  #inventory-view .mobile-module-switcher-select,
  #invoice-management-view .mobile-module-switcher-select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 31px !important;
    min-height: 31px !important;
    border-radius: 8px !important;
    padding: 4px 9px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
  }

  body.iba-mobile-ui #workdesk-view .version-display,
  body.inventory-mode #workdesk-view .version-display,
  body.iba-mobile-ui #inventory-view .version-display,
  body.iba-mobile-ui #invoice-management-view .version-display,
  #inventory-view .version-display,
  #invoice-management-view .version-display,
  body.iba-mobile-ui #workdesk-view .sidebar-version-display,
  body.inventory-mode #workdesk-view .sidebar-version-display,
  body.iba-mobile-ui #inventory-view .sidebar-version-display,
  body.iba-mobile-ui #invoice-management-view .sidebar-version-display,
  #inventory-view .sidebar-version-display,
  #invoice-management-view .sidebar-version-display {
    display: block !important;
    position: static !important;
    flex: 0 0 42px !important;
    width: 42px !important;
    max-width: 42px !important;
    margin: 11px 0 0 0 !important;
    padding: 0 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1.05 !important;
    color: rgba(255,255,255,.76) !important;
    white-space: normal !important;
    text-align: center !important;
  }

  body.iba-mobile-ui #workdesk-view .workdesk-main,
  body.inventory-mode #workdesk-view .workdesk-main,
  body.iba-mobile-ui #inventory-view .workdesk-main,
  body.iba-mobile-ui #invoice-management-view .workdesk-main,
  #inventory-view .workdesk-main,
  #invoice-management-view .workdesk-main {
    padding-top: 70px !important;
  }
}

/* =========================================================
   8.8.4 INVENTORY MAROON SYNC — MODALS, BUTTONS, TABS
   Scope: Inventory UI only.
   Purpose:
   - Force Inventory modal headers/buttons to maroon #4d0000.
   - Fix Material Stock Transfer/Restock/Usage disabled contrast.
   - Sync Inventory Job Records tabs and Active Task tabs to maroon.
   - Sync Inventory Request Review title/header/buttons to maroon.
   ========================================================= */
:root {
    --inv-maroon: #4d0000;
    --inv-maroon-deep: #2b0000;
    --inv-maroon-mid: #650000;
    --inv-maroon-soft: #fff1f1;
    --inv-maroon-border: rgba(77, 0, 0, 0.22);
}

/* Material Stock action buttons: target by ID so old disabled pastel rules cannot win. */
#ms-transfer-action-btn,
#ms-restock-action-btn,
#ms-usage-action-btn,
body.inventory-mode #workdesk-view #ms-transfer-action-btn,
body.inventory-mode #workdesk-view #ms-restock-action-btn,
body.inventory-mode #workdesk-view #ms-usage-action-btn {
    background: linear-gradient(135deg, var(--inv-maroon) 0%, var(--inv-maroon-mid) 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid rgba(77, 0, 0, 0.42) !important;
    border-radius: 14px !important;
    min-height: 40px !important;
    padding: 0 18px !important;
    font-weight: 950 !important;
    box-shadow: 0 8px 18px rgba(77, 0, 0, 0.18) !important;
    opacity: 1 !important;
    filter: none !important;
    text-shadow: none !important;
}
#ms-transfer-action-btn *,
#ms-restock-action-btn *,
#ms-usage-action-btn * {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
    opacity: 1 !important;
    filter: none !important;
}
#ms-transfer-action-btn:disabled,
#ms-transfer-action-btn[disabled],
#ms-restock-action-btn:disabled,
#ms-restock-action-btn[disabled],
#ms-usage-action-btn:disabled,
#ms-usage-action-btn[disabled],
body.inventory-mode #workdesk-view #ms-transfer-action-btn:disabled,
body.inventory-mode #workdesk-view #ms-restock-action-btn:disabled,
body.inventory-mode #workdesk-view #ms-usage-action-btn:disabled {
    background: linear-gradient(135deg, #fff8f8 0%, #f3e6e6 100%) !important;
    color: var(--inv-maroon) !important;
    -webkit-text-fill-color: var(--inv-maroon) !important;
    border: 1px solid rgba(77, 0, 0, 0.32) !important;
    box-shadow: none !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
    filter: none !important;
}
#ms-transfer-action-btn:disabled *,
#ms-transfer-action-btn[disabled] *,
#ms-restock-action-btn:disabled *,
#ms-restock-action-btn[disabled] *,
#ms-usage-action-btn:disabled *,
#ms-usage-action-btn[disabled] * {
    color: var(--inv-maroon) !important;
    -webkit-text-fill-color: var(--inv-maroon) !important;
    opacity: 1 !important;
}

/* Inventory modal headers: direct IDs, not dependent only on body.inventory-mode. */
#ms-report-modal .modal-header,
#ms-requestlist-modal .modal-header,
#ms-new-material-modal .modal-header,
#ms-photo-browser-modal .modal-header,
#ms-add-stock-modal .modal-header,
#transfer-job-modal .modal-header,
#transfer-approval-modal .modal-header,
.inventory-themed-modal .modal-header {
    background:
        radial-gradient(circle at 92% 8%, rgba(255,255,255,0.16), transparent 30%),
        linear-gradient(135deg, var(--inv-maroon-deep) 0%, var(--inv-maroon) 58%, var(--inv-maroon-mid) 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 241, 241, 0.30) !important;
    box-shadow: 0 12px 26px rgba(43, 0, 0, 0.22) !important;
}
#ms-report-modal .modal-header *,
#ms-requestlist-modal .modal-header *,
#ms-new-material-modal .modal-header *,
#ms-photo-browser-modal .modal-header *,
#ms-add-stock-modal .modal-header *,
#transfer-job-modal .modal-header *,
#transfer-approval-modal .modal-header *,
.inventory-themed-modal .modal-header * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
}

/* Inventory modal content/forms/tables/button sync. */
#ms-report-modal .modal-container,
#ms-requestlist-modal .modal-container,
#ms-new-material-modal .modal-container,
#ms-photo-browser-modal .modal-container,
#ms-add-stock-modal .modal-container,
#transfer-job-modal .modal-container,
#transfer-approval-modal .modal-container,
.inventory-themed-modal .modal-container {
    border-color: rgba(77, 0, 0, 0.18) !important;
    box-shadow: 0 30px 75px rgba(43, 0, 0, 0.24), inset 0 1px 0 rgba(255,255,255,0.80) !important;
}
#ms-report-modal table thead,
#ms-report-modal table thead tr,
#ms-report-modal table thead th,
#ms-requestlist-modal table thead,
#ms-requestlist-modal table thead tr,
#ms-requestlist-modal table thead th,
#transfer-job-modal table thead,
#transfer-job-modal table thead tr,
#transfer-job-modal table thead th,
#transfer-approval-modal table thead,
#transfer-approval-modal table thead tr,
#transfer-approval-modal table thead th,
.inventory-themed-modal table thead,
.inventory-themed-modal table thead tr,
.inventory-themed-modal table thead th {
    background: var(--inv-maroon) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: rgba(255, 241, 241, 0.25) !important;
}
#ms-report-modal table,
#ms-requestlist-modal table,
#transfer-job-modal table,
#transfer-approval-modal table,
.inventory-themed-modal table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}
#ms-report-modal .modal-footer button,
#ms-requestlist-modal .modal-footer button,
#ms-new-material-modal .modal-footer button,
#ms-photo-browser-modal .modal-footer button,
#ms-add-stock-modal .modal-footer button,
#transfer-job-modal .modal-footer button,
#transfer-approval-modal .modal-footer button,
.inventory-themed-modal .modal-footer button,
.inventory-themed-modal .primary-btn,
.inventory-themed-modal .download-btn,
.inventory-themed-modal .print-btn,
.inventory-themed-modal button[id*="save"],
.inventory-themed-modal button[id*="print"],
.inventory-themed-modal button[id*="excel"],
#tf-save-btn,
#transfer-modal-approve-btn,
#ms-save-material-btn,
#ms-modal-print-btn,
#ms-modal-excel-btn,
#ms-requestlist-print-btn,
#ms-requestlist-add-manual-btn {
    background: linear-gradient(135deg, var(--inv-maroon) 0%, var(--inv-maroon-mid) 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid rgba(255, 241, 241, 0.36) !important;
    border-radius: 12px !important;
    font-weight: 900 !important;
    box-shadow: 0 10px 20px rgba(43, 0, 0, 0.16) !important;
}
.inventory-themed-modal .secondary-btn:not(.delete-btn),
#transfer-job-modal .secondary-btn:not(.delete-btn),
#transfer-approval-modal .secondary-btn:not(.delete-btn),
#ms-new-material-modal .secondary-btn:not(.delete-btn),
#ms-report-modal .secondary-btn:not(.delete-btn),
#ms-requestlist-modal .secondary-btn:not(.delete-btn) {
    background: #fff8f8 !important;
    color: var(--inv-maroon) !important;
    -webkit-text-fill-color: var(--inv-maroon) !important;
    border: 1px solid rgba(77, 0, 0, 0.24) !important;
    box-shadow: 0 8px 18px rgba(43, 0, 0, 0.06) !important;
}
.inventory-themed-modal .delete-btn,
.inventory-themed-modal button[id*="delete"],
.inventory-themed-modal button[id*="reject"] {
    background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}
#transfer-job-modal label,
#transfer-approval-modal label,
#ms-new-material-modal label,
#ms-add-stock-modal label,
#ms-photo-browser-modal label,
#ms-report-modal strong,
#ms-requestlist-modal strong,
.inventory-themed-modal label,
.inventory-themed-modal strong {
    color: var(--inv-maroon) !important;
    -webkit-text-fill-color: var(--inv-maroon) !important;
}
#transfer-job-modal input:focus,
#transfer-job-modal select:focus,
#transfer-job-modal textarea:focus,
#transfer-approval-modal input:focus,
#transfer-approval-modal select:focus,
#transfer-approval-modal textarea:focus,
#ms-new-material-modal input:focus,
#ms-new-material-modal select:focus,
#ms-new-material-modal textarea:focus,
#ms-add-stock-modal input:focus,
#ms-add-stock-modal select:focus,
#ms-add-stock-modal textarea:focus,
.inventory-themed-modal input:focus,
.inventory-themed-modal select:focus,
.inventory-themed-modal textarea:focus {
    border-color: var(--inv-maroon) !important;
    box-shadow: 0 0 0 4px rgba(77,0,0,0.12), 0 8px 18px rgba(43,0,0,0.10) !important;
    outline: none !important;
}

/* Inventory Job Records stage switch: Active Jobs / Completed Closed. */
body.inventory-mode #inventory-job-records-stage-switch,
#inventory-job-records-stage-switch {
    background: rgba(255, 248, 248, 0.92) !important;
    border: 1px solid rgba(77, 0, 0, 0.16) !important;
    border-radius: 18px !important;
    padding: 8px !important;
    box-shadow: 0 10px 24px rgba(43, 0, 0, 0.06) !important;
}
body.inventory-mode .inv-stage-btn,
#inventory-job-records-stage-switch .inv-stage-btn {
    background: #fffafa !important;
    color: var(--inv-maroon) !important;
    -webkit-text-fill-color: var(--inv-maroon) !important;
    border: 1px solid rgba(77, 0, 0, 0.22) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}
body.inventory-mode .inv-stage-btn.active,
#inventory-job-records-stage-switch .inv-stage-btn.active {
    background: linear-gradient(135deg, var(--inv-maroon) 0%, var(--inv-maroon-mid) 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: rgba(77, 0, 0, 0.45) !important;
    box-shadow: 0 10px 22px rgba(43, 0, 0, 0.18) !important;
}
body.inventory-mode .inv-stage-btn.active *,
#inventory-job-records-stage-switch .inv-stage-btn.active * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}
body.inventory-mode .inv-stage-count,
#inventory-job-records-stage-switch .inv-stage-count {
    background: #fff1f1 !important;
    color: var(--inv-maroon) !important;
    -webkit-text-fill-color: var(--inv-maroon) !important;
}
body.inventory-mode .inv-stage-btn.active .inv-stage-count,
#inventory-job-records-stage-switch .inv-stage-btn.active .inv-stage-count {
    background: #ffffff !important;
    color: var(--inv-maroon) !important;
    -webkit-text-fill-color: var(--inv-maroon) !important;
}

/* Inventory Active Task tabs: maroon only while in inventory mode. */
body.inventory-mode #wd-activetask #active-task-filters.report-tabs {
    background: rgba(255, 248, 248, 0.92) !important;
    border: 1px solid rgba(77, 0, 0, 0.16) !important;
    border-radius: 18px !important;
}
body.inventory-mode #wd-activetask #active-task-filters.report-tabs button:not(.active),
body.inventory-mode #wd-activetask #active-task-filters.report-tabs button.blink-tab:not(.active) {
    background: #fffafa !important;
    color: var(--inv-maroon) !important;
    -webkit-text-fill-color: var(--inv-maroon) !important;
    border: 1px solid rgba(77, 0, 0, 0.20) !important;
    box-shadow: 0 8px 18px rgba(43, 0, 0, 0.06) !important;
}
body.inventory-mode #wd-activetask #active-task-filters.report-tabs button.active {
    background: linear-gradient(135deg, var(--inv-maroon) 0%, var(--inv-maroon-mid) 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: rgba(77, 0, 0, 0.45) !important;
    box-shadow: 0 12px 26px rgba(43, 0, 0, 0.20) !important;
}
body.inventory-mode #wd-activetask #active-task-filters.report-tabs button.active *,
body.inventory-mode #wd-activetask #active-task-filters.report-tabs button.active .notification-badge {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Inventory Request Review section title/header/buttons. */
body.inventory-mode #wd-inv-request-review .inventory-request-review-head,
#wd-inv-request-review .inventory-request-review-head {
    background:
        radial-gradient(circle at 88% 16%, rgba(122,17,17,0.26), transparent 32%),
        linear-gradient(135deg, var(--inv-maroon-deep) 0%, var(--inv-maroon) 58%, var(--inv-maroon-mid) 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 241, 241, 0.24) !important;
    border-radius: 24px !important;
    padding: 22px 26px !important;
    box-shadow: 0 22px 48px rgba(43, 0, 0, 0.18) !important;
}
body.inventory-mode #wd-inv-request-review .inventory-request-review-head h1,
#wd-inv-request-review .inventory-request-review-head h1 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(20,0,0,0.35) !important;
}
body.inventory-mode #wd-inv-request-review .inventory-request-review-head p,
#wd-inv-request-review .inventory-request-review-head p {
    color: #ffe3e3 !important;
    -webkit-text-fill-color: #ffe3e3 !important;
}
body.inventory-mode #wd-inv-request-review #inv-request-review-refresh,
#wd-inv-request-review #inv-request-review-refresh,
body.inventory-mode #wd-inv-request-review .primary-btn,
#wd-inv-request-review .primary-btn {
    background: #ffffff !important;
    color: var(--inv-maroon) !important;
    -webkit-text-fill-color: var(--inv-maroon) !important;
    border: 1px solid rgba(255, 241, 241, 0.45) !important;
    border-radius: 14px !important;
    font-weight: 900 !important;
}
body.inventory-mode #wd-inv-request-review .inventory-request-review-toolbar,
#wd-inv-request-review .inventory-request-review-toolbar,
body.inventory-mode #wd-inv-request-review .inventory-request-review-list,
#wd-inv-request-review .inventory-request-review-list {
    border-color: rgba(77, 0, 0, 0.16) !important;
    background: #fffafa !important;
}
body.inventory-mode #wd-inv-request-review .inventory-request-review-card,
#wd-inv-request-review .inventory-request-review-card {
    border-color: rgba(77, 0, 0, 0.16) !important;
    box-shadow: 0 10px 24px rgba(43, 0, 0, 0.06) !important;
}



/* =====================================================================
   8.9.4 — Mobile welcome launcher cleanup
   Scope: first mobile landing/welcome screen only.
   - Hide the desktop welcome hero/time/quote panel on phones.
   - Show only the two mobile modules the team uses: Invoice and Inventory.
   - Keep the module buttons clear, readable, and finger-friendly.
   ===================================================================== */
@media (max-width: 900px) {
    body.iba-mobile-ui #dashboard-view,
    #dashboard-view.mobile-view {
        padding: 12px !important;
        min-height: calc(100dvh - 24px) !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }

    body.iba-mobile-ui #dashboard-view .cyber-dashboard-card,
    #dashboard-view.mobile-view .cyber-dashboard-card {
        width: 100% !important;
        max-width: 520px !important;
        margin: 0 auto !important;
        padding: 14px !important;
        border-radius: 24px !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-premium-hero,
    body.iba-mobile-ui #dashboard-view .welcome-premium-panel,
    body.iba-mobile-ui #dashboard-view .welcome-quote-row,
    body.iba-mobile-ui #dashboard-view .welcome-eyebrow,
    body.iba-mobile-ui #dashboard-view .welcome-person-line,
    #dashboard-view.mobile-view .welcome-premium-hero,
    #dashboard-view.mobile-view .welcome-premium-panel,
    #dashboard-view.mobile-view .welcome-quote-row,
    #dashboard-view.mobile-view .welcome-eyebrow,
    #dashboard-view.mobile-view .welcome-person-line {
        display: none !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-grid,
    #dashboard-view.mobile-view .welcome-module-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.iba-mobile-ui #dashboard-view #workdesk-button,
    body.iba-mobile-ui #dashboard-view #requisition-button,
    body.iba-mobile-ui #dashboard-view #finance-report-button,
    body.iba-mobile-ui #dashboard-view #po-system-button,
    #dashboard-view.mobile-view #workdesk-button,
    #dashboard-view.mobile-view #requisition-button,
    #dashboard-view.mobile-view #finance-report-button,
    #dashboard-view.mobile-view #po-system-button {
        display: none !important;
    }

    body.iba-mobile-ui #dashboard-view #invoice-mgmt-button,
    body.iba-mobile-ui #dashboard-view #inventory-button,
    #dashboard-view.mobile-view #invoice-mgmt-button,
    #dashboard-view.mobile-view #inventory-button {
        display: grid !important;
        grid-template-columns: 52px minmax(0, 1fr) auto !important;
        min-height: 96px !important;
        width: 100% !important;
        padding: 16px !important;
        border-radius: 22px !important;
        border: 1px solid rgba(226, 232, 240, .18) !important;
        box-shadow: 0 14px 30px rgba(2, 6, 23, .22), inset 0 1px 0 rgba(255,255,255,.08) !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }

    body.iba-mobile-ui #dashboard-view #invoice-mgmt-button,
    #dashboard-view.mobile-view #invoice-mgmt-button {
        background:
            radial-gradient(circle at 96% 0%, rgba(255,255,255,.16), transparent 34%),
            linear-gradient(135deg, #073d2b, #116045 62%, #1c7a59) !important;
    }

    body.iba-mobile-ui #dashboard-view #inventory-button,
    #dashboard-view.mobile-view #inventory-button {
        background:
            radial-gradient(circle at 96% 0%, rgba(255,255,255,.16), transparent 34%),
            linear-gradient(135deg, #2a0000, #4d0000 62%, #7a1010) !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-card::before,
    #dashboard-view.mobile-view .welcome-module-card::before {
        width: 5px !important;
        border-radius: 999px !important;
        top: 14px !important;
        bottom: 14px !important;
        inset: 14px auto 14px 0 !important;
        background: rgba(255,255,255,.82) !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-icon,
    #dashboard-view.mobile-view .welcome-module-icon {
        width: 52px !important;
        height: 52px !important;
        border-radius: 17px !important;
        background: rgba(255,255,255,.14) !important;
        border: 1px solid rgba(255,255,255,.22) !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        box-shadow: none !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-text strong,
    body.iba-mobile-ui #dashboard-view .welcome-module-text em,
    body.iba-mobile-ui #dashboard-view .welcome-module-open,
    body.iba-mobile-ui #dashboard-view .welcome-module-open i,
    #dashboard-view.mobile-view .welcome-module-text strong,
    #dashboard-view.mobile-view .welcome-module-text em,
    #dashboard-view.mobile-view .welcome-module-open,
    #dashboard-view.mobile-view .welcome-module-open i {
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        opacity: 1 !important;
        text-shadow: none !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-text strong,
    #dashboard-view.mobile-view .welcome-module-text strong {
        font-size: 1.06rem !important;
        font-weight: 950 !important;
        line-height: 1.1 !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-text em,
    #dashboard-view.mobile-view .welcome-module-text em {
        margin-top: 4px !important;
        font-size: .82rem !important;
        line-height: 1.25 !important;
        color: rgba(255,255,255,.86) !important;
        -webkit-text-fill-color: rgba(255,255,255,.86) !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-open,
    #dashboard-view.mobile-view .welcome-module-open {
        height: 34px !important;
        padding: 0 10px !important;
        border-radius: 999px !important;
        background: rgba(255,255,255,.16) !important;
        border: 1px solid rgba(255,255,255,.22) !important;
        white-space: nowrap !important;
    }
}

/* =====================================================================
   8.9.6 — Mobile welcome launcher fit cleanup
   Scope: first mobile landing/welcome screen only.
   - Prevent the two module buttons from being cut off on narrow phones.
   - Force the welcome launcher/card to use border-box sizing.
   - Keep only Invoice Management and Inventory visible from 8.9.4.
   ===================================================================== */
@media (max-width: 900px) {
    html,
    body,
    body.iba-mobile-ui {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    body.iba-mobile-ui #dashboard-view,
    #dashboard-view.mobile-view {
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
        padding: 10px !important;
        box-sizing: border-box !important;
    }

    body.iba-mobile-ui #dashboard-view .cyber-dashboard-card,
    #dashboard-view.mobile-view .cyber-dashboard-card {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        min-width: 0 !important;
        margin: 0 auto !important;
        padding: 12px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        border-radius: 22px !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-grid,
    #dashboard-view.mobile-view .welcome-module-grid {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        gap: 12px !important;
    }

    body.iba-mobile-ui #dashboard-view #invoice-mgmt-button,
    body.iba-mobile-ui #dashboard-view #inventory-button,
    #dashboard-view.mobile-view #invoice-mgmt-button,
    #dashboard-view.mobile-view #inventory-button {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        display: grid !important;
        grid-template-columns: 48px minmax(0, 1fr) !important;
        grid-template-areas:
            "icon text"
            ". open" !important;
        column-gap: 12px !important;
        row-gap: 10px !important;
        align-items: center !important;
        padding: 14px 14px 14px 18px !important;
        overflow: hidden !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-card::before,
    #dashboard-view.mobile-view .welcome-module-card::before {
        left: 0 !important;
        right: auto !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-icon,
    #dashboard-view.mobile-view .welcome-module-icon {
        grid-area: icon !important;
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-text,
    #dashboard-view.mobile-view .welcome-module-text {
        grid-area: text !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-text strong,
    body.iba-mobile-ui #dashboard-view .welcome-module-text em,
    #dashboard-view.mobile-view .welcome-module-text strong,
    #dashboard-view.mobile-view .welcome-module-text em {
        display: block !important;
        max-width: 100% !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-open,
    #dashboard-view.mobile-view .welcome-module-open {
        grid-area: open !important;
        justify-self: start !important;
        width: auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* =====================================================================
   9.0.3 — Mobile welcome launcher premium fit cleanup
   Scope: first mobile landing/welcome screen only.
   - Make the Invoice / Inventory launcher feel like a mobile app menu.
   - Keep both rounded module boxes fully inside the phone width.
   - Remove any right-side clipping from the welcome panel/cards.
   ===================================================================== */
@media (max-width: 900px) {
    body.iba-mobile-ui,
    body.iba-mobile-ui * {
        box-sizing: border-box !important;
    }

    body.iba-mobile-ui #dashboard-view,
    #dashboard-view.mobile-view {
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        min-height: 100dvh !important;
        padding: 12px !important;
        overflow-x: hidden !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }

    body.iba-mobile-ui #dashboard-view .cyber-dashboard-card,
    #dashboard-view.mobile-view .cyber-dashboard-card {
        width: 100% !important;
        max-width: 430px !important;
        min-width: 0 !important;
        margin: 0 auto !important;
        padding: 14px !important;
        overflow: hidden !important;
        border-radius: 28px !important;
        border: 1px solid rgba(148, 163, 184, 0.28) !important;
        box-shadow: 0 22px 48px rgba(2, 6, 23, 0.22) !important;
    }

    body.iba-mobile-ui #dashboard-view .dashboard-main,
    body.iba-mobile-ui #dashboard-view .welcome-premium-main,
    #dashboard-view.mobile-view .dashboard-main,
    #dashboard-view.mobile-view .welcome-premium-main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-grid,
    #dashboard-view.mobile-view .welcome-module-grid {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    body.iba-mobile-ui #dashboard-view #invoice-mgmt-button,
    body.iba-mobile-ui #dashboard-view #inventory-button,
    #dashboard-view.mobile-view #invoice-mgmt-button,
    #dashboard-view.mobile-view #inventory-button {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        transform: none !important;
        margin: 0 !important;
        border-radius: 24px !important;
        overflow: hidden !important;
        display: grid !important;
        grid-template-columns: 54px minmax(0, 1fr) !important;
        grid-template-areas:
            "icon text"
            "icon open" !important;
        column-gap: 14px !important;
        row-gap: 10px !important;
        align-items: center !important;
        padding: 18px 18px 18px 20px !important;
        min-height: 126px !important;
        border: 1px solid rgba(255,255,255,0.14) !important;
        box-shadow: 0 18px 38px rgba(2, 6, 23, 0.20), inset 0 1px 0 rgba(255,255,255,0.11) !important;
    }

    body.iba-mobile-ui #dashboard-view #invoice-mgmt-button {
        background:
            radial-gradient(circle at 100% 8%, rgba(255,255,255,.16), transparent 34%),
            linear-gradient(135deg, #073d2b 0%, #116045 62%, #208461 100%) !important;
    }

    body.iba-mobile-ui #dashboard-view #inventory-button {
        background:
            radial-gradient(circle at 100% 8%, rgba(255,255,255,.14), transparent 34%),
            linear-gradient(135deg, #2b0000 0%, #4d0000 62%, #7a1111 100%) !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-card::before,
    #dashboard-view.mobile-view .welcome-module-card::before {
        content: "" !important;
        position: absolute !important;
        left: 0 !important;
        top: 18px !important;
        bottom: 18px !important;
        width: 4px !important;
        border-radius: 0 999px 999px 0 !important;
        background: rgba(255, 255, 255, 0.82) !important;
        pointer-events: none !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-icon,
    #dashboard-view.mobile-view .welcome-module-icon {
        grid-area: icon !important;
        width: 54px !important;
        height: 54px !important;
        min-width: 54px !important;
        border-radius: 18px !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-text,
    #dashboard-view.mobile-view .welcome-module-text {
        grid-area: text !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-text strong,
    #dashboard-view.mobile-view .welcome-module-text strong {
        display: block !important;
        max-width: 100% !important;
        font-size: 1.08rem !important;
        line-height: 1.12 !important;
        overflow-wrap: anywhere !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-text em,
    #dashboard-view.mobile-view .welcome-module-text em {
        display: block !important;
        max-width: 100% !important;
        font-size: .82rem !important;
        line-height: 1.28 !important;
        overflow-wrap: anywhere !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-open,
    #dashboard-view.mobile-view .welcome-module-open {
        grid-area: open !important;
        justify-self: start !important;
        align-self: center !important;
        max-width: 100% !important;
        height: 36px !important;
        padding: 0 14px !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 380px) {
    body.iba-mobile-ui #dashboard-view,
    #dashboard-view.mobile-view {
        padding: 8px !important;
    }

    body.iba-mobile-ui #dashboard-view .cyber-dashboard-card,
    #dashboard-view.mobile-view .cyber-dashboard-card {
        padding: 12px !important;
        border-radius: 24px !important;
    }

    body.iba-mobile-ui #dashboard-view #invoice-mgmt-button,
    body.iba-mobile-ui #dashboard-view #inventory-button,
    #dashboard-view.mobile-view #invoice-mgmt-button,
    #dashboard-view.mobile-view #inventory-button {
        grid-template-columns: 48px minmax(0, 1fr) !important;
        column-gap: 12px !important;
        padding: 16px 14px 16px 18px !important;
        min-height: 120px !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-icon,
    #dashboard-view.mobile-view .welcome-module-icon {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
    }
}

/* =====================================================================
   9.0.4 — Mobile welcome square app-tile launcher
   Scope: first mobile landing/welcome screen only.
   - Change Invoice / Inventory launcher from long rectangle cards to
     square mobile-app style tiles.
   - Keep only the two mobile modules visible and prevent right clipping.
   ===================================================================== */
@media (max-width: 900px) {
    body.iba-mobile-ui #dashboard-view,
    #dashboard-view.mobile-view {
        padding: 14px !important;
        overflow-x: hidden !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }

    body.iba-mobile-ui #dashboard-view .cyber-dashboard-card,
    #dashboard-view.mobile-view .cyber-dashboard-card {
        width: min(100%, 430px) !important;
        max-width: calc(100vw - 28px) !important;
        margin: 0 auto !important;
        padding: 18px !important;
        overflow: hidden !important;
        border-radius: 30px !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-grid,
    #dashboard-view.mobile-view .welcome-module-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 12px 0 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    body.iba-mobile-ui #dashboard-view #invoice-mgmt-button,
    body.iba-mobile-ui #dashboard-view #inventory-button,
    #dashboard-view.mobile-view #invoice-mgmt-button,
    #dashboard-view.mobile-view #inventory-button {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        aspect-ratio: 1 / 1 !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 16px 12px !important;
        border-radius: 24px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        text-align: center !important;
        transform: none !important;
        overflow: hidden !important;
        box-shadow: 0 18px 34px rgba(2, 6, 23, 0.20), inset 0 1px 0 rgba(255,255,255,0.14) !important;
    }

    body.iba-mobile-ui #dashboard-view #invoice-mgmt-button,
    #dashboard-view.mobile-view #invoice-mgmt-button {
        background:
            radial-gradient(circle at 88% 12%, rgba(255,255,255,.22), transparent 34%),
            linear-gradient(135deg, #0a3a2b 0%, #116045 58%, #2b8b67 100%) !important;
    }

    body.iba-mobile-ui #dashboard-view #inventory-button,
    #dashboard-view.mobile-view #inventory-button {
        background:
            radial-gradient(circle at 88% 12%, rgba(255,255,255,.18), transparent 34%),
            linear-gradient(135deg, #2b0000 0%, #4d0000 58%, #8a1515 100%) !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-card::before,
    #dashboard-view.mobile-view .welcome-module-card::before {
        display: none !important;
        content: none !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-icon,
    #dashboard-view.mobile-view .welcome-module-icon {
        grid-area: unset !important;
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        border-radius: 18px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(255,255,255,0.16) !important;
        border: 1px solid rgba(255,255,255,0.25) !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        box-shadow: none !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-icon i,
    #dashboard-view.mobile-view .welcome-module-icon i {
        font-size: 23px !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-text,
    #dashboard-view.mobile-view .welcome-module-text {
        grid-area: unset !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        display: block !important;
        overflow: hidden !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-text strong,
    #dashboard-view.mobile-view .welcome-module-text strong {
        display: block !important;
        font-size: 0.96rem !important;
        line-height: 1.08 !important;
        font-weight: 950 !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        text-align: center !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-text em,
    #dashboard-view.mobile-view .welcome-module-text em {
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        max-width: 100% !important;
        margin: 6px auto 0 !important;
        font-size: 0.68rem !important;
        line-height: 1.18 !important;
        font-style: normal !important;
        font-weight: 750 !important;
        text-align: center !important;
        color: rgba(255,255,255,0.86) !important;
        -webkit-text-fill-color: rgba(255,255,255,0.86) !important;
        overflow: hidden !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-open,
    #dashboard-view.mobile-view .welcome-module-open {
        grid-area: unset !important;
        align-self: center !important;
        justify-self: center !important;
        width: auto !important;
        max-width: 100% !important;
        height: 30px !important;
        min-height: 30px !important;
        padding: 0 12px !important;
        border-radius: 999px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        font-size: 0.72rem !important;
        font-weight: 950 !important;
        background: rgba(255,255,255,0.16) !important;
        border: 1px solid rgba(255,255,255,0.24) !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 380px) {
    body.iba-mobile-ui #dashboard-view .welcome-module-grid,
    #dashboard-view.mobile-view .welcome-module-grid {
        gap: 12px !important;
    }

    body.iba-mobile-ui #dashboard-view .cyber-dashboard-card,
    #dashboard-view.mobile-view .cyber-dashboard-card {
        padding: 14px !important;
        border-radius: 26px !important;
    }

    body.iba-mobile-ui #dashboard-view #invoice-mgmt-button,
    body.iba-mobile-ui #dashboard-view #inventory-button,
    #dashboard-view.mobile-view #invoice-mgmt-button,
    #dashboard-view.mobile-view #inventory-button {
        border-radius: 22px !important;
        padding: 14px 10px !important;
        gap: 8px !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-icon,
    #dashboard-view.mobile-view .welcome-module-icon {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        border-radius: 16px !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-text strong,
    #dashboard-view.mobile-view .welcome-module-text strong {
        font-size: 0.86rem !important;
    }

    body.iba-mobile-ui #dashboard-view .welcome-module-text em,
    #dashboard-view.mobile-view .welcome-module-text em {
        font-size: 0.62rem !important;
    }
}


/* =====================================================================
   9.0.5 — Mobile welcome tiles: title only
   Scope: first mobile landing/welcome screen only.
   - Keep the square app tiles.
   - Show only the module names: Invoice Management and Inventory.
   - Hide mobile-only descriptions and Open pills to avoid clutter/cutoff.
   ===================================================================== */
@media (max-width: 900px) {
    body.iba-mobile-ui #dashboard-view #invoice-mgmt-button .welcome-module-text em,
    body.iba-mobile-ui #dashboard-view #inventory-button .welcome-module-text em,
    #dashboard-view.mobile-view #invoice-mgmt-button .welcome-module-text em,
    #dashboard-view.mobile-view #inventory-button .welcome-module-text em,
    body.iba-mobile-ui #dashboard-view #invoice-mgmt-button .welcome-module-open,
    body.iba-mobile-ui #dashboard-view #inventory-button .welcome-module-open,
    #dashboard-view.mobile-view #invoice-mgmt-button .welcome-module-open,
    #dashboard-view.mobile-view #inventory-button .welcome-module-open {
        display: none !important;
        visibility: hidden !important;
    }

    body.iba-mobile-ui #dashboard-view #invoice-mgmt-button,
    body.iba-mobile-ui #dashboard-view #inventory-button,
    #dashboard-view.mobile-view #invoice-mgmt-button,
    #dashboard-view.mobile-view #inventory-button {
        gap: 14px !important;
        padding: 18px 12px !important;
    }

    body.iba-mobile-ui #dashboard-view #invoice-mgmt-button .welcome-module-text strong,
    body.iba-mobile-ui #dashboard-view #inventory-button .welcome-module-text strong,
    #dashboard-view.mobile-view #invoice-mgmt-button .welcome-module-text strong,
    #dashboard-view.mobile-view #inventory-button .welcome-module-text strong {
        font-size: clamp(0.92rem, 3.5vw, 1.08rem) !important;
        line-height: 1.12 !important;
        letter-spacing: -0.01em !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
}
