:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --nav: #0f172a;
  --border: #e5e7eb;
  --success: #16a34a;
  --danger: #dc2626;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
button, input, select, textarea {
  font: inherit;
}
.container {
  max-width: 1050px;
  margin: 0 auto;
  padding: 16px;
}
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.auth-card, .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 24px;
}
.logo {
  width: 220px;
  max-width: 100%;
  display: block;
  margin: 0 auto 18px;
}
.h1 { font-size: 28px; font-weight: 800; margin: 0 0 8px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
textarea { min-height: 88px; resize: vertical; }
.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--nav); color: white; }
.btn-light { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: white; }
.topbar {
  background: var(--nav);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar-inner {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { width: 50px; height: 50px; object-fit: contain; border-radius: 12px; background: white; }
.brand-title { font-weight: 800; font-size: 20px; }
.grid {
  display: grid;
  gap: 16px;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.summary-card { padding: 18px; }
.summary-card h3 { margin: 0 0 8px; }
.summary-card .num { font-size: 28px; font-weight: 800; }
.page-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 20px 0 14px; }
.section-title { margin: 0; font-size: 24px; font-weight: 800; }
.tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 6px;
}
.tab {
  padding: 10px 14px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
}
.tab.active { background: var(--accent); color: white; border-color: var(--accent); }
.panel { padding: 16px; }
.table-wrap { overflow: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}
.table th, .table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table th { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-ok { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-returned { background: #fee2e2; color: #991b1b; }
.badge-pickup { background: #dbeafe; color: #1d4ed8; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stack { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; }
.footer-note { font-size: 12px; color: var(--muted); margin-top: 12px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.hidden { display: none !important; }
@media print {
  .topbar, .tabs, .page-title button, .no-print { display: none !important; }
  body { background: white; }
  .card { box-shadow: none; border: 0; }
}

.field-actions-inline{display:flex;align-items:end}.field-actions-inline .btn{width:100%}

.items-header-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.stop-item{border:1px solid var(--border);border-radius:16px;padding:14px;margin:12px 0;background:#0f172a08}
.stop-item-grid{align-items:end}


.btn-small { padding: 8px 10px; font-size: 12px; }
.report-card { background: #fff; color: #111; }
.report-logo { width: 170px; display:block; margin: 0 auto 8px; }
.report-title { text-align:center; font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.report-date { font-weight: 700; margin: 12px 0 16px; }
.report-table-section { margin: 18px 0; }
.report-section-head { background:#f3f4f6; padding:10px 14px; border-radius:10px; font-weight:800; font-size:18px; margin-bottom:8px; }
.report-table { width:100%; border-collapse: collapse; }
.report-table th, .report-table td { text-align:left; padding:10px 12px; border-bottom:1px solid var(--border); vertical-align: top; }
.report-table thead th { color:#111827; font-weight:800; }
.report-notes-block { margin-top: 22px; }
.report-notes-text { padding: 12px 4px; white-space: pre-wrap; }


.stock-ok-text { color:#166534; font-weight:700; }
.stock-low-text { color:#92400e; font-weight:700; }
.stock-out-text { color:#991b1b; font-weight:700; }


.delivery-suggestions {
  margin-top: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}
.delivery-suggestion-item {
  width: 100%;
  border: 0;
  background: #fff;
  text-align: left;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.delivery-suggestion-item + .delivery-suggestion-item {
  border-top: 1px solid #f1f5f9;
}
.delivery-suggestion-item:hover {
  background: #f8fafc;
}
.delivery-suggestion-meta,
.delivery-suggestion-empty {
  font-size: 12px;
  color: #6b7280;
}
.delivery-suggestion-empty {
  padding: 10px 12px;
}

.return-suggestions {
  margin-top: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}

.transfer-suggestions {
  margin-top: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}

.delivery-company-suggestions,
.return-company-suggestions {
  margin-top: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}

.inventory-part-suggestions {
  margin-top: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}


.inventory-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(5, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}
.inventory-toolbar-button .btn {
  width: 100%;
}
.inventory-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.inventory-summary-card {
  border: 1px solid #ececf3;
  border-radius: 16px;
  padding: 18px;
  background: #fafafe;
}
.inventory-summary-label {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 6px;
}
.inventory-summary-number {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}
.inventory-clean-table .inventory-main-row td {
  vertical-align: middle;
}
.inventory-action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.inventory-detail-row td {
  background: #fafafe;
  padding-top: 0;
}
.inventory-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  padding: 12px 0 4px;
}
.inventory-detail-box {
  border: 1px solid #ececf3;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.inventory-detail-title {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}
.inventory-detail-value {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}
@media (max-width: 1100px) {
  .inventory-toolbar {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
  .inventory-summary-grid,
  .inventory-detail-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}


.inventory-products-shell {
  padding: 18px;
  border-radius: 20px;
}
.inventory-shell-head {
  margin-bottom: 12px;
}
.inventory-toolbar-top {
  grid-template-columns: minmax(300px, 2fr) repeat(3, minmax(150px, 1fr)) minmax(220px, 1.1fr);
  margin-bottom: 10px;
}
.inventory-toolbar-top .field label {
  display: none;
}
.inventory-top-search input {
  height: 58px;
  border-radius: 18px;
  padding-left: 18px;
  font-size: 15px;
}
.inventory-top-filter select,
.inventory-top-button .btn {
  height: 58px;
  border-radius: 18px;
}
.inventory-top-button .btn {
  font-weight: 700;
}
.inventory-summary-grid {
  margin-top: 10px;
  margin-bottom: 18px;
}
.inventory-summary-card {
  border-radius: 18px;
  background: #fcfcff;
  border: 1px solid #e9ebf3;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}
.inventory-summary-label {
  font-size: 15px;
}
.inventory-summary-number {
  font-size: 46px;
}
.inventory-secondary-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.inventory-secondary-left h3 {
  margin: 0;
  font-size: 30px;
}
.inventory-subtle {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 14px;
}
.inventory-pdf-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 220px));
  gap: 12px;
  margin-bottom: 14px;
}
.inventory-add-wrap {
  border: 1px solid #edf0f5;
  background: #fbfbfe;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
}
.inventory-add-actions {
  margin-top: 12px;
}
.inventory-table-shell {
  border: 1px solid #edf0f5;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}
.inventory-clean-table thead th {
  background: #fafbff;
  color: #465066;
  font-size: 13px;
  letter-spacing: .01em;
}
.inventory-main-row td {
  padding-top: 16px;
  padding-bottom: 16px;
}
.inventory-row-link {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.inventory-part-main {
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
}
.inventory-total-pill {
  display: inline-flex;
  min-width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f7f8fc;
  font-weight: 800;
  font-size: 20px;
}
.inventory-status-badge {
  min-width: 72px;
  justify-content: center;
  font-weight: 800;
  letter-spacing: .04em;
}
.inventory-fav-cell {
  font-size: 24px;
}
.inventory-action-row {
  justify-content: flex-end;
}
.inventory-icon-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
}
.inventory-text-btn {
  border-radius: 12px;
}
.inventory-detail-row td {
  background: #f8faff;
}
.inventory-detail-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  padding: 8px 0 8px;
}
.inventory-detail-box {
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px #edf0f5;
}
@media (max-width: 1100px) {
  .inventory-toolbar-top {
    grid-template-columns: 1fr 1fr;
  }
  .inventory-secondary-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .inventory-pdf-inline,
  .inventory-detail-grid,
  .inventory-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* Modern pro inventory refinements */
.inventory-products-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px;
  border-radius: 26px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .05);
}
.inventory-toolbar-top {
  grid-template-columns: minmax(340px, 2.2fr) repeat(3, minmax(150px, 1fr)) minmax(230px, 1.1fr);
  gap: 14px;
}
.inventory-top-search input {
  height: 64px;
  border-radius: 20px;
  padding: 0 22px;
  font-size: 18px;
  background: #fbfcff;
  box-shadow: inset 0 0 0 1px #e8ebf3;
}
.inventory-top-filter select {
  height: 64px;
  border-radius: 20px;
  font-size: 16px;
  background: #fbfcff;
}
.inventory-top-button .btn {
  height: 64px;
  border-radius: 20px;
  font-size: 18px;
  box-shadow: 0 10px 24px rgba(234, 120, 43, .22);
}
.inventory-summary-grid {
  margin-top: 16px;
  margin-bottom: 24px;
  gap: 16px;
}
.inventory-summary-card {
  min-height: 136px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 22px;
  padding: 22px 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid #eceff6;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}
.inventory-summary-label {
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: 600;
}
.inventory-summary-number {
  font-size: 54px;
  line-height: .95;
  letter-spacing: -.03em;
}
.inventory-secondary-bar {
  margin-bottom: 18px;
}
.inventory-secondary-left h3 {
  font-size: 42px;
  line-height: 1;
  letter-spacing: -.03em;
}
.inventory-subtle {
  font-size: 16px;
}
.inventory-pdf-inline {
  margin-bottom: 18px;
}
.inventory-pdf-inline .field label {
  font-size: 13px;
  color: #6b7280;
}
.inventory-pdf-inline select {
  height: 54px;
  border-radius: 16px;
  background: #fbfcff;
}
.inventory-table-shell {
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(15,23,42,.03);
}
.inventory-clean-table thead th {
  background: #fbfcff;
  padding-top: 18px;
  padding-bottom: 18px;
  font-size: 14px;
  font-weight: 700;
}
.inventory-main-row td {
  padding-top: 22px;
  padding-bottom: 22px;
  font-size: 17px;
}
.inventory-main-row:hover td {
  background: #fcfcff;
}
.inventory-part-main {
  font-size: 44px;
  line-height: .95;
  font-weight: 800;
  letter-spacing: -.04em;
}
.inventory-fav-cell {
  font-size: 28px;
  width: 44px;
}
.inventory-total-pill {
  min-width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f7f8fc 0%, #f1f4fa 100%);
  box-shadow: inset 0 0 0 1px #e7ebf4;
  font-size: 26px;
}
.inventory-status-badge {
  min-width: 84px;
  height: 40px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.inventory-action-row {
  gap: 10px;
}
.inventory-icon-btn,
.inventory-text-btn {
  height: 42px;
  border-radius: 14px;
}
.inventory-detail-row td {
  padding-bottom: 18px;
}
.inventory-detail-grid {
  gap: 14px;
}
.inventory-detail-box {
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}
.inventory-detail-title {
  font-size: 14px;
  font-weight: 600;
}
.inventory-detail-value {
  font-size: 34px;
  letter-spacing: -.03em;
}
.mini-actions .btn-tiny {
  height: 38px;
  min-width: 38px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
}
@media (max-width: 1100px) {
  .inventory-products-shell {
    max-width: 100%;
    padding: 18px;
  }
  .inventory-part-main {
    font-size: 34px;
  }
  .inventory-summary-number {
    font-size: 42px;
  }
}


/* Dark icon navigation */
.tabs-dark {
  display: flex;
  gap: 10px;
  overflow: auto;
  margin-top: 12px;
  margin-bottom: 16px;
  padding-bottom: 8px;
}
.tab-dark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #162338 0%, #111c2e 100%);
  color: #dbe5f5;
  border: 1px solid rgba(255,255,255,.08);
  padding: 12px 18px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
  font-weight: 700;
}
.tab-dark:hover {
  background: linear-gradient(180deg, #1a2942 0%, #132036 100%);
}
.tab-dark.active {
  background: linear-gradient(180deg, #223656 0%, #182844 100%);
  color: #fff;
  border-color: rgba(234,120,43,.5);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .22), inset 0 -2px 0 rgba(234,120,43,.85);
}
.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  font-size: 18px;
  line-height: 1;
}

/* Inventory cards with icons */
.inventory-summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
}
.inventory-summary-icon {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: #f3f4f8;
  box-shadow: inset 0 0 0 1px #e9ebf3;
}
.inventory-card-neutral .inventory-summary-icon {
  background: #f3f4f8;
}
.inventory-card-warn .inventory-summary-icon {
  background: #fff4e5;
}
.inventory-card-danger .inventory-summary-icon {
  background: #fee2e2;
}
.inventory-card-danger .inventory-summary-number {
  color: #b42318;
}
.inventory-card-warn .inventory-summary-number {
  color: #b45309;
}


/* Enterprise shell */
body {
  background: #f3f5f9;
}
.enterprise-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: linear-gradient(180deg, #f5f7fb 0%, #eef2f8 100%);
}
.enterprise-sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #13203a 100%);
  color: #fff;
  padding: 24px 18px;
  box-shadow: 12px 0 32px rgba(15, 23, 42, .22);
  position: sticky;
  top: 0;
  height: 100vh;
}
.enterprise-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 18px;
}
.enterprise-brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
}
.enterprise-brand-title {
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.03em;
}
.enterprise-brand-subtitle {
  margin-top: 4px;
  color: rgba(255,255,255,.7);
  font-size: 14px;
}
.enterprise-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.enterprise-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  color: #d9e3f3;
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: .18s ease;
}
.enterprise-nav-item:hover {
  background: rgba(255,255,255,.06);
  transform: translateX(2px);
}
.enterprise-nav-item.active {
  background: linear-gradient(180deg, #1e3357 0%, #172844 100%);
  color: #fff;
  border-color: rgba(234,120,43,.45);
  box-shadow: 0 10px 22px rgba(0,0,0,.18), inset 0 -2px 0 rgba(234,120,43,.95);
}
.enterprise-nav-icon {
  width: 22px;
  display: inline-flex;
  justify-content: center;
  font-size: 18px;
}
.enterprise-main {
  min-width: 0;
}
.enterprise-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 24px 30px 16px;
  background: rgba(243,245,249,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e8edf5;
}
.enterprise-page-kicker {
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.enterprise-page-title {
  margin: 4px 0 0;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -.04em;
}
.enterprise-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.enterprise-global-search input {
  height: 48px;
  min-width: 220px;
  border-radius: 14px;
  border: 1px solid #dde4ee;
  background: #fff;
  padding: 0 16px;
}
.enterprise-user {
  min-width: 88px;
  height: 48px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #dde4ee;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #475569;
  padding: 0 14px;
}
.enterprise-content {
  padding: 26px 30px 34px;
}
.enterprise-content .tabs,
.enterprise-content .tabs-dark {
  display: none !important;
}
@media (max-width: 980px) {
  .enterprise-shell {
    grid-template-columns: 1fr;
  }
  .enterprise-sidebar {
    position: relative;
    height: auto;
    padding-bottom: 16px;
  }
  .enterprise-header {
    padding: 18px 18px 12px;
  }
  .enterprise-page-title {
    font-size: 32px;
  }
  .enterprise-content {
    padding: 18px;
  }
}


/* Step 2 safe: visual-only inventory refresh */
.inventory-page,
.inventory-wrap,
.inventory-panel,
.inventory-section {
  max-width: 1120px;
  margin: 0 auto;
}

/* Inventory cards / panels */
.card.panel {
  border-radius: 24px;
  border: 1px solid #e8edf5;
  box-shadow: 0 10px 30px rgba(15,23,42,.04);
}

/* Better spacing inside inventory */
.enterprise-content .stack {
  gap: 18px;
}

/* Inventory titles */
.enterprise-content h3 {
  letter-spacing: -0.02em;
}

/* Inventory forms */
.form-grid {
  gap: 14px;
}
.field input,
.field select,
.field textarea {
  border-radius: 16px;
  background: #fbfcff;
  border: 1px solid #dfe6f0;
  min-height: 50px;
}
.field textarea {
  min-height: 96px;
}
.field label {
  font-size: 13px;
  color: #667085;
  font-weight: 700;
}

/* Search / filters block */
.table-wrap > .field input,
.table-wrap .field select {
  min-height: 52px;
  border-radius: 16px;
}

/* Inventory PDF controls more aligned */
.table-wrap .btn.btn-primary {
  border-radius: 16px;
}

/* KPI-like cards if present in inventory */
.inventory-summary-grid,
.kpi-grid {
  gap: 16px;
}
.inventory-summary-card,
.kpi-card {
  border-radius: 22px;
  border: 1px solid #e8edf5;
  box-shadow: 0 10px 28px rgba(15,23,42,.04);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}
.inventory-summary-number,
.kpi-value {
  letter-spacing: -0.03em;
}

/* Inventory table styling */
.table {
  border-collapse: separate;
  border-spacing: 0;
}
.table thead th {
  background: #fbfcff;
  color: #465066;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8edf5;
}
.table tbody td {
  padding-top: 18px;
  padding-bottom: 18px;
  vertical-align: middle;
  border-bottom: 1px solid #eef2f7;
}
.table tbody tr:hover td {
  background: #fcfcff;
}

/* Part number emphasis */
.table tbody td b {
  font-size: 1.15em;
  letter-spacing: -0.02em;
}

/* Buttons */
.btn {
  border-radius: 14px;
}
.btn.btn-primary {
  box-shadow: 0 8px 20px rgba(234,120,43,.18);
}
.btn.btn-danger {
  box-shadow: none;
}

/* Status badges if existing */
.badge,
.status-badge {
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge.ok,
.status-ok {
  background: #e6f9f0;
  color: #0f9d58;
}
.badge.low,
.status-low {
  background: #fff4e5;
  color: #f59e0b;
}
.badge.out,
.status-out {
  background: #ffe5e5;
  color: #ef4444;
}

/* Add product action alignment */
.card.panel form .btn.btn-primary {
  margin-top: 6px;
}

/* Inventory action buttons tighter */
.table .btn-small {
  border-radius: 12px;
}

/* Mobile safe */
@media (max-width: 1100px) {
  .card.panel {
    border-radius: 20px;
  }
  .table tbody td {
    padding-top: 14px;
    padding-bottom: 14px;
  }
}


/* Step 3 pro inventory */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.inventory-pro-page {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.inventory-hero-bar {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(360px, 1.8fr) minmax(520px, 2fr);
  gap: 14px;
  align-items: center;
}
.inventory-hero-search {
  position: relative;
}
.inventory-hero-search::before {
  content: "⌕";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: #98a2b3;
  z-index: 2;
}
.inventory-hero-search input {
  width: 100%;
  height: 64px;
  padding: 0 18px 0 54px;
  border-radius: 20px;
  border: 1px solid #dfe6f0;
  background: linear-gradient(180deg,#ffffff,#fbfcff);
  font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.inventory-hero-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr)) minmax(160px, .9fr);
  gap: 12px;
}
.inventory-hero-filters select,
.inventory-export-btn {
  height: 64px;
  border-radius: 20px;
  font-size: 16px;
}
.inventory-export-btn {
  font-weight: 800;
  letter-spacing: .01em;
  box-shadow: 0 10px 24px rgba(234,120,43,.22);
}
.inventory-stats-pro {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.inventory-stat-card {
  min-height: 148px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(180deg,#ffffff 0%, #fbfcff 100%);
}
.inventory-stat-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f8;
  box-shadow: inset 0 0 0 1px #e9ebf3;
  font-size: 30px;
}
.inventory-stat-icon.warn {
  background: #fff4e5;
}
.inventory-stat-icon.danger {
  background: #ffe5e5;
  color: #ef4444;
}
.inventory-stat-label {
  font-size: 18px;
  font-weight: 700;
  color: #344054;
  margin-bottom: 6px;
}
.inventory-stat-value {
  font-size: 54px;
  line-height: .95;
  letter-spacing: -.04em;
  font-weight: 900;
}
.inventory-stat-value.warn { color: #c26000; }
.inventory-stat-value.danger { color: #b42318; }

.inventory-products-pro {
  padding: 22px;
  border-radius: 26px;
}
.inventory-products-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}
.inventory-products-title {
  margin: 0;
  font-size: 46px;
  line-height: .95;
  letter-spacing: -.04em;
}
.inventory-products-subtitle {
  margin: 8px 0 0;
  color: #667085;
  font-size: 15px;
}
.inventory-pdf-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 200px));
  gap: 12px;
}
.inventory-pdf-mini select {
  height: 52px;
  border-radius: 16px;
  background: #fbfcff;
}
.inventory-products-table-wrap {
  border: 1px solid #edf0f5;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
}
.inventory-pro-table {
  border-collapse: separate;
  border-spacing: 0;
}
.inventory-pro-table thead th {
  background: #fbfcff;
  color: #465066;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  padding-top: 16px;
  padding-bottom: 16px;
}
.inventory-pro-table tbody td {
  padding-top: 22px;
  padding-bottom: 22px;
  vertical-align: middle;
  border-bottom: 1px solid #eef2f7;
}
.inventory-pro-table tbody tr:hover td {
  background: #fcfcff;
}
.inventory-pro-table tbody td b {
  font-size: 1.5em;
  line-height: 1;
  letter-spacing: -.03em;
}
.inventory-pro-table .badge,
.inventory-pro-table .status-badge {
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.inventory-pro-table .badge.ok,
.inventory-pro-table .status-ok {
  background: #e6f9f0;
  color: #0f9d58;
}
.inventory-pro-table .badge.low,
.inventory-pro-table .status-low {
  background: #fff4e5;
  color: #f59e0b;
}
.inventory-pro-table .badge.out,
.inventory-pro-table .status-out {
  background: #ffe5e5;
  color: #ef4444;
}
.inventory-pro-table .btn-small,
.inventory-pro-table .btn {
  border-radius: 12px;
}
.inventory-pro-table .btn-danger {
  box-shadow: none;
}

@media (max-width: 1100px) {
  .inventory-hero-bar {
    grid-template-columns: 1fr;
  }
  .inventory-hero-filters {
    grid-template-columns: 1fr 1fr;
  }
  .inventory-stats-pro {
    grid-template-columns: 1fr;
  }
  .inventory-products-top {
    flex-direction: column;
    align-items: stretch;
  }
  .inventory-pdf-mini {
    grid-template-columns: 1fr 1fr;
  }
}


/* Scale alignment with Dashboard baseline */
.enterprise-page-title {
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* Inventory scale normalization */
.inventory-products-title,
.inventory-title {
  font-size: 28px !important;
  line-height: 1.1 !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

.inventory-products-subtitle,
.inventory-subtitle {
  font-size: 13px !important;
  line-height: 1.4 !important;
  color: #667085 !important;
}

.inventory-stat-card,
.inventory-summary-card,
.inventory-kpi-card {
  min-height: 110px !important;
  padding: 18px 20px !important;
  border-radius: 20px !important;
}

.inventory-stat-label,
.inventory-summary-label,
.kpi-label {
  font-size: 15px !important;
  font-weight: 700 !important;
  margin-bottom: 6px !important;
}

.inventory-stat-value,
.inventory-summary-number,
.kpi-value {
  font-size: 34px !important;
  line-height: 1 !important;
  letter-spacing: -0.03em !important;
  font-weight: 800 !important;
}

.inventory-stat-icon,
.inventory-summary-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  font-size: 20px !important;
}

.inventory-hero-search input,
.inventory-toolbar input,
.inventory-toolbar select,
.inventory-hero-filters select,
.inventory-export-btn,
.inventory-pdf-mini select,
.inventory-pdf-inline select {
  height: 52px !important;
  border-radius: 16px !important;
  font-size: 15px !important;
}

.inventory-export-btn,
.inventory-top-button .btn,
.inventory-toolbar .btn {
  font-size: 15px !important;
  font-weight: 700 !important;
}

.inventory-pro-table thead th,
.inventory-clean-table thead th,
.table thead th {
  font-size: 12px !important;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

.inventory-pro-table tbody td,
.inventory-clean-table tbody td,
.table tbody td {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

.inventory-part-main {
  font-size: 18px !important;
  line-height: 1.1 !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

.inventory-pro-table tbody td b,
.inventory-clean-table tbody td b,
.table tbody td b {
  font-size: 18px !important;
  line-height: 1.1 !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

.inventory-fav-cell {
  font-size: 18px !important;
  width: 34px !important;
}

.inventory-total-pill {
  min-width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}

.inventory-status-badge,
.badge,
.status-badge {
  min-width: 64px !important;
  padding: 5px 10px !important;
  font-size: 11px !important;
  letter-spacing: 0.06em !important;
  font-weight: 800 !important;
}

.inventory-action-row {
  gap: 6px !important;
}

.inventory-icon-btn,
.inventory-text-btn,
.table .btn-small {
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

.inventory-detail-grid {
  gap: 10px !important;
}

.inventory-detail-box {
  padding: 14px !important;
  border-radius: 14px !important;
}

.inventory-detail-title {
  font-size: 12px !important;
  margin-bottom: 6px !important;
}

.inventory-detail-value {
  font-size: 24px !important;
  margin-bottom: 8px !important;
}

.mini-actions .btn-tiny {
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 10px !important;
  font-size: 18px !important;
}

.inventory-products-pro,
.inventory-table-panel,
.inventory-products-shell {
  padding: 18px !important;
  border-radius: 22px !important;
}

.inventory-hero-bar,
.inventory-search-panel {
  padding: 16px !important;
  border-radius: 22px !important;
}


/* FINAL compact enterprise scale */
.enterprise-page-title {
  font-size: 32px !important;
  line-height: 1.05 !important;
  letter-spacing: -0.03em !important;
}

.enterprise-page-kicker {
  font-size: 12px !important;
}

.enterprise-header {
  padding: 18px 24px 12px !important;
}

.enterprise-content {
  padding: 18px 24px 24px !important;
}

/* Inventory */
.inventory-products-title,
.inventory-title {
  font-size: 22px !important;
  line-height: 1.1 !important;
  font-weight: 700 !important;
}

.inventory-products-subtitle,
.inventory-subtitle {
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.inventory-stat-card,
.inventory-summary-card,
.inventory-kpi-card {
  min-height: 92px !important;
  padding: 14px 16px !important;
  border-radius: 18px !important;
}

.inventory-stat-label,
.inventory-summary-label,
.kpi-label {
  font-size: 13px !important;
  margin-bottom: 4px !important;
}

.inventory-stat-value,
.inventory-summary-number,
.kpi-value {
  font-size: 26px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}

.inventory-stat-icon,
.inventory-summary-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  font-size: 16px !important;
}

.inventory-hero-search input,
.inventory-toolbar input,
.inventory-toolbar select,
.inventory-hero-filters select,
.inventory-export-btn,
.inventory-pdf-mini select,
.inventory-pdf-inline select {
  height: 46px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
}

.inventory-pro-table thead th,
.inventory-clean-table thead th,
.table thead th {
  font-size: 11px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.inventory-pro-table tbody td,
.inventory-clean-table tbody td,
.table tbody td {
  padding: 10px 12px !important;
  vertical-align: middle !important;
}

.inventory-part-main,
.inventory-pro-table tbody td b,
.inventory-clean-table tbody td b,
.table tbody td b {
  font-size: 15px !important;
  line-height: 1.1 !important;
  font-weight: 700 !important;
}

.inventory-fav-cell {
  font-size: 15px !important;
  width: 26px !important;
}

.inventory-total-pill {
  min-width: 36px !important;
  height: 36px !important;
  border-radius: 12px !important;
  font-size: 15px !important;
}

.inventory-status-badge,
.badge,
.status-badge {
  min-width: 54px !important;
  padding: 4px 8px !important;
  font-size: 10px !important;
  border-radius: 999px !important;
}

.inventory-icon-btn,
.inventory-text-btn,
.table .btn-small,
.btn.btn-small {
  height: 30px !important;
  min-width: 30px !important;
  font-size: 11px !important;
  border-radius: 9px !important;
  padding: 0 8px !important;
}

.inventory-action-row {
  gap: 5px !important;
}

.inventory-detail-box {
  padding: 12px !important;
  border-radius: 12px !important;
}

.inventory-detail-title {
  font-size: 11px !important;
  margin-bottom: 4px !important;
}

.inventory-detail-value {
  font-size: 20px !important;
  margin-bottom: 6px !important;
}

.mini-actions .btn-tiny {
  height: 28px !important;
  min-width: 28px !important;
  font-size: 15px !important;
  border-radius: 8px !important;
}

.inventory-products-pro,
.inventory-table-panel,
.inventory-products-shell,
.inventory-hero-bar,
.inventory-search-panel,
.enterprise-panel,
.card.panel {
  padding: 16px !important;
  border-radius: 20px !important;
}

/* Sidebar slightly tighter too */
.enterprise-sidebar {
  width: 260px;
  padding: 18px 14px !important;
}
.enterprise-brand-title {
  font-size: 22px !important;
}
.enterprise-brand-subtitle {
  font-size: 12px !important;
}
.enterprise-nav-item {
  padding: 12px 14px !important;
  font-size: 14px !important;
  border-radius: 14px !important;
}

.enterprise-global-search input,
.enterprise-user {
  height: 42px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
}

.btn {
  font-size: 13px !important;
}

@media (max-width: 1100px) {
  .enterprise-page-title {
    font-size: 28px !important;
  }
  .inventory-products-title,
  .inventory-title {
    font-size: 20px !important;
  }
}


@media (max-width: 1100px) {
  .inventory-pro-table,
  .inventory-clean-table,
  .table {
    table-layout: auto !important;
  }
}


@media (max-width: 1100px) {
  .inventory-pro-table,
  .inventory-clean-table,
  .table {
    table-layout: auto !important;
  }
  .inventory-pro-table td,
  .inventory-clean-table td,
  .table td {
    white-space: normal !important;
    text-overflow: initial !important;
  }
}


/* Clean final inventory table layout */
.inventory-pro-table,
.inventory-clean-table,
.table {
  width: 100% !important;
  table-layout: auto !important;
}

.inventory-pro-table th,
.inventory-pro-table td,
.inventory-clean-table th,
.inventory-clean-table td,
.table th,
.table td {
  vertical-align: middle !important;
  white-space: nowrap !important;
}

.inventory-pro-table td,
.inventory-clean-table td,
.table td {
  overflow: visible !important;
  text-overflow: clip !important;
}

.inventory-pro-table th:last-child,
.inventory-pro-table td:last-child,
.inventory-clean-table th:last-child,
.inventory-clean-table td:last-child,
.table th:last-child,
.table td:last-child {
  min-width: 150px !important;
}

.inventory-pro-table th:nth-last-child(2),
.inventory-pro-table td:nth-last-child(2),
.inventory-clean-table th:nth-last-child(2),
.inventory-clean-table td:nth-last-child(2),
.table th:nth-last-child(2),
.table td:nth-last-child(2) {
  min-width: 84px !important;
  text-align: center !important;
}

.inventory-pro-table th:nth-last-child(3),
.inventory-pro-table td:nth-last-child(3),
.inventory-clean-table th:nth-last-child(3),
.inventory-clean-table td:nth-last-child(3),
.table th:nth-last-child(3),
.table td:nth-last-child(3) {
  min-width: 84px !important;
  text-align: center !important;
}

.inventory-pro-table th:nth-child(4),
.inventory-pro-table td:nth-child(4),
.inventory-clean-table th:nth-child(4),
.inventory-clean-table td:nth-child(4),
.table th:nth-child(4),
.table td:nth-child(4) {
  min-width: 120px !important;
}

.inventory-action-row {
  display: flex !important;
  gap: 6px !important;
  justify-content: flex-start !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

.inventory-action-row .btn,
.inventory-action-row .btn-small {
  flex: 0 0 auto !important;
}

.inventory-total-pill,
.inventory-status-badge,
.badge,
.status-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 1100px) {
  .inventory-pro-table,
  .inventory-clean-table,
  .table {
    table-layout: auto !important;
  }
  .inventory-pro-table th,
  .inventory-pro-table td,
  .inventory-clean-table th,
  .inventory-clean-table td,
  .table th,
  .table td {
    white-space: nowrap !important;
  }
}


/* Match 7-column inventory table to actual rendered rows */
.inventory-pro-table,
.inventory-clean-table,
.table {
  width: 100% !important;
  table-layout: auto !important;
}

.inventory-pro-table th:nth-child(1),
.inventory-pro-table td:nth-child(1),
.inventory-clean-table th:nth-child(1),
.inventory-clean-table td:nth-child(1),
.table th:nth-child(1),
.table td:nth-child(1) {
  width: 42px !important;
  text-align: center !important;
}

.inventory-pro-table th:nth-child(2),
.inventory-pro-table td:nth-child(2),
.inventory-clean-table th:nth-child(2),
.inventory-clean-table td:nth-child(2),
.table th:nth-child(2),
.table td:nth-child(2) {
  min-width: 110px !important;
}

.inventory-pro-table th:nth-child(3),
.inventory-pro-table td:nth-child(3),
.inventory-clean-table th:nth-child(3),
.inventory-clean-table td:nth-child(3),
.table th:nth-child(3),
.table td:nth-child(3) {
  min-width: 90px !important;
}

.inventory-pro-table th:nth-child(4),
.inventory-pro-table td:nth-child(4),
.inventory-clean-table th:nth-child(4),
.inventory-clean-table td:nth-child(4),
.table th:nth-child(4),
.table td:nth-child(4) {
  min-width: 110px !important;
}

.inventory-pro-table th:nth-child(5),
.inventory-pro-table td:nth-child(5),
.inventory-clean-table th:nth-child(5),
.inventory-clean-table td:nth-child(5),
.table th:nth-child(5),
.table td:nth-child(5),
.inventory-pro-table th:nth-child(6),
.inventory-pro-table td:nth-child(6),
.inventory-clean-table th:nth-child(6),
.inventory-clean-table td:nth-child(6),
.table th:nth-child(6),
.table td:nth-child(6) {
  min-width: 72px !important;
  text-align: center !important;
}

.inventory-pro-table th:nth-child(7),
.inventory-pro-table td:nth-child(7),
.inventory-clean-table th:nth-child(7),
.inventory-clean-table td:nth-child(7),
.table th:nth-child(7),
.table td:nth-child(7) {
  min-width: 170px !important;
  text-align: center !important;
}

.inventory-pro-table td,
.inventory-clean-table td,
.table td {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  vertical-align: middle !important;
}

.inventory-action-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
}

.inventory-products-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

.inventory-add-btn {
  height: 44px !important;
  border-radius: 14px !important;
  white-space: nowrap !important;
}

.inventory-add-wrap {
  margin-bottom: 16px !important;
}

@media (max-width: 1100px) {
  .inventory-products-actions {
    justify-content: flex-start !important;
  }
}

/* Reliable center alignment for increment buttons */
.mini-actions {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
}
.mini-actions .btn-tiny {
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 0 !important;
  line-height: 1 !important;
}


/* Export PDF alignment fix */
.inventory-hero-bar {
  grid-template-columns: minmax(260px, 1.45fr) minmax(620px, 1.55fr) !important;
  align-items: center !important;
  gap: 12px !important;
}

.inventory-hero-search {
  min-width: 0 !important;
}

.inventory-hero-filters {
  display: grid !important;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) minmax(150px, 160px) !important;
  gap: 10px !important;
  align-items: center !important;
  justify-items: stretch !important;
}

.inventory-hero-filters select {
  min-width: 0 !important;
  width: 100% !important;
}

.inventory-export-btn {
  width: 100% !important;
  min-width: 150px !important;
  max-width: 160px !important;
  justify-self: end !important;
  white-space: nowrap !important;
  text-align: center !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

@media (max-width: 1100px) {
  .inventory-hero-bar {
    grid-template-columns: 1fr !important;
  }
  .inventory-hero-filters {
    grid-template-columns: repeat(2, minmax(140px, 1fr)) !important;
  }
  .inventory-export-btn {
    max-width: none !important;
  }
}


/* Mobile responsive layout fix */
.mobile-menu-btn {
  display: none;
}

.mobile-sidebar-backdrop {
  display: none;
}

@media (max-width: 900px) {
  .enterprise-shell {
    grid-template-columns: 1fr !important;
  }

  .mobile-menu-btn {
    display: inline-flex !important;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1200;
    width: 44px;
    height: 44px;
    border: 1px solid #dde4ee;
    border-radius: 12px;
    background: #fff;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(15,23,42,.12);
    font-size: 20px;
  }

  .mobile-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.42);
    z-index: 1090;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .mobile-sidebar-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .enterprise-sidebar {
    position: fixed !important;
    left: -280px !important;
    top: 0 !important;
    width: 280px !important;
    height: 100vh !important;
    z-index: 1100 !important;
    transition: left .25s ease !important;
    overflow-y: auto;
  }

  .enterprise-sidebar.open {
    left: 0 !important;
  }

  .enterprise-main {
    min-width: 0 !important;
  }

  .enterprise-header {
    padding: 16px 16px 12px 66px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .enterprise-header-right {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    justify-content: stretch !important;
  }

  .enterprise-global-search {
    grid-column: 1 / -1;
  }

  .enterprise-global-search input,
  .enterprise-user,
  .enterprise-header-right .btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
  }

  .enterprise-content {
    padding: 16px !important;
  }

  .enterprise-page-title {
    font-size: 28px !important;
  }

  .enterprise-page-kicker {
    font-size: 11px !important;
  }

  .inventory-hero-bar,
  .inventory-search-panel {
    grid-template-columns: 1fr !important;
    padding: 14px !important;
  }

  .inventory-hero-filters {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .inventory-hero-search input {
    width: 100% !important;
    max-width: 100% !important;
  }

  .inventory-export-btn {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .inventory-stats-pro,
  .inventory-summary-grid,
  .kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .inventory-products-top,
  .inventory-header-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .inventory-products-actions {
    justify-content: stretch !important;
  }

  .inventory-pdf-mini,
  .inventory-pdf-inline {
    grid-template-columns: 1fr 1fr !important;
    width: 100% !important;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .table-wrap,
  .inventory-products-table-wrap,
  .inventory-table-shell {
    overflow-x: auto !important;
  }

  .table,
  .inventory-pro-table,
  .inventory-clean-table {
    min-width: 720px !important;
  }

  .report-card {
    overflow-x: auto;
  }
}

/* Warranty module */
.warranty-form textarea {
  min-height: 94px;
}
.warranty-form .delivery-suggestion-meta {
  font-size: 12px;
}
@media (max-width: 900px) {
  .warranty-form .field[style*="grid-column"] {
    grid-column: auto !important;
  }
}


/* Final login logo style */
.auth-card .h1.center {
  display: none !important;
}
.login-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}
.auth-card .logo.login-logo-only,
.auth-card .logo {
  width: 220px !important;
  max-width: 82% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto 14px auto !important;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.12));
}


/* Automatic shared logo for login */
.auth-card .h1.center {
  display: none !important;
}
.login-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}
.auth-card .logo.login-logo-only,
.auth-card .logo {
  width: 220px !important;
  max-width: 82% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto 14px auto !important;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.12));
}


/* Login new logo with automatic fallback */
.auth-card .h1.center {
  display: none !important;
}
.login-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}
.auth-card .logo.login-logo-only {
  width: 220px !important;
  max-width: 82% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto 14px auto !important;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.12));
}


.report-table-advanced th,
.report-table-advanced td {
  white-space: nowrap;
}


.report-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
}

.report-status-approved {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.report-status-rejected {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.report-status-pending {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.report-status-closed {
  background: #e5e7eb;
  color: #374151;
  border-color: #d1d5db;
}

.report-status-default {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}


.report-table tbody tr {
  border-bottom: none;
}
.report-table tbody tr:nth-child(even) {
  background: #f9fafb;
}


.report-filter-grid {
  align-items: end;
}

.table-actions{display:inline-flex;gap:8px;flex-wrap:wrap;}


.sync-status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sync-stamp {
  font-size: 12px;
  white-space: nowrap;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 12px;
  font-weight: 700;
}
.sync-status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sync-stamp {
  font-size: 12px;
  white-space: nowrap;
}

/* Dashboard refresh */
.dashboard-stack {
  display: grid;
  gap: 16px;
}
.dashboard-hero-panel {
  background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(16,185,129,0.06));
  border: 1px solid rgba(37,99,235,0.08);
}
.dashboard-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 6px;
}
.dashboard-hero-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}
.dashboard-hero-subtitle,
.dashboard-panel-head p,
.dashboard-metric-sub,
.dashboard-alert-meta {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}
.dashboard-hero-top,
.dashboard-filter-row,
.dashboard-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.dashboard-hero-actions,
.dashboard-filter-shortcuts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.dashboard-filter-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}
.dashboard-filter-row .field {
  min-width: 220px;
  max-width: 280px;
}
.dashboard-metric-grid,
.dashboard-location-grid,
.dashboard-lower-grid {
  display: grid;
  gap: 16px;
}
.dashboard-metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.dashboard-location-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 16px;
}
.dashboard-lower-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-metric {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}
.dashboard-metric-label {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 8px;
}
.dashboard-metric-value {
  font-size: 34px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}
.dashboard-tone-blue { background: linear-gradient(135deg, rgba(37,99,235,.10), rgba(255,255,255,.96)); }
.dashboard-tone-green { background: linear-gradient(135deg, rgba(16,185,129,.10), rgba(255,255,255,.96)); }
.dashboard-tone-red { background: linear-gradient(135deg, rgba(239,68,68,.10), rgba(255,255,255,.96)); }
.dashboard-tone-amber { background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(255,255,255,.96)); }
.dashboard-tone-purple { background: linear-gradient(135deg, rgba(139,92,246,.10), rgba(255,255,255,.96)); }
.dashboard-tone-slate { background: linear-gradient(135deg, rgba(71,85,105,.10), rgba(255,255,255,.96)); }
.dashboard-panel-head h3 {
  margin: 0;
}
.dashboard-chart-wrap {
  height: 320px;
  margin-top: 12px;
}
.dashboard-chart-wrap.empty {
  height: auto;
}
.dashboard-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  color: #64748b;
  background: #f8fafc;
}
.dashboard-empty.small {
  min-height: 120px;
}
.dashboard-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}
.dashboard-alert-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.dashboard-alert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}
.dashboard-alert-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  min-height: 32px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.dashboard-alert-pill.low {
  background: #fef3c7;
  color: #b45309;
}
.dashboard-alert-pill.out {
  background: #fee2e2;
  color: #b91c1c;
}
.dashboard-mini-panel {
  min-width: 0;
}
.dashboard-table-scroll {
  overflow: auto;
  margin-top: 12px;
}
.dashboard-mini-table td,
.dashboard-mini-table th {
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .dashboard-main-grid,
  .dashboard-lower-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .dashboard-hero-title {
    font-size: 24px;
  }
  .dashboard-metric-value {
    font-size: 28px;
  }
  .dashboard-filter-row .field {
    min-width: 100%;
    max-width: none;
  }
  .dashboard-hero-actions,
  .dashboard-filter-shortcuts {
    width: 100%;
  }
  .dashboard-hero-actions .btn,
  .dashboard-filter-shortcuts .btn {
    flex: 1 1 160px;
  }
}
