/* SAP Business One Web Client - Cloned UI Styles */

/* ===== SAP 72 Font (closest match) ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --sap-font: 'Inter', Arial, Helvetica, sans-serif;
  --sap-shell-bg: #fff;
  --sap-content-bg: #f5f6f7;
  --sap-text-primary: #1d2d3e;
  --sap-text-secondary: #556b82;
  --sap-brand-blue: #0070f2;
  --sap-brand-blue-hover: #0064d9;
  --sap-tile-shadow: 0 0 2px 0 rgba(34,53,72,0.2), 0 2px 4px 0 rgba(34,53,72,0.2);
  --sap-tile-shadow-hover: 0 0 2px 0 rgba(34,53,72,0.2), 0 8px 16px 0 rgba(34,53,72,0.2);
  --sap-tab-shadow: 0 2px 2px 0 rgba(34,53,72,0.15), 0 -1px 0 0 rgba(34,53,72,0.2) inset;
  --sap-header-height: 52px;
  --sap-tab-height: 44px;
  --sap-tile-size: 176px;
  --sap-tile-radius: 16px;
  --sap-tile-gap: 16px;
  --sap-footer-color: #0064d9;
  --sap-number-color: #1d2d3e;
  --sap-icon-color: #556b82;
}

/* ===== Reset for SAP layout ===== */
body.sap-b1 {
  font-family: var(--sap-font);
  background-color: var(--sap-content-bg);
  color: var(--sap-text-primary);
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-size: 14px;
}

body.sap-b1 * {
  box-sizing: border-box;
}

/* ===== Shell Header ===== */
.sap-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--sap-header-height);
  background: var(--sap-shell-bg);
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.sap-shell-header-begin {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sap-shell-header-center {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sap-shell-header-end {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sap-shell-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  color: var(--sap-text-primary);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.sap-shell-menu-btn:hover {
  background: rgba(29,45,62,0.07);
}

.sap-shell-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sap-shell-logo img {
  height: 26px;
}

.sap-shell-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #0070f2;
  letter-spacing: -0.3px;
}

.sap-shell-logo-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--sap-text-primary);
  margin-left: 2px;
}

.sap-shell-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--sap-text-primary);
}

.sap-shell-company {
  font-size: 14px;
  font-weight: 400;
  color: var(--sap-text-secondary);
}

.sap-shell-head-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sap-text-primary);
  font-size: 16px;
  position: relative;
}

.sap-shell-head-btn:hover {
  background: rgba(29,45,62,0.07);
}

.sap-shell-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sap-brand-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}

.sap-shell-avatar:hover {
  background: var(--sap-brand-blue-hover);
}

.sap-notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #e00;
  border-radius: 50%;
}

/* ===== Anchor Navigation Bar (Tabs) ===== */
.sap-anchor-bar {
  display: flex;
  align-items: center;
  height: var(--sap-tab-height);
  background: var(--sap-shell-bg);
  padding: 0 32px;
  box-shadow: var(--sap-tab-shadow);
  position: sticky;
  top: var(--sap-header-height);
  z-index: 99;
  overflow: hidden;
}

.sap-anchor-bar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}

.sap-anchor-bar-inner::-webkit-scrollbar {
  display: none;
}

.sap-anchor-item {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--sap-text-primary);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: border-color 0.15s, color 0.15s;
  user-select: none;
}

.sap-anchor-item:hover {
  color: var(--sap-brand-blue);
  text-decoration: none;
}

.sap-anchor-item.active {
  color: var(--sap-brand-blue);
  font-weight: 600;
  border-bottom-color: var(--sap-brand-blue);
}

.sap-anchor-overflow {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding-left: 8px;
}

.sap-anchor-overflow-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sap-text-primary);
  font-size: 14px;
}

.sap-anchor-overflow-btn:hover {
  background: rgba(29,45,62,0.07);
}

/* ===== Content Area ===== */
.sap-content {
  height: calc(100vh - var(--sap-header-height) - var(--sap-tab-height));
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 32px;
}

/* ===== Section Groups ===== */
.sap-section {
  margin-bottom: 32px;
}

.sap-section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--sap-text-primary);
  margin-bottom: 16px;
}

/* ===== Tile Grid ===== */
.sap-tile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sap-tile-gap);
}

/* ===== Tiles ===== */
.sap-tile {
  width: var(--sap-tile-size);
  height: var(--sap-tile-size);
  background: #fff;
  border-radius: var(--sap-tile-radius);
  box-shadow: var(--sap-tile-shadow);
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.2s, transform 0.15s;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  position: relative;
}

.sap-tile:hover {
  box-shadow: var(--sap-tile-shadow-hover);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}

.sap-tile-long {
  width: calc(var(--sap-tile-size) * 2 + var(--sap-tile-gap));
  height: var(--sap-tile-size);
}

/* Tile Header */
.sap-tile-header {
  font-size: 14px;
  font-weight: 400;
  color: var(--sap-text-secondary);
  line-height: 1.4;
  max-height: 40px;
  overflow: hidden;
}

/* Tile Content - middle area with icon and number */
.sap-tile-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex: 1;
  padding: 4px 0;
}

.sap-tile-icon {
  font-size: 28px;
  color: var(--sap-icon-color);
  opacity: 0.7;
}

.sap-tile-number {
  font-size: 36px;
  font-weight: 300;
  color: var(--sap-number-color);
  line-height: 1;
}

/* Tile Footer */
.sap-tile-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--sap-footer-color);
}

.sap-tile-footer i {
  font-size: 11px;
}

.sap-tile-footer-label {
  color: var(--sap-text-secondary);
  margin-left: 2px;
}

/* ===== News Feed Tile (Long) ===== */
.sap-tile-news {
  position: relative;
  overflow: hidden;
  padding: 0;
}

.sap-tile-news-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.sap-tile-news-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
}

.sap-tile-news-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.sap-tile-news-subtitle {
  font-size: 12px;
  opacity: 0.85;
}

/* ===== Action Tiles (Create) ===== */
.sap-tile-action .sap-tile-content {
  justify-content: flex-start;
  align-items: flex-end;
}

.sap-tile-action .sap-tile-icon {
  font-size: 32px;
  color: var(--sap-icon-color);
  opacity: 0.5;
}

/* ===== Login Page ===== */
.sap-login-page {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.sap-login-cover {
  flex: 0 0 50%;
  position: relative;
  overflow: hidden;
}

.sap-login-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sap-login-cover-logo {
  position: absolute;
  top: 32px;
  left: 32px;
  height: 36px;
  z-index: 1;
}

.sap-login-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
  background: #fff;
}

.sap-login-form-wrapper {
  width: 100%;
  max-width: 400px;
}

.sap-login-form-wrapper h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--sap-text-primary);
  margin-bottom: 32px;
}

/* Select Dropdown (SAP style) */
.sap-select {
  position: relative;
  margin-bottom: 20px;
}

.sap-select-input {
  width: 100%;
  height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid #bcc3ca;
  border-radius: 4px;
  font-size: 14px;
  font-family: var(--sap-font);
  color: var(--sap-text-primary);
  background: #fff;
  outline: none;
  cursor: pointer;
  appearance: none;
}

.sap-select-input:focus {
  border-color: var(--sap-brand-blue);
  box-shadow: 0 0 0 2px rgba(0,112,242,0.15);
}

.sap-select-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sap-text-secondary);
  pointer-events: none;
  font-size: 12px;
}

.sap-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #bcc3ca;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-height: 240px;
  overflow-y: auto;
  z-index: 10;
  display: none;
}

.sap-select-dropdown.show {
  display: block;
}

.sap-select-search {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-bottom: 1px solid #e5e5e5;
  font-size: 13px;
  outline: none;
}

.sap-select-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.sap-select-item:hover {
  background: #e8f0fe;
}

.sap-select-item-sub {
  font-size: 11px;
  color: #8a9bae;
  margin-top: 2px;
}

/* Text Input (SAP style) */
.sap-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #bcc3ca;
  border-radius: 4px;
  font-size: 14px;
  font-family: var(--sap-font);
  color: var(--sap-text-primary);
  background: #fff;
  outline: none;
  margin-bottom: 20px;
}

.sap-input::placeholder {
  color: #a9b4be;
}

.sap-input:focus {
  border-color: var(--sap-brand-blue);
  box-shadow: 0 0 0 2px rgba(0,112,242,0.15);
}

/* Login Button */
.sap-btn-primary {
  width: 100%;
  height: 44px;
  background: var(--sap-brand-blue);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--sap-font);
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
}

.sap-btn-primary:hover {
  background: var(--sap-brand-blue-hover);
}

.sap-btn-primary:disabled {
  background: #94b8e0;
  cursor: not-allowed;
}

.sap-login-link {
  display: block;
  margin-top: 16px;
  font-size: 14px;
  color: var(--sap-brand-blue);
  text-decoration: none;
}

.sap-login-link:hover {
  text-decoration: underline;
}

/* Error message */
.sap-error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sap-shell-header {
    padding: 0 12px;
  }

  .sap-anchor-bar {
    padding: 0 12px;
  }

  .sap-content {
    padding: 16px;
  }

  .sap-tile {
    width: calc(50% - 8px);
    height: 160px;
  }

  .sap-tile-long {
    width: 100%;
  }

  .sap-tile-number {
    font-size: 28px;
  }

  .sap-login-cover {
    display: none;
  }

  .sap-login-content {
    padding: 24px;
  }

  .sap-shell-company {
    display: none;
  }
}

@media (max-width: 480px) {
  .sap-tile {
    width: 100%;
  }
}

/* ===== User Dropdown ===== */
.sap-user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  min-width: 200px;
  padding: 8px 0;
  z-index: 200;
  display: none;
}

.sap-user-dropdown.show {
  display: block;
}

.sap-user-dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--sap-text-primary);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sap-user-dropdown-item:hover {
  background: #f0f1f2;
}

.sap-user-dropdown-divider {
  height: 1px;
  background: #e5e5e5;
  margin: 4px 0;
}

/* ===== Side Navigation Panel ===== */
.sap-side-nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 149;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.sap-side-nav-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.sap-side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100%;
  background: #fff;
  z-index: 150;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.sap-side-nav.open {
  transform: translateX(0);
}

/* Side Nav Header */
.sap-side-nav-header {
  display: flex;
  align-items: center;
  height: var(--sap-header-height);
  padding: 0 12px;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.sap-side-nav-search {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  background: #f5f6f7;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 0 10px;
  gap: 8px;
}

.sap-side-nav-search i {
  color: var(--sap-text-secondary);
  font-size: 13px;
  flex-shrink: 0;
}

.sap-side-nav-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  font-family: var(--sap-font);
  color: var(--sap-text-primary);
  width: 100%;
}

.sap-side-nav-search input::placeholder {
  color: #a9b4be;
}

/* Side Nav Menu Area */
.sap-side-nav-menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0;
}

.sap-side-nav-menu::-webkit-scrollbar {
  width: 4px;
}

.sap-side-nav-menu::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 2px;
}

/* Menu Group */
.sap-side-nav-group {
  user-select: none;
}

.sap-side-nav-group-header {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  cursor: pointer;
  gap: 10px;
  color: var(--sap-text-primary);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s;
}

.sap-side-nav-group-header:hover {
  background: rgba(29, 45, 62, 0.07);
}

.sap-side-nav-group-header i.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--sap-text-secondary);
  flex-shrink: 0;
}

.sap-side-nav-group-header span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sap-side-nav-group-header i.nav-chevron {
  font-size: 10px;
  color: var(--sap-text-secondary);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.sap-side-nav-group.open > .sap-side-nav-group-header i.nav-chevron {
  transform: rotate(90deg);
}

/* Direct link (no submenu) */
a.sap-side-nav-group-header {
  text-decoration: none;
  color: var(--sap-text-primary);
}

a.sap-side-nav-group-header:hover {
  text-decoration: none;
  color: var(--sap-text-primary);
}

/* Submenu */
.sap-side-nav-submenu {
  display: none;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sap-side-nav-group.open > .sap-side-nav-submenu {
  display: block;
}

.sap-side-nav-submenu a {
  display: block;
  padding: 9px 12px 9px 42px;
  font-size: 13px;
  color: var(--sap-text-primary);
  text-decoration: none;
  transition: background 0.12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sap-side-nav-submenu a:hover {
  background: rgba(29, 45, 62, 0.07);
  text-decoration: none;
}

.sap-side-nav-submenu a.active {
  color: var(--sap-brand-blue);
  font-weight: 600;
  border-left: 3px solid var(--sap-brand-blue);
  padding-left: 39px;
  background: rgba(0, 112, 242, 0.06);
}

.sap-side-nav-submenu .nav-placeholder {
  padding: 9px 12px 9px 42px;
  font-size: 12px;
  color: var(--sap-text-secondary);
  font-style: italic;
}

/* ===== Placeholder Tile (Coming Soon) ===== */
.sap-tile-placeholder {
  opacity: 0.55;
  cursor: pointer;
}

.sap-tile-placeholder:hover {
  opacity: 0.7;
}

/* ===== Toast Notification ===== */
.sap-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: #354a5f;
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--sap-font);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 99999;
  display: none;
  pointer-events: none;
  white-space: nowrap;
}

.sap-toast.show {
  display: block;
}

/* ===== SAP B1 List & Table Styles ===== */

/* Table base */
body.sap-b1 .table {
  font-size: 13px;
  border-color: #e5e5e5;
  margin-bottom: 0;
}

/* Table header - SAP B1 light style */
body.sap-b1 thead.table-dark,
body.sap-b1 thead.table-dark th {
  --bs-table-bg: #f5f6f7 !important;
  --bs-table-color: var(--sap-text-secondary) !important;
  background-color: #f5f6f7 !important;
  color: var(--sap-text-secondary) !important;
  border-color: #dee2e6 !important;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 12px !important;
  white-space: nowrap;
}

/* Sort links in header */
body.sap-b1 thead.table-dark a,
body.sap-b1 thead.table-dark a:hover {
  color: var(--sap-text-secondary) !important;
  text-decoration: none;
}

body.sap-b1 thead.table-dark a:hover {
  color: var(--sap-brand-blue) !important;
}

body.sap-b1 thead.table-dark a .fas {
  font-size: 10px;
  opacity: 0.5;
  margin-left: 2px;
}

/* Table body rows */
body.sap-b1 .table > tbody > tr {
  border-bottom: 1px solid #f0f1f2;
  transition: background 0.1s;
}

body.sap-b1 .table > tbody > tr > td {
  padding: 8px 12px;
  vertical-align: middle;
  color: var(--sap-text-primary);
}

body.sap-b1 .table-hover > tbody > tr:hover {
  --bs-table-hover-bg: rgba(0, 112, 242, 0.04);
  --bs-table-hover-color: var(--sap-text-primary);
}

/* Card container */
body.sap-b1 .card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

body.sap-b1 .card-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  font-weight: 600;
  font-size: 14px;
  color: var(--sap-text-primary);
  padding: 12px 16px;
}

body.sap-b1 .card-footer {
  background: #fafbfc;
  border-top: 1px solid #eee;
  padding: 8px 16px;
}

/* SAP-style toolbar area */
body.sap-b1 .d-flex.justify-content-between.align-items-center.mb-3 {
  padding-bottom: 4px;
}

/* Search bar SAP style */
body.sap-b1 .input-group .form-control {
  border-color: #bcc3ca;
  font-size: 13px;
  font-family: var(--sap-font);
}

body.sap-b1 .input-group .form-control:focus {
  border-color: var(--sap-brand-blue);
  box-shadow: 0 0 0 2px rgba(0, 112, 242, 0.12);
}

body.sap-b1 .input-group .btn-outline-secondary {
  border-color: #bcc3ca;
  color: var(--sap-text-secondary);
  font-size: 13px;
}

/* SAP-style action buttons in table */
body.sap-b1 .btn-outline-primary {
  border-color: #0070f2;
  color: #0070f2;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
}

body.sap-b1 .btn-outline-primary:hover {
  background: rgba(0, 112, 242, 0.08);
  color: #0064d9;
  border-color: #0064d9;
}

body.sap-b1 .btn-outline-danger {
  border-color: #ee6868;
  color: #ee6868;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
}

body.sap-b1 .btn-outline-danger:hover {
  background: rgba(238, 104, 104, 0.08);
  color: #d04545;
  border-color: #d04545;
}

/* SAP-style primary button */
body.sap-b1 .btn-primary {
  background: var(--sap-brand-blue);
  border-color: var(--sap-brand-blue);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 4px;
  font-family: var(--sap-font);
}

body.sap-b1 .btn-primary:hover {
  background: var(--sap-brand-blue-hover);
  border-color: var(--sap-brand-blue-hover);
}

/* SAP-style secondary/outline button */
body.sap-b1 .btn-outline-secondary {
  font-size: 13px;
  font-weight: 400;
  border-radius: 4px;
  font-family: var(--sap-font);
}

/* SAP-style badges */
body.sap-b1 .badge {
  font-weight: 500;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.2px;
}

body.sap-b1 .badge.bg-success {
  background: #e6f4ea !important;
  color: #137333 !important;
}

body.sap-b1 .badge.bg-secondary {
  background: #f0f1f2 !important;
  color: #556b82 !important;
}

body.sap-b1 .badge.bg-danger {
  background: #fce8e8 !important;
  color: #c5221f !important;
}

body.sap-b1 .badge.bg-warning {
  background: #fef7e0 !important;
  color: #945b00 !important;
}

body.sap-b1 .badge.bg-info {
  background: #e8f0fe !important;
  color: #1967d2 !important;
}

body.sap-b1 .badge.bg-primary {
  background: #e8f0fe !important;
  color: #1967d2 !important;
}

/* Pagination SAP style */
body.sap-b1 .card-footer .text-muted {
  font-size: 12px;
  color: var(--sap-text-secondary) !important;
}

body.sap-b1 .card-footer .btn-sm {
  font-size: 12px;
  padding: 3px 10px;
}

/* Empty state */
body.sap-b1 .card-body .text-muted {
  color: var(--sap-text-secondary) !important;
  font-size: 13px;
}

/* Modal SAP style */
body.sap-b1 .modal-header.bg-primary {
  background: var(--sap-brand-blue) !important;
}

body.sap-b1 .modal-header.bg-warning {
  background: #e8743b !important;
  color: #fff;
}

body.sap-b1 .modal-header.bg-warning .btn-close {
  filter: brightness(0) invert(1);
}

body.sap-b1 .modal-header.bg-danger {
  background: #ee6868 !important;
}

body.sap-b1 .modal-header {
  padding: 12px 16px;
}

body.sap-b1 .modal-title {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--sap-font);
}

body.sap-b1 .modal-body .form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--sap-text-secondary);
  margin-bottom: 4px;
  font-family: var(--sap-font);
}

body.sap-b1 .modal-body .form-control,
body.sap-b1 .modal-body .form-select {
  font-size: 13px;
  border-color: #bcc3ca;
  border-radius: 4px;
  font-family: var(--sap-font);
}

body.sap-b1 .modal-body .form-control:focus,
body.sap-b1 .modal-body .form-select:focus {
  border-color: var(--sap-brand-blue);
  box-shadow: 0 0 0 2px rgba(0, 112, 242, 0.12);
}

/* Page title */
body.sap-b1 .fs-5.fw-semibold {
  font-size: 16px !important;
  font-weight: 600;
  color: var(--sap-text-primary);
  font-family: var(--sap-font);
}

/* Spinner */
body.sap-b1 .spinner-border.text-primary {
  color: var(--sap-brand-blue) !important;
}
