body { background: #f6f7f9; }
.btn, .form-control, .form-select, .card, .modal-content { border-radius: 0 !important; }
.btn-primary, .btn-success, .btn-warning, .btn-danger, .btn-secondary {
    background-color: #e0e1e2;
    color: #222;
    border: 1px solid #bfc0c2;
}
.btn-primary:hover, .btn-success:hover, .btn-warning:hover, .btn-danger:hover, .btn-secondary:hover {
    background-color: #cfd0d2;
    color: #111;
}
.btn-primary:active, .btn-success:active, .btn-warning:active, .btn-danger:active, .btn-secondary:active {
    background-color: #bfc0c2;
    color: #111;
}
.table, .table-bordered, .table-light, .bg-white {
    background-color: #fff !important;
    border-radius: 0 !important;
}
.card, .modal-content {
    box-shadow: none !important;
    border: 1px solid #e5e7eb;
}
.form-label { color: #444; }
.modal-header, .modal-footer { border-radius: 0 !important; }
th.sortable { cursor: pointer; }
.nav-tabs .nav-link {
    border-radius: 0 !important;
    color: #555;
    background: #f6f7f9;
    border: 1px solid #e5e7eb;
    margin-right: 2px;
}
.nav-tabs .nav-link.active {
    background: #fff;
    color: #222;
    border-bottom: 1px solid #fff;
}

/* Minimal, sharp-edged, muted pagination */
.pagination {
  --bs-pagination-border-radius: 0 !important;
  --bs-pagination-bg: #f8f9fa;
  --bs-pagination-border-color: #dee2e6;
  --bs-pagination-hover-bg: #e9ecef;
  --bs-pagination-hover-border-color: #bfc2c5;
  --bs-pagination-active-bg: #e0e0e0;
  --bs-pagination-active-border-color: #bfc2c5;
  --bs-pagination-color: #444;
  --bs-pagination-hover-color: #222;
  --bs-pagination-active-color: #111;
  margin-bottom: 0;
}
.pagination .page-link {
  border-radius: 0 !important;
  color: var(--bs-pagination-color);
  background: var(--bs-pagination-bg);
  border: 1px solid var(--bs-pagination-border-color);
  transition: background 0.15s, color 0.15s;
}
.pagination .page-link:hover {
  background: var(--bs-pagination-hover-bg);
  color: var(--bs-pagination-hover-color);
  border-color: var(--bs-pagination-hover-border-color);
}
.pagination .active .page-link {
  background: var(--bs-pagination-active-bg);
  color: var(--bs-pagination-active-color);
  border-color: var(--bs-pagination-active-border-color);
}

/* Muted blue badge for stock levels */
.badge-mute-blue {
  background-color: #e3eaf6 !important;
  color: #356094 !important;
  font-weight: 500;
  font-size: 0.97em;
  padding: 0.32em 0.8em;
  border-radius: 0 !important;
}
/* Make all badges in the stock table sharp-cornered and a bit smaller */
td > .badge {
  font-size: 0.97em;
  padding: 0.32em 0.8em;
  border-radius: 0 !important;
}

/* Logo image styling for navbar */
.logo-navbar {
  width: 100px;
  height: 128px;
  object-fit: contain;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.5rem;
}

/* RTL tweaks */
[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}
[dir="rtl"] .text-start { text-align: right !important; }
[dir="rtl"] .text-end { text-align: left !important; }
[dir="rtl"] .ms-2 { margin-left: 0 !important; margin-right: .5rem !important; }
[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: .5rem !important; }
[dir="rtl"] .ps-3 { padding-left: 0 !important; padding-right: 1rem !important; }
[dir="rtl"] .pe-3 { padding-right: 0 !important; padding-left: 1rem !important; }
[dir="rtl"] .offcanvas-start { left: auto; right: 0; }
[dir="rtl"] .offcanvas { border-left: none; border-right: 1px solid #dee2e6; }
[dir="rtl"] .modal-dialog { direction: rtl; }

/* Table Component Styles */
.table-component .sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

.table-component .sortable:hover {
  background-color: #f8f9fa;
}

.table-component .sortable a {
  color: inherit !important;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  margin: -0.5rem -0.75rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.table-component .sortable a:hover {
  color: #222 !important;
  background-color: rgba(0,0,0,0.05);
}

/* Search form improvements */
.table-component .d-flex.gap-2 {
  gap: 0.5rem !important;
}

.table-component .d-flex.gap-2 .form-control {
  flex: 1;
  min-width: 200px;
}

.table-component .d-flex.gap-2 .btn {
  white-space: nowrap;
}

/* Filter section improvements */
.table-component #toggleFiltersBtn {
  transition: all 0.2s ease;
  border: 1px solid #dee2e6;
  background: #fff;
}

.table-component #toggleFiltersBtn:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table-component #filterChevron {
  transition: transform 0.2s ease;
  font-size: 0.8rem;
}

.table-component .collapse .card {
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.table-component .collapse .card-body {
  background-color: #fafbfc;
  padding: 1.25rem;
}

.table-component .form-label.small {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: #6c757d;
  font-weight: 600;
}

/* Mobile card improvements */
@media (max-width: 767px) {
  .table-component .card .card-body {
    padding: 1rem;
  }
  
  .table-component .row.mb-2 {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem !important;
  }
  
  .table-component .row.mb-2:last-of-type {
    border-bottom: none;
  }
  
  .table-component .fw-bold {
    font-size: 0.875rem;
    color: #666;
  }
}

/* Pagination improvements */
.table-component .pagination {
  flex-wrap: wrap;
  justify-content: center;
}

.table-component .pagination .page-link {
  min-width: 40px;
  text-align: center;
}

/* Filter section improvements */
.table-component .row.g-3 {
  align-items: end;
}

.table-component .btn-outline-secondary {
  border-color: #dee2e6;
  color: #6c757d;
}

.table-component .btn-outline-secondary:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
  color: #495057;
}

/* Checkin/Checkout Operation Styles */
.operation-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 32px;
}
.operation-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e9ecef;
}
.operation-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 24px;
    color: white;
}
.checkin-icon {
    background: linear-gradient(135deg, #28a745, #20c997);
}
.checkout-icon {
    background: linear-gradient(135deg, #007bff, #0056b3);
}
.form-section {
    margin-bottom: 32px;
}
.form-section:last-child {
    margin-bottom: 0;
}
.section-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 16px;
    font-size: 1.1rem;
}
.barcode-scan-btn, .barcode-scanner-container {
    display: none;
}
@media (max-width: 767px) {
    .barcode-scan-btn, .barcode-scanner-container {
        display: inline-block;
    }
    .barcode-scanner-container {
        width: 100%;
        max-width: 320px;
        margin-top: 8px;
    }
}
.recent-transactions {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.page-navigation {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}
.nav-pills .nav-link {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-pills .nav-link.active {
    background-color: #007bff;
    color: white;
}
.nav-pills .nav-link:not(.active) {
    background-color: white;
    color: #6c757d;
    border: 1px solid #dee2e6;
}
.nav-pills .nav-link:not(.active):hover {
    background-color: #e9ecef;
    color: #495057;
}
.alert {
    border-radius: 8px;
    margin-bottom: 24px;
}

@media (min-width: 992px) {
  [dir="rtl"] body {
    margin-left: 0 !important;
    margin-right: 220px !important;
  }
  [dir="ltr"] body {
    margin-left: 220px !important;
    margin-right: 0 !important;
  }
}

/* Simple quantity field highlight */
input[name="quantity"] {
    border-color: #007bff !important;
}

/* ========================================
   NAVBAR & MOBILE NAVIGATION STYLES
   ======================================== */

/* Desktop sidebar behavior */
@media (min-width: 992px) {
  body { margin-left: 220px; }
  .offcanvas-start { position: fixed !important; visibility: visible !important; transform: none !important; }
  .offcanvas { border-radius: 0 !important; }
  .offcanvas-backdrop { display: none !important; }
  #sidebarOffcanvas { top: 0; height: 100vh; }
  .offcanvas-header .btn-close { display: none; }
}

@media (max-width: 991.98px) {
  body { margin-left: 0; }
}

/* Bottom navigation for mobile */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 60px;
  height: auto;
  background: #fff;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1050;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-link {
  flex: 1 1 0;
  text-align: center;
  color: #222;
  font-size: 2.2rem;
  padding: 0.3em 0 0.1em 0;
  text-decoration: none;
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.bottom-nav-link i {
  font-size: 2.2rem;
  display: block;
  margin: 0 auto;
  line-height: 1;
}

.bottom-nav-link:active, .bottom-nav-link:focus {
  color: #0d6efd;
  background: #f0f4ff;
}

@media (min-width: 768px) {
  .bottom-nav { display: none !important; }
}

@media (max-width: 991.98px) {
  .offcanvas-start { top: 0; height: 100vh; }
}

body {
  padding-bottom: calc(60px + env(safe-area-inset-bottom, 0));
}

/* Hide Bootstrap offcanvas on mobile */
@media (max-width: 767.98px) {
  html {
    font-size: 90%;
  }
  .offcanvas { display: none !important; }
  .container, .main-content {
    min-height: calc(100vh - 60px - env(safe-area-inset-bottom, 0));
  }
}

/* Mobile full-screen menu */
.mobile-full-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
}

.mobile-full-menu.show {
  display: flex;
}

.mobile-full-menu-content {
  background: #fff;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  overflow-y: auto;
}

.mobile-menu-logo-wrapper {
  text-align: center;
  margin-bottom: 2rem;
}

.mobile-menu-logo-img {
  max-width: 80px;
  height: auto;
}

.close-mobile-menu {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: #333;
  padding: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 300px;
}

.mobile-menu-list li {
  margin: 0;
}

.mobile-menu-list a {
  display: block;
  padding: 1rem;
  text-decoration: none;
  color: #333;
  font-size: 1.1rem;
  text-align: center;
}

.mobile-menu-divider {
  height: 1px;
  background: #eee;
  margin: 0.5rem 0;
}

.mobile-lang-switcher {
  width: 100%;
  max-width: 300px;
}

.mobile-lang-switcher label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
}

.mobile-lang-switcher select {
  width: 100%;
} 