:root {
  --primary: #f59e0b;
  --primary-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --primary-hover: #d97706;
  --secondary: #64748b;
  --success: #f59e0b; /* Using primary theme for success too as requested */
  --danger: #f59e0b;
  --warning: #f59e0b;
  --info: #f59e0b;
  --dark: #0f172a;
  --light: #ffffff;
  --gray-100: #f8fafc;
  --gray-200: #f1f5f9;
  --gray-300: #e2e8f0;
  --gray-800: #1e293b;
  --accent: #f59e0b;


  --surface: #ffffff;
  --sidebar-width: 270px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --header-height: 70px;
}

body {
  font-family: "Outfit", sans-serif;
  background-color: #fafafa;
  color: #111111;
  margin: 0;
  padding: 0;
}

/* Hide number input arrows globally */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

.sidebar {
  width: 280px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: #1e293b; /* Dark Slate Background */
  border-right: none;
  z-index: 1050;
  transition: var(--transition);
  overflow-y: auto;
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
  transform: translateX(-100%);
}
.sidebar.show {
  transform: translateX(0) !important;
}

.sidebar .sidebar-text, 
.sidebar .sidebar-logo h4,
.sidebar #sidebarToggle i {
  color: #f1f5f9 !important; /* Light Text */
}

.sidebar .sidebar-logo .bg-danger {
  background: var(--primary) !important;
}

/* Toggle button specific */

#sidebarToggle {
  background: var(--primary) !important;
  border: none !important;
  color: white !important;
  margin-right: -10px;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.2);
}

#sidebarToggle:hover {
  background: #b91c1c !important;
  transform: scale(1.05);
}

#sidebarToggle i {
  color: white !important;
}




.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  display: none;
  backdrop-filter: blur(4px);
  transition: var(--transition);
}
.sidebar-overlay.show {
  display: block;
}

.sidebar .nav-link {
  color: #94a3b8;
  transition: var(--transition);
  border: 1px solid transparent;
  margin: 0 12px;
  font-weight: 500;
}

.sidebar .nav-link i {
  color: #64748b;
}

.sidebar .nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(5px);
}

.sidebar .nav-link {
  color: #94a3b8;
  transition: all 0.2s ease;
  border: none !important;
  position: relative;
  overflow: hidden;
}

.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: white !important;
}

.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.08) !important; /* Slightly darker than slate but lighter than sidebar bg */
  color: white !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.sidebar .nav-link.active i {
  color: var(--primary) !important;
  background: none !important;
}

.sidebar .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background: var(--primary-gradient);
  border-radius: 0 10px 10px 0;
}









.sidebar-logo {
  margin-bottom: 0 !important; /* Reset to rely on container padding */
}

#sidebarToggle {
  background: var(--primary-gradient) !important;
  border: none !important;
  color: white !important;
  margin-right: -10px;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

#sidebarToggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4);
}



.dropdown-arrow {
  transition: transform 0.3s ease;
}

[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
  opacity: 1 !important;
}

.sidebar .nav-link:not(.active):hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}



  .sidebar .collapse {
  margin: 0;
  padding: 0;
  background: transparent;
}

.sidebar .collapse .nav-link {
  padding: 8px 15px 8px 56px !important; /* indented from left */
  font-size: 0.9rem !important;
  color: #94a3b8;
  opacity: 0.8;
}

.sidebar .collapse .nav-link.active {
  background: transparent !important;
  opacity: 1;
  color: white !important;
  font-weight: 500 !important;
}

/* Global Table Responsiveness */
.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

@media screen and (max-width: 768px) {
    .main-content { padding: 20px 15px !important; }
    .table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
    .table tbody tr { display: block; margin-bottom: 15px; border: 1px solid #f1f5f9; border-radius: 15px; padding: 10px; background: white; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
    .table tbody td { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border: none !important; }
    .table tbody td::before { content: attr(data-label); font-weight: 700; color: #64748b; font-size: 11px; text-transform: uppercase; }
}

.sidebar .collapse .d-flex.flex-column {
  position: relative;
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}

.sidebar .collapse .nav-link {
  font-size: 0.9rem;
  padding: 8px 15px 8px 56px !important;
  color: #94a3b8;
  margin: 0;
  border-radius: 0;
  background: transparent !important;
}

.sidebar .collapse .nav-link::before {
  display: none;
}

.sidebar .collapse .nav-link:hover {
  background: transparent !important;
  color: white !important;
  opacity: 1;
}

.sidebar .collapse .nav-link i {
  display: none !important;
}

.sidebar .collapse .nav-link.active-leaf {
  color: var(--primary) !important;
  font-weight: 500 !important;
  background: transparent !important;
  margin: 0;
  padding: 8px 15px 8px 56px !important;
  box-shadow: none;
  opacity: 1;
}

.sidebar .collapse .nav-link.active-leaf .sidebar-text {
  color: var(--primary) !important;
}

.sidebar .collapse .nav-link.active-leaf i {
  display: none !important;
}

/* Active Dropdown Styling */
.sidebar .nav-link[data-bs-toggle="collapse"][aria-expanded="true"] {
  background: rgba(0, 0, 0, 0.1) !important;
  border-color: transparent !important;
  color: white !important;
}







/* =========================================
   GLOBAL COMPONENT: BUTTONS
   ========================================= */
.btn {
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* 1. Primary Button (Theme Yellow/Orange) */
.btn-primary, .btn-warning, .btn-info {
  background: var(--primary-gradient) !important;
  border: none !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25) !important;
}
.btn-primary:hover, .btn-warning:hover, .btn-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4) !important;
  color: white !important;
}

/* 2. Secondary/Light Button (Neutral Actions) */
.btn-light, .btn-secondary, .btn-dark {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}
.btn-light:hover, .btn-secondary:hover, .btn-dark:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: var(--primary) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05) !important;
}

/* 3. Danger Button (Delete/Remove Actions) */
.btn-danger {
  background: #fef2f2 !important;
  border: 1px solid #fee2e2 !important;
  color: #dc2626 !important;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.05) !important;
}
.btn-danger:hover {
  background: #fee2e2 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15) !important;
  color: #b91c1c !important;
}

/* 4. Outline Primary (Alternative Primary Action) */
.btn-outline-primary {
  background: transparent !important;
  border: 2px solid var(--primary) !important;
  color: var(--primary) !important;
}
.btn-outline-primary:hover {
  background: var(--primary) !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

/* 5. Success Button (Confirm/Approve) */
.btn-success {
  background: #f0fdf4 !important;
  border: 1px solid #dcfce7 !important;
  color: #16a34a !important;
  box-shadow: 0 2px 4px rgba(22, 163, 74, 0.05) !important;
}
.btn-success:hover {
  background: #dcfce7 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15) !important;
  color: #15803d !important;
}

/* Small Button Modifier */
.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
  border-radius: 8px;
}

/* Background Utilities Reset */
.bg-info { background: #3b82f6 !important; }
.bg-success { background: #10b981 !important; }
.bg-warning { background: #f59e0b !important; }
.bg-danger { background: #ef4444 !important; }

.logo-icon {
  background: var(--primary);
  border-radius: 12px;
}

/* Main Content */
.main-content {
  margin-left: 0 !important;
  padding: 1.5rem;
  padding-top: calc(var(--header-height) + 1.25rem) !important;
  min-height: 100vh;
  transition: var(--transition);
}

.main-content > header {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Dashboard Top Header */
.dashboard-header {
  display: flex !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #1e293b !important;
  border-bottom: 1px solid #334155;
  z-index: 1030;
  padding: 0 1.5rem;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Premium Table Management Cards */
.table-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid #f1f5f9;
  background: #ffffff;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.table-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: #f1f5f9;
  transition: var(--transition);
}

.table-card.available::before {
  background: var(--success);
}
.table-card.occupied::before {
  background: var(--primary);
}

/* Shadows removed to prevent overriding */

.table-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.table-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.available .table-icon-circle {
  background: #f0fdf4;
  color: #16a34a;
}
.occupied .table-icon-circle {
  background: #fef2f2;
  color: #dc2626;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.1);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.available .status-indicator {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}
.occupied .status-indicator {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.table-actions-modern {
  background: #f8fafc;
  border-top: 2px solid #f1f5f9;
  padding: 12px 20px 20px;
  margin-top: auto;
  border-radius: 0 0 28px 28px;
}

.action-btn-modern {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #eef2f6;
  background: white;
  color: #64748b;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.action-btn-modern:hover {
  background: white;
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.12);
}

.action-btn-modern.delete:hover {
  color: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12);
}

/* Responsive Grid for Tables */
@media (max-width: 767.98px) {
  .tables-grid > div {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* POS Interface - Optimized Sizing */
.pos-container {
  display: flex;
  height: calc(100vh - 80px);
  gap: 1.5rem;
  padding: 1.5rem;
}

@media (min-width: 992px) and (max-width: 1200px) {
  .pos-container {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  .menu-section {
    border-radius: 12px;
  }
  .order-section {
    border-radius: 12px;
    min-width: 320px;
  }
}

@media (max-width: 991.98px) {
  .pos-container {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    gap: 1rem;
  }
}

.menu-section {
  flex: 1.8;
  background: var(--surface);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

@media (max-width: 991.98px) {
  .menu-section {
    flex: none;
    height: 500px; /* Fixed height for menu on mobile to allow scrolling categories/items */
  }
}

.order-section {
  flex: 1;
  background: var(--surface);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  min-width: 360px;
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

@media (max-width: 991.98px) {
  .order-section {
    min-width: 0;
    width: 100%;
    flex: none;
  }
}

.order-footer {
  margin-top: auto;
  background: white;
  border-top: 1px solid var(--gray-200);
  position: sticky;
  bottom: 0;
  z-index: 5;
}

.category-pills {
  display: flex;
  gap: 10px;
  padding: 16px 20px !important;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  align-items: center;
  min-height: 64px;
}
.category-pills::-webkit-scrollbar {
  display: none; /* Hide scrollbar for cleaner look on touch devices */
}

.category-pill {
  padding: 0.35rem 1rem;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--gray-200);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--gray-600);
  margin: 0 !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.category-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25);
}

.menu-item-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 1rem;
  transition: var(--transition);
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 575.98px) {
  .menu-item-card {
    padding: 0.75rem;
  }
}

.menu-item-card:hover {
  border-color: var(--primary);
  background: #fff;
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.item-card-image {
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.item-card-image.no-img i {
  font-size: 1.5rem;
  color: var(--gray-300);
}

@media (max-width: 575.98px) {
  .item-card-image {
    height: 100px !important;
  }
  .menu-type-btn {
    flex: 1;
    padding: 0.6rem 0.5rem !important;
    font-size: 11px !important;
  }
}

.cart-item {
  animation: fadeIn 0.3s ease-out forwards;
  background: #fdfdfd;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  margin-bottom: 10px;
}

@media (max-width: 575.98px) {
  .cart-item {
    padding: 0.75rem;
  }
}

.suggestion-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  z-index: 2000;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f8fafc;
  transition: var(--transition);
}

.suggestion-item:hover {
  background: var(--gray-100);
  color: var(--primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

.truncate-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.small-icon {
  font-size: 14px;
  transition: var(--transition);
}

.btn-link:hover .small-icon {
  transform: scale(1.1);
}

.discount-type-group {
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
}

.discount-type-group label {
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 6px !important;
}

/* Discount Switcher styling */
.switcher-label {
  background: #f8fafc;
  color: #64748b;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px !important;
  border: 1px solid transparent !important;
}

.btn-check:checked + .switcher-label {
  background: #cbd5e1 !important; /* Specific gray from screenshot */
  color: #1e293b !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bg-light.rounded-pill {
  background: #f1f5f9 !important;
}

/* Main content layout overrides */

/* Premium Select Styling */
.form-select.rounded-pill {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
}

.pos-discount-input {
  min-width: 50px;
  flex: 1;
}

.x-small {
  font-size: 10px;
}
.tracking-tight {
  letter-spacing: -0.5px;
}
.border-faint {
  border-color: rgba(0, 0, 0, 0.03) !important;
}

.action-pill-hover {
  transition: var(--transition);
}

.action-pill-hover:hover {
  background: #f1f5f9 !important;
  transform: scale(1.05);
}

@media (max-width: 575.98px) {
  header.d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
    margin-top: 4rem !important;
  }
  header.d-flex .btn-group,
  header.d-flex .d-flex.gap-2 {
    width: 100%;
  }
  header.d-flex .btn,
  header.d-flex a.btn {
    flex: 1;
    justify-content: center;
    padding: 8px 12px !important;
    font-size: 12px !important;
  }
  .main-content {
    padding: 1rem !important;
  }
  section.bg-white.p-3 {
    padding: 1rem !important;
  }
}

/* Ensure tables are 100% width on responsive views */
.table-responsive {
  border-radius: 16px;
  overflow-x: auto;
}

@media (max-width: 991.98px) {
  .table:not(.no-responsive) thead {
    display: none !important;
  }
  .table:not(.no-responsive) tbody tr {
    display: block;
    margin-bottom: 1.25rem;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 1.25rem;
    background: #fff;
  }
  .table:not(.no-responsive) tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0 !important;
    border-top: none !important;
    text-align: right;
  }
  .table:not(.no-responsive) tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    color: #64748b;
    text-align: left;
    margin-right: 1rem;
  }
  .table:not(.no-responsive) tbody td.text-end {
    justify-content: space-between;
    text-align: left;
  }
}

/* POS Specific Utility */
.btn-xs {
  padding: 0.25rem 0.6rem;
  font-size: 10px;
}

.x-small {
  font-size: 11px !important;
}

@media (max-width: 575.98px) {
  .small-mobile-title {
    font-size: 13px !important;
  }
}

#posItems {
  scrollbar-width: thin;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 991.98px) {
  #posItems {
    height: auto;
    max-height: 400px;
  }
}

/* Pagination Overrides - Red theme & Grey buttons */
.page-link {
  color: #64748b !important;
  border: 1px solid #e2e8f0;
}
.page-link:hover {
  color: var(--primary) !important;
  background-color: #f8fafc !important;
}
.page-item.active .page-link {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
}
.page-item.disabled .page-link {
  color: #cbd5e1 !important;
}

/* Global Input Styling: Light grey border & No shadow */
.form-control, 
.form-select, 
.input-group-text {
  border: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
  background-color: #ffffff !important;
}

.form-control:focus, 
.form-select:focus {
  border: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
  outline: none !important;
}


/* Override existing shadow classes on inputs */
input.shadow-sm, 
select.shadow-sm, 
div.shadow-sm > input {
  box-shadow: none !important;
}

/* DataTables Button & Layout Styling */
.dt-buttons {
  margin-bottom: 0 !important;
}

.dt-button-collection {
  background: white !important;
  border-radius: 16px !important;
  box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
  border: 1px solid #f1f5f9 !important;
  padding: 10px !important;
  margin-top: 8px !important;
  width: 200px !important;
  z-index: 2100 !important;
  left: auto !important;
  right: 0 !important;
}

/* Premium Export Button Styling */
button.dt-button.buttons-collection {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 10px 24px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 1px !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-transform: uppercase !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

button.dt-button.buttons-collection:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4) !important;
  filter: brightness(1.1);
}

/* Fix for Table Header Sorting Icons */
table.dataTable thead th {
  padding-right: 30px !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}

/* Header Alignment Fixes */
header.d-flex.justify-content-between {
  gap: 20px !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Fix for search input and buttons alignment in screenshots */

/* DataTables Button Collection Styling (Restored & Enhanced) */
.dt-button-collection {
  background: white !important;
  border-radius: 16px !important;
  box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
  border: 1px solid #f1f5f9 !important;
  padding: 10px !important;
  margin-top: 10px !important;
  width: 220px !important;
  z-index: 2200 !important;
  left: auto !important;
  right: 0 !important;
}

.dt-button-collection .dt-button {
  display: block !important;
  width: 100% !important;
  text-align: left !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  border: none !important;
  background: transparent !important;
  color: #334155 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  margin-bottom: 2px !important;
}

.dt-button-collection .dt-button:hover {
  background: #f1f5f9 !important;
  color: var(--primary) !important;
  transform: translateX(5px);
}

.dt-button-collection .dt-button i {
  width: 20px;
  text-align: center;
}

/* Hide the default DataTables background mask */
div.dt-button-background {
  display: none !important;
}

/* Fix for buttons wrapping to two lines */
.dataTables_wrapper .d-flex {
  flex-wrap: nowrap !important;
}

@media (max-width: 991.98px) {
  .dataTables_wrapper .d-flex {
    flex-wrap: wrap !important;
    gap: 15px;
  }
}

/* Ensure tables don't overflow on small screens */
.table-responsive {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-radius: 12px;
  padding-bottom: 5px;
}
/* Premium Search & Input Groups */
.search-box-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 10px;
  padding: 0 16px;
  transition: all 0.2s ease;
  border: 1.5px solid #e2e8f0;
  height: 50px;
}
.search-box-wrapper:focus-within {
  border-color: #cbd5e1;
}
.search-box-wrapper .input-group-text {
  background: transparent !important;
  border: none !important;
  padding: 0;
  margin-right: 15px;
  color: #64748b;
  font-size: 18px;
  border-right: 1px solid #e2e8f0 !important;
  padding-right: 15px !important;
  height: 24px;
  display: flex;
  align-items: center;
}
.search-box-wrapper .form-control,
.search-box-wrapper .form-control:focus {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 10px !important;
  font-weight: 400;
  font-size: 15px;
  flex-grow: 1;
  color: #475569;
  outline: none !important;
}
.search-box-wrapper .form-control::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

/* DataTables Button Fixes */
.dt-buttons.btn-group {
  gap: 8px !important;
}
.dt-buttons .btn {
  border-radius: 10px !important;
  box-shadow: none !important;
  border: none !important;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px !important;
}
.buttons-collection {
  background: var(--primary-gradient) !important;
  border: none !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25) !important;
  font-weight: 600 !important;
}
.buttons-collection:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4) !important;
}
.search-box-wrapper .btn {
  border-radius: 10px !important;
  padding: 0 12px !important;
  height: 34px !important;
  min-width: 34px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-box-wrapper .form-control::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

/* =========================================
   GLOBAL OVERRIDE: REMOVE BLUE FOCUS SHADOW
   ========================================= */
*:focus,
.form-control:focus,
.form-select:focus,
.btn:focus,
.btn-check:focus + .btn,
.select2-container--focus .select2-selection,
.select2-search__field:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Provide a clean, neutral border on focus instead of default blue */
.form-control:focus,
.form-select:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection,
.select2-search__field:focus {
  border-color: #cbd5e1 !important;
}

/* =========================================
   GLOBAL TABLE DESIGN
   ========================================= */
.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.table thead th {
  background: #f8fafc !important;
  padding: 16px 20px !important;
  color: #64748b !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-top: none !important;
  font-weight: 700 !important;
}
.table tbody td {
  padding: 16px 20px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
  color: #334155 !important;
}
.table tbody tr:hover td {
  background-color: #f8fafc !important;
}


@media print {
  body { font-family: "Outfit", sans-serif !important; color: #334155 !important; background: white !important; padding: 20px !important; }
  h1 { color: #0f172a !important; font-weight: 700 !important; margin-bottom: 25px !important; font-size: 24px !important; border-bottom: 2px solid #f1f5f9 !important; padding-bottom: 10px !important; }
  table, .table { display: table !important; width: 100% !important; border-collapse: collapse !important; margin-bottom: 20px !important; border: 1px solid #e2e8f0 !important; }
  thead, .table thead { display: table-header-group !important; visibility: visible !important; opacity: 1 !important; }
  tbody, .table tbody { display: table-row-group !important; }
  tr, .table tr { display: table-row !important; page-break-inside: avoid !important; border: none !important; margin: 0 !important; padding: 0 !important; background: white !important; box-shadow: none !important; border-radius: 0 !important; }
  td, th, .table td, .table th { display: table-cell !important; padding: 14px 16px !important; text-align: left !important; border: 1px solid #e2e8f0 !important; border-width: 1px 0 !important; vertical-align: middle !important; }
  th, .table th { background-color: #f8fafc !important; color: #475569 !important; font-weight: 700 !important; border-bottom: 2px solid #cbd5e1 !important; text-transform: uppercase !important; font-size: 11px !important; letter-spacing: 0.05em !important; }
  tr:nth-child(even) td { background-color: #f8fafc !important; }
  td::before, .table td::before { display: none !important; }
}

.cursor-pointer { cursor: pointer !important; }
