/* Luisant Software Solutions Theme - Infinity POS Enterprise Billing Styling */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --luisant-primary: #1c77c3;
  --luisant-secondary: #001f3f;
  --luisant-dark: #081226;
  --luisant-gold: #f6c644;
  --luisant-lime: #e2f18b;
  --luisant-emerald: #10b981;
  --luisant-rose: #f43f5e;
  --luisant-bg: #f8fafc;
  --luisant-card-bg: #ffffff;
  --luisant-border: #e2e8f0;
  --luisant-border-glow: rgba(28, 119, 195, 0.25);
  --luisant-text: #0f172a;
  --luisant-text-muted: #64748b;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--luisant-bg);
  color: var(--luisant-text);
  font-size: 0.85rem;
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Custom Typography & Utility Enhancements */
.fw-bold { font-weight: 700 !important; }
.fw-extrabold { font-weight: 800 !important; }

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: var(--luisant-primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--luisant-secondary);
}

/* Dense form controls matching enterprise desktop apps */
.form-control-sm, .form-select-sm, .btn-sm {
  font-size: 0.82rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--luisant-border);
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--luisant-primary);
  box-shadow: 0 0 0 0.2rem rgba(28, 119, 195, 0.2);
  background-color: #f0f9ff;
}

/* -------------------------------------------------------------
 * LUISANT BRAND TOOLBAR & NAVBAR (TOP HEADER)
 * ------------------------------------------------------------- */
.pos-navbar {
  background: linear-gradient(135deg, #001f3f 0%, #081226 50%, #1c77c3 100%);
  color: #ffffff;
  padding: 0.45rem 1.2rem;
  box-shadow: 0 4px 20px rgba(0, 31, 63, 0.35);
  border-bottom: 2px solid rgba(56, 189, 248, 0.3);
}

.pos-brand {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.6px;
  background: linear-gradient(135deg, #ffffff 0%, #38bdf8 60%, #f6c644 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pos-brand-tag {
  background: linear-gradient(135deg, #f6c644 0%, #d97706 100%);
  color: #000000;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 0.72rem;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(246, 198, 68, 0.3);
}

.pos-navbar .btn {
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.pos-navbar .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(28, 119, 195, 0.35);
}

/* High-Contrast Crisp Logout Button */
.btn-pos-logout {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
  color: #ffffff !important;
  border: 1px solid #f87171 !important;
  font-weight: 700 !important;
  padding: 0.3rem 0.85rem !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45) !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
}

.btn-pos-logout:hover {
  background: linear-gradient(135deg, #f87171 0%, #991b1b 100%) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.6) !important;
}

/* Uniform Form Close Button */
.btn-pos-close {
  background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%) !important;
  color: #ffffff !important;
  border: 1px solid #fb7185 !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  padding: 0.3rem 0.85rem !important;
  border-radius: 8px !important;
  box-shadow: 0 3px 10px rgba(244, 63, 94, 0.35) !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  cursor: pointer !important;
}

.btn-pos-close:hover {
  background: linear-gradient(135deg, #fb7185 0%, #9f1239 100%) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 15px rgba(244, 63, 94, 0.5) !important;
}

/* Custom Searchable Dropdown Component */
.searchable-select {
  position: relative;
  user-select: none;
}

.searchable-select-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
  min-height: 31px;
}

.searchable-select-btn:hover, .searchable-select.open .searchable-select-btn {
  border-color: #1c77c3;
  box-shadow: 0 0 0 3px rgba(28, 119, 195, 0.15);
}

.searchable-select-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  display: none;
  overflow: hidden;
}

.searchable-select.open .searchable-select-menu {
  display: block;
}

.searchable-select-search {
  padding: 0.5rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.searchable-select-options {
  max-height: 200px;
  overflow-y: auto;
}

.searchable-select-item {
  padding: 0.4rem 0.65rem;
  font-size: 0.825rem;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
}

.searchable-select-item:hover, .searchable-select-item.selected {
  background: #e0f2fe;
  color: #1c77c3;
  font-weight: 600;
}

.searchable-select-empty {
  padding: 0.6rem;
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
}

/* Custom Searchable Combobox Component */
.searchable-combo {
  position: relative;
}

.searchable-combo .searchable-combo-input {
  border-radius: 0 6px 6px 0 !important;
  font-weight: 600;
}

.searchable-combo .searchable-combo-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1060;
  margin-top: 2px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  max-height: 240px;
  overflow-y: auto;
}

.searchable-combo .combo-item {
  font-size: 0.825rem;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
}

.searchable-combo .combo-item:hover {
  background-color: #e0f2fe;
  color: #0284c7;
  font-weight: 700;
}

/* Select2 Custom Theme Adjustments */
.select2-container {
  width: 100% !important;
}

.select2-container--default .select2-selection--single {
  height: 31px !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 29px !important;
  color: #1e293b !important;
  padding-left: 0.65rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 29px !important;
}

.select2-dropdown {
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
  z-index: 1055 !important;
}

.select2-search__field {
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  font-size: 0.85rem !important;
  padding: 0.35rem 0.6rem !important;
}

.select2-results__option--highlighted[aria-selected] {
  background-color: #1c77c3 !important;
  color: #ffffff !important;
}

/* -------------------------------------------------------------
 * LUISANT DASHBOARD CARDS & GRID
 * ------------------------------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.2rem;
  padding: 1.5rem;
}

.dashboard-card {
  background: #ffffff;
  border: 1px solid rgba(28, 119, 195, 0.16);
  border-radius: 16px;
  padding: 1.4rem 0.85rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 31, 63, 0.04);
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1c77c3 0%, #f6c644 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.dashboard-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 30px rgba(28, 119, 195, 0.22);
  border-color: var(--luisant-primary);
  background: #ffffff;
}

.dashboard-card:hover::before {
  opacity: 1;
}

.dashboard-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 0.75rem auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, rgba(28, 119, 195, 0.12) 0%, rgba(0, 31, 63, 0.06) 100%);
  border: 1px solid rgba(28, 119, 195, 0.2);
  color: var(--luisant-primary);
  transition: all 0.25s ease;
}

.dashboard-card:hover .dashboard-icon {
  background: linear-gradient(135deg, var(--luisant-primary) 0%, var(--luisant-secondary) 100%);
  color: #ffffff;
  transform: rotate(4deg) scale(1.08);
  box-shadow: 0 6px 16px rgba(28, 119, 195, 0.35);
}

.dashboard-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--luisant-secondary);
  margin-bottom: 0.2rem;
}

/* -------------------------------------------------------------
 * TOOLBARS, MODULE WINDOWS & PANELS
 * ------------------------------------------------------------- */
.pos-toolbar {
  background: linear-gradient(90deg, #001f3f 0%, #081730 40%, #1c77c3 100%);
  border-bottom: 2px solid var(--luisant-primary);
  padding: 0.5rem 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 31, 63, 0.15);
}

.pos-toolbar .btn {
  font-weight: 600;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.pos-toolbar .btn:hover {
  transform: translateY(-1px);
}

.pos-window {
  background: var(--luisant-card-bg);
  border: 1px solid var(--luisant-border);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 31, 63, 0.05);
  margin-bottom: 1rem;
  overflow: hidden;
}

.pos-window-header {
  background: linear-gradient(90deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 2px solid var(--luisant-primary);
  padding: 0.6rem 1rem;
  font-weight: 700;
  color: var(--luisant-secondary);
  font-size: 0.92rem;
  letter-spacing: 0.3px;
}

/* -------------------------------------------------------------
 * BUTTON SYSTEM (LUISANT GRADIENT STYLES)
 * ------------------------------------------------------------- */
.btn-primary {
  background: linear-gradient(135deg, #1c77c3 0%, #001f3f 100%) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(28, 119, 195, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2589db 0%, #002d5c 100%) !important;
  box-shadow: 0 6px 16px rgba(28, 119, 195, 0.45);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #12d394 0%, #065f46 100%) !important;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

.btn-warning {
  background: linear-gradient(135deg, #f6c644 0%, #d97706 100%) !important;
  border: none !important;
  color: #000000 !important;
  box-shadow: 0 4px 12px rgba(246, 198, 68, 0.35);
  font-weight: 700 !important;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #ffd45b 0%, #b45309 100%) !important;
  color: #000000 !important;
  box-shadow: 0 6px 16px rgba(246, 198, 68, 0.5);
}

.btn-danger {
  background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #fb7185 0%, #9f1239 100%) !important;
  box-shadow: 0 6px 16px rgba(244, 63, 94, 0.45);
}

.btn-info {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border: none !important;
  color: #ffffff !important;
}

/* -------------------------------------------------------------
 * HIGH DENSITY ENTERPRISE TABLES & DATA GRIDS
 * ------------------------------------------------------------- */
.pos-table-container {
  max-height: 440px;
  overflow-y: auto;
  border: 1px solid var(--luisant-border);
  border-radius: 8px;
  background: #ffffff;
}

.pos-table {
  width: 100%;
  margin-bottom: 0;
  font-size: 0.83rem;
  border-collapse: separate;
  border-spacing: 0;
}

.pos-table th {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #001f3f 0%, #081226 100%);
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  padding: 0.45rem 0.5rem;
  z-index: 10;
  border-bottom: 3px solid var(--luisant-primary);
  border-right: 1px solid #1e293b;
  letter-spacing: 0.3px;
}

.pos-table td {
  padding: 0.3rem 0.5rem;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.pos-table tbody tr:hover {
  background-color: #f0f9ff !important;
}

.pos-table tbody tr:hover td:first-child {
  border-left: 3px solid var(--luisant-primary);
}

.pos-table input.form-control-sm {
  height: 28px;
  font-size: 0.8rem;
  padding: 0.15rem 0.4rem;
}

/* -------------------------------------------------------------
 * FOOTER CALCULATIONS & STATUSBAR
 * ------------------------------------------------------------- */
.pos-footer-calc {
  background: linear-gradient(135deg, #001f3f 0%, #081226 100%);
  color: #ffffff;
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  margin-top: 0.75rem;
  border: 1px solid rgba(28, 119, 195, 0.4);
  box-shadow: 0 4px 15px rgba(0, 31, 63, 0.25);
}

.pos-net-payable {
  font-size: 1.4rem;
  font-weight: 800;
  color: #38bdf8;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.pos-statusbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #001f3f 0%, #081226 100%);
  border-top: 1px solid var(--luisant-primary);
  color: #cbd5e1;
  font-size: 0.76rem;
  padding: 0.25rem 1.2rem;
  display: flex;
  justify-content: space-between;
  z-index: 100;
  font-weight: 500;
}

/* Custom Searchable Dropdown Combobox */
.pos-searchable-combo {
  position: relative;
  width: 100%;
}

.pos-combo-dropdown {
  position: fixed;
  background: #ffffff;
  border: 1.5px solid var(--luisant-primary);
  border-radius: 8px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 999999 !important;
  display: none;
  box-shadow: 0 10px 30px rgba(0, 31, 63, 0.25);
}

.pos-combo-dropdown.show {
  display: block;
}

.pos-combo-item {
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.83rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
}

.pos-combo-item:hover, .pos-combo-item.active {
  background-color: #f0f9ff;
  color: var(--luisant-primary);
  font-weight: 700;
}

/* Print Invoice & PDF Styling Rules */
@media print {
  body * {
    visibility: hidden !important;
  }
  
  #printable-invoice-container, #printable-invoice-container * {
    visibility: visible !important;
  }

  #printable-invoice-container {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 15px !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  .modal, .modal-backdrop {
    position: static !important;
    background: transparent !important;
  }

  .modal-dialog, .modal-content, .modal-body {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .modal-header, .modal-footer, .pos-navbar, #app-main-content, #app-templates {
    display: none !important;
  }
}

/* -------------------------------------------------------------
 * REPORTS HUB ALL BLUE TAB NAVIGATION STYLING
 * ------------------------------------------------------------- */
#reports-hub-tabs .nav-link {
  background-color: #e0f2fe !important;
  color: #1c77c3 !important;
  border: 1.5px solid rgba(28, 119, 195, 0.3) !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
}

#reports-hub-tabs .nav-link i {
  color: #1c77c3 !important;
  transition: color 0.2s ease !important;
}

#reports-hub-tabs .nav-link:hover {
  background: linear-gradient(135deg, #1c77c3 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 4px 14px rgba(28, 119, 195, 0.4) !important;
  transform: translateY(-1px) !important;
}

#reports-hub-tabs .nav-link:hover i {
  color: #ffffff !important;
}

#reports-hub-tabs .nav-link.active {
  background: linear-gradient(135deg, #001f3f 0%, #081226 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #1c77c3 !important;
  box-shadow: 0 6px 16px rgba(0, 31, 63, 0.4) !important;
}

#reports-hub-tabs .nav-link.active i {
  color: #ffffff !important;
}
