/**
 * Placeholder thickness minimized
 * */
.form-control::placeholder {
  color: rgba(168, 170, 173, 0.75);
  opacity: 1;
}

/**
 * Change Group Button size - (Right Side Buttons)
 * */
.cc-group-btn-size {
  padding: .375rem .15rem;
}

/**
  * Print page minimum width
 */
.min-width-600 {
  min-width: 600px;
}

/**
 * Autocomplete css
 * */
.ui-autocomplete {
  max-height: 160px;
  overflow-y: auto;
  overflow-x: hidden;
  /* prevent horizontal scrollbar */
}

/**
 * Autocomplete Loader for input box
 * */
.ui-autocomplete-loading {
  background: white url("autocomplete-loader/ui-anim_basic_16x16.gif") right center no-repeat;
}

/**
 * Cursor not allowed
 * */
.cursor-not-allowed {
  cursor: not-allowed;
}

/**
  * Input box border color change to primary class color
  * */
.custom-border-primary {
  border-color: #007bff !important;
  /* Replace with your desired color */
}

/**
 * Page Loader , Spinner
 * */
#spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#spinner-content {
  text-align: center;
}

#loading-message {
  color: white;
  margin-top: 15px;
  font-size: 18px;
}

/**
 * Highlight last added table row
 * */
tr.highlight {
  animation: popIn 0.5s ease-out;
}

@keyframes popIn {
  0% {
    transform: scale(1.05);
    background-color: rgb(0 140 255 / 5%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }

  100% {
    transform: scale(1);
    background-color: rgb(0 140 255 / 5%);
    box-shadow: none;
  }
}

/**
* no code 
* */
.text-transform-none {
  text-transform: none;
}

/**
* input group input box, in one group i need to show some of the select or 
* input box 30 %
* */
.cu-flex-30 {
  flex: 0 0 30% !important;
}

.cu-w-500-px {
  width: 500px !important;
}

/**
 * POS Page Items Selected Table Resize
 * */
.resizable-vertical {
  resize: vertical;
  overflow: auto;
  /* Required for the resize property to work */
  min-height: 270px;
}

/**
 * No Padding for invoice tables
 * */
#invoiceItemsTable input.form-control {
  padding-left: 0rem;
  padding-right: 0rem;
  font-size: 18px;
}

.todaysratebox {
  max-height: 382px;
  min-height: 382px;
  display: block;
  width: 100%;

}

.todaysratebox .datadiv {
  max-height: 305px;
  overflow-y: scroll;
  min-height: 305px;
  display: block;
  width: 100%;
}

#cart-count {
  font-size: 0.75rem;
  padding: 0.5em 0.5em;
}

.modal-header {
  background-color: #04966a !important;
  color: #060b4e !important;
}
.modal-header,
.modal-header .modal-title {
  color: white;
}

/**
 * Flatpickr calendar styling
 */
.flatpickr-calendar {
  position: absolute !important;
  z-index: 1080 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.flatpickr-calendar.datatable-filter-flatpickr {
  z-index: 1085 !important;
}

/**
 * Selected date range display styling
 */
#selectedDateRange {
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 4px;
  color: #04083b;
  font-size: 0.875rem;
}

/**
 * Item List Datatable Styling
 */
#datatable thead th {
	background: #d3dad7;
	color: #1e293b !important;
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	padding: 1rem 0.75rem;
	border-bottom: 2px solid #e2e8f0;
	position: relative;
}

#datatable thead th:first-child {
	border-top-left-radius: 0.5rem;
}

#datatable thead th:last-child {
	border-top-right-radius: 0.5rem;
}

/**
 * Datatable list pages — avoid clipping action dropdowns
 */
.card-body .table-responsive,
.card-body .table-responsive .dataTables_wrapper,
.card-body #datatableForm .dataTables_wrapper {
	overflow: visible !important;
}

/**
 * DataTable list pages — avoid clipping row action menus (reference: order/inquiry list).
 * Use .datatable-list-wrap instead of .table-responsive around #datatable.
 */
.datatable-list-wrap,
.inquiry-datatable-wrap {
	overflow-x: visible;
	overflow-y: visible;
	width: 100%;
	max-width: 100%;
}

.datatable-list-wrap .dataTables_wrapper,
.inquiry-datatable-wrap .dataTables_wrapper {
	overflow: visible !important;
	width: 100% !important;
	max-width: 100%;
}

.datatable-list-wrap .dataTables_wrapper .row,
.inquiry-datatable-wrap .dataTables_wrapper .row {
	margin-left: 0;
	margin-right: 0;
	max-width: 100%;
}

.datatable-list-wrap .dataTables_wrapper table.dataTable,
.inquiry-datatable-wrap .dataTables_wrapper table.dataTable {
	width: 100% !important;
	margin: 0;
}

@media (max-width: 767.98px) {
	.datatable-list-wrap,
	.inquiry-datatable-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

.datatable-action-menu-floating {
	min-width: 10rem;
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/**
 * List page filter toolbar + DataTables controls (reference: order/list.blade.php)
 */
.datatable-list-filters {
	position: relative;
}

.datatable-list-filters .btn-sm {
	min-height: 34px;
}

.datatable-list-wrap .datatable-controls-row {
	margin-left: 0;
	margin-right: 0;
	width: 100%;
}

.datatable-list-wrap .datatable-list-length .dataTables_length,
.datatable-list-wrap .datatable-list-search .dataTables_filter,
.datatable-list-wrap .datatable-footer-row .dataTables_length,
.datatable-list-wrap .datatable-footer-row .dataTables_info,
.datatable-list-wrap .datatable-footer-row .dataTables_paginate {
	float: none !important;
	width: 100%;
	text-align: left !important;
}

.datatable-list-wrap .datatable-list-length label,
.datatable-list-wrap .datatable-list-search label,
.datatable-list-wrap .datatable-footer-row .dataTables_length label {
	margin-bottom: 0;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem 0.5rem;
}

.datatable-list-wrap .datatable-list-search .dataTables_filter input {
	flex: 1 1 140px;
	width: auto !important;
	max-width: 100%;
	margin-left: 0 !important;
}

.datatable-list-wrap .datatable-list-buttons .dt-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	justify-content: flex-start;
	float: none !important;
	width: 100%;
	max-width: 100%;
}

.datatable-list-wrap .datatable-list-buttons .dt-buttons .btn {
	margin: 0 !important;
	white-space: nowrap;
}

@media (min-width: 992px) {
	.datatable-list-wrap .datatable-list-buttons .dt-buttons {
		justify-content: flex-end;
		flex-wrap: wrap;
	}
}

.datatable-filter-panel {
	position: absolute;
	top: calc(100% + 0.35rem);
	left: 0;
	right: 0;
	z-index: 1050;
	width: min(560px, 100%);
	max-height: none;
	overflow-y: auto;
}

.datatable-filter-panel.datatable-filter-panel--floating {
	position: fixed !important;
	right: auto !important;
	max-height: calc(100vh - 1.5rem);
	overflow: visible;
	border-radius: 0.625rem;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.datatable-filter-panel--compact .datatable-filter-panel__layout {
	display: flex;
	align-items: stretch;
}

.datatable-filter-panel--compact .datatable-filter-panel__presets {
	flex: 0 0 132px;
	width: 132px;
	overflow: hidden;
}

.datatable-filter-panel--compact .filter-preset {
	display: block;
	width: 100%;
	border: none;
	border-bottom: 1px solid #eef2f7;
	background: transparent;
	font-size: 0.75rem;
	padding: 0.35rem 0.6rem;
	text-align: left;
}

.datatable-filter-panel--compact .filter-preset.active {
	background: #04966a;
	color: #fff;
}

.datatable-filter-panel--compact .datatable-filter-panel__fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.45rem 0.55rem;
}

.datatable-filter-panel--compact .datatable-filter-panel__body {
	padding: 0.6rem 0.7rem;
}

.datatable-filter-panel--compact .datatable-filter-panel__label {
	font-size: 0.6875rem;
	font-weight: 700;
	margin-bottom: 0.15rem;
}

.datatable-filter-panel--compact .form-control-sm,
.datatable-filter-panel--compact .form-select-sm {
	min-height: 30px;
	font-size: 0.8125rem;
}

.datatable-filter-panel--compact .datatable-filter-panel__footer .btn-sm {
	min-height: 28px;
	padding: 0.2rem 0.55rem;
	font-size: 0.75rem;
}

@media (max-width: 767.98px) {
	.datatable-filter-panel {
		left: 0;
		right: 0;
		width: 100%;
	}

	.card-header.d-flex.justify-content-between {
		flex-wrap: wrap;
		gap: 10px;
	}

	.card-header.d-flex.justify-content-between .btn.btn-primary {
		width: 100%;
		min-height: 40px;
	}
}

.card-body #datatableForm .dataTables_wrapper .dropdown-menu {
	z-index: 1055;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.dataTables_wrapper .dataTables_paginate span .current {
	background: #04966a !important;
	background-color: #04966a !important;
	color: white !important;
	border: 1px solid #04966a !important;
}

.page-item.active .page-link {
	background-color: #04966a !important;
	border-color: #04966a !important;
}

/**
 * Navigation - Parent Menu Rounded Background
 */
.sidebar-wrapper .metismenu > li.mm-active > a {
	border-radius: 0.75rem;
	background: #ffc107 !important;
	color: #04083b !important;
	font-weight: 700 !important;
}

.sidebar-wrapper .metismenu > li.mm-active > a i {
	color: #04083b !important;
}

/**
 * Navigation - Submenu Modern Design
 */
.sidebar-wrapper .metismenu ul {
	background: rgba(255, 193, 7, 0.05);
	border-left: 3px solid #ffc107;
	margin-left: 10px;
	border-radius: 0.5rem;
	padding: 8px 0;
}

.sidebar-wrapper .metismenu ul li a {
	position: relative;
	transition: all 0.3s ease;
}

.sidebar-wrapper .metismenu ul li.mm-active > a {
	background: linear-gradient(90deg, rgba(255, 193, 7, 0.15) 0%, transparent 100%) !important;
	border-left: 3px solid #ff4450;
	color: inherit !important;
	font-weight: 700 !important;
}

.sidebar-wrapper .metismenu ul li.mm-active > a i {
	color: inherit !important;
}

.sidebar-wrapper .metismenu ul ul {
	background: rgba(4, 8, 59, 0.03);
	border-left: 3px solid #ff4450;
	margin-left: 15px;
}

.sidebar-wrapper .metismenu ul ul li a {
	padding-left: 30px !important;
}

.sidebar-wrapper .metismenu ul ul li a i {
	display: none;
}

.sidebar-wrapper .metismenu ul ul li a::before {
	content: '';
	position: absolute;
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	width: 6px;
	height: 6px;
	background: #cbd5e1;
	border-radius: 50%;
	transition: all 0.3s ease;
}

.sidebar-wrapper .metismenu ul ul li a:hover::before {
	background: #ffc107;
	width: 8px;
	height: 8px;
}

.sidebar-wrapper .metismenu ul ul li.mm-active > a {
	color: inherit !important;
	font-weight: 700 !important;
}

.sidebar-wrapper .metismenu ul ul li.mm-active > a::before {
	background: #04966a;
	width: 8px;
	height: 8px;
	box-shadow: 0 0 8px rgba(4, 150, 106, 0.5);
}

.sidebar-wrapper .metismenu ul ul li.mm-active > a i {
	color: inherit !important;
}

@media (max-width: 767.98px) {
  .card-header .row { row-gap: 10px; }
  .card-header .col-6 { width: 100%; }
  .card-header.d-flex.justify-content-between {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px;
  }
  .card-header.d-flex.justify-content-between .btn {
    width: 100%;
    margin-right: 0 !important;
  }
  .card-header .col-6.text-end.position-relative {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-align: left !important;
  }
  .card-header .col-6.text-end.position-relative .btn { margin-right: 0 !important; }
  #filterButton { min-height: 38px; min-width: 112px; padding: 6px 12px; }
  #selectedDateRange {
    display: block;
    width: 100%;
    margin-left: 0 !important;
    padding: 0;
    font-size: 12px;
    text-align: left;
  }
  #filterDropdown {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-height: 75vh;
    overflow-y: auto;
  }

  #mobileInvoiceList { width: 100%; max-width: 100%; overflow-x: hidden; }

  #datatableForm,
  #datatableForm .card-body,
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  #datatable_wrapper .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }

  #datatable_wrapper .dt-buttons .btn {
    margin: 0 !important;
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    white-space: nowrap;
  }

  #datatable_wrapper .dataTables_filter {
    width: 100%;
    text-align: left !important;
    float: none !important;
  }

  #datatable_wrapper .dataTables_filter label {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  #datatable_wrapper .dataTables_filter input {
    width: 100% !important;
    max-width: 100%;
    margin-left: 0 !important;
  }

  #datatable_wrapper .dataTables_length {
    width: 100%;
    float: none !important;
    text-align: left !important;
  }

  #datatable_wrapper .dataTables_length label {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .mobile-list-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f5f7fb;
    padding: 4px 0 8px;
  }
  .mobile-search-wrap { position: relative; }
  .mobile-search-wrap i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
  }
  #mobileInvoiceSearch {
    border-radius: 10px;
    border: 1px solid #dbe3ef;
    padding-left: 34px;
    height: 36px;
  }
  .mobile-list-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  #mobilePageSize { width: 88px; border-radius: 10px; }
  .mobile-page-summary { font-size: 12px; color: #64748b; font-weight: 600; }

  .mobile-invoice-card {
    border: 1px solid #e5eaf3 !important;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    background: #fff;
    overflow: visible;
    position: relative;
  }
  .mobile-card-code { font-size: 13px; font-weight: 700; color: #0f172a; }
  .mobile-card-date { font-size: 12px; color: #475569; font-weight: 600; }
  .mobile-badges-row { display: flex; flex-wrap: wrap; gap: 6px; }
  .mobile-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
  }
  .mobile-badge a { margin-left: 4px; font-weight: 700; }
  .mobile-badge-paid { color: #16a34a; background: #dcfce7; }
  .mobile-badge-due { color: #dc2626; background: #fee2e2; }
  .mobile-badge-status { color: #1d4ed8; background: #dbeafe; }
  .mobile-badge-return { color: #7c3aed; background: #ede9fe; }
  .mobile-customer { font-size: 12px; color: #0f172a; font-weight: 600; }
  .mobile-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .mobile-metric-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
  }
  .mobile-metric-label { font-size: 10px; text-transform: uppercase; color: #64748b; font-weight: 700; }
  .mobile-metric-value { font-size: 13px; color: #0f172a; font-weight: 700; }
  .mobile-metric-value.mobile-balance { color: #e11d48; }
  .mobile-card-footer {
    border-top: 1px dashed #e2e8f0;
    padding-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .mobile-created-at { font-size: 11px; color: #64748b; }
  .mobile-actions-btn {
    padding: 4px 10px;
    min-height: 32px;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
    background: #fff !important;
    border-radius: 999px;
  }
  .mobile-actions-btn i { font-size: 16px !important; color: #475569; }
  .mobile-quick-actions-panel { display: none; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #dbe3ef; }
  .mobile-quick-actions-panel.show { display: grid; }
  .mobile-quick-actions-panel { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .mobile-quick-action-btn {
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #f8fafc;
    min-height: 56px;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #0f172a;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    gap: 2px;
  }
  .mobile-quick-action-btn i { font-size: 16px; color: #475569; }
  .mobile-quick-action-btn.text-danger,
  .mobile-quick-action-btn.text-danger i { color: #dc2626 !important; }
  .mobile-quick-action-btn.text-danger { border-color: #fecaca; background: #fef2f2; }
}

@media (max-width: 767.98px) {
  #mobileSelect2Backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    z-index: 1055;
    display: none;
  }

  #mobileSelect2Backdrop.show {
    display: block;
  }

  .select2-container--open .select2-dropdown.mobile-select2-sheet {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    border: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.2) !important;
    z-index: 1065 !important;
    overflow: hidden;
    animation: mobileSelectSheetIn .16s ease-out;
  }

  .mobile-select2-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
  }

  .mobile-select2-sheet-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
  }

  .mobile-select2-sheet-close {
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #475569;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    min-height: 32px;
    padding: 4px 10px;
    line-height: 1;
  }

  .select2-container--open .mobile-select2-sheet .select2-search--dropdown {
    padding: 10px 12px 8px;
    border-bottom: 1px solid #eef2f7;
  }

  .select2-container--open .mobile-select2-sheet .select2-search__field {
    border: 1px solid #dbe3ef !important;
    border-radius: 10px !important;
    min-height: 38px;
    padding: 7px 10px !important;
    font-size: 14px;
  }

  .select2-container--open .mobile-select2-sheet .select2-results > .select2-results__options {
    max-height: min(52vh, 360px);
    padding: 6px 10px 12px;
  }

  .select2-container--open .mobile-select2-sheet .select2-results__option {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 4px;
    font-size: 14px;
  }

  .select2-container--open .mobile-select2-sheet .select2-results__option--highlighted[aria-selected] {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
  }

  @keyframes mobileSelectSheetIn {
    from { transform: translateY(14px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
}
