/*
Background #111827
Card BG #1F2937
Border #374151
Blue #1E3A8A
Blue Border #2563eb
*/
/**
 * Dark theme
 */
table tbody td {
    white-space: nowrap;
}
[data-bs-theme=dark] {
    --bs-dark-rgb: 9, 15, 28;
}

[data-bs-theme=dark] .card {
    border-color: #374151;
    background: #1F2937;
}
[data-bs-theme=dark] .card-body {
    background: transparent;
    color: #fff;
    text-align: center;
}
[data-bs-theme=dark] .card-icon {
    color: #fff;
}
[data-bs-theme=dark] .dashboard-card-title {
    color: rgba(255, 255, 255, .5);
}
[data-bs-theme=dark] table {
    --bs-table-color: #fff;
    --bs-table-bg: #111827;
    --bs-table-border-color: #4d5154;
    --bs-table-striped-bg: #1f2937;
    --bs-table-striped-color: #fff;
    --bs-table-active-bg: #373b3e;
    --bs-table-active-color: #fff;
    --bs-table-hover-bg: #323539;
    --bs-table-hover-color: #fff;
    color: var(--bs-table-color);
    border-color: var(--bs-table-border-color);
}
[data-bs-theme=dark] body {
    background-color: #111827 !important;
}
[data-bs-theme=dark] .dataTables_filter, .dataTables_length, .dataTables_info {
    color: #fff;
}
[data-bs-theme=dark] table.dataTable.cell-border > tbody > tr > * {
  border-top: 1px solid #4d5154;
  border-right: 1px solid #4d5154;
}
[data-bs-theme=dark] table.dataTable.cell-border > tbody > tr > *:last-child {
  border-left: 1px solid #4d5154;
}
[data-bs-theme=dark] table.dataTable.cell-border > tbody > tr:last-child > * {
  border-top: 1px solid #4d5154;
}
[data-bs-theme=dark] .page-header{
    border-bottom: 2px solid #1F2937;
    padding-bottom: 10px;
    margin-bottom: 25px;
}
[data-bs-theme=dark] .page-title {
    color: #fff;
    font-weight: 700;
}
[data-bs-theme=dark] .modal-header .btn-close {
    background-color: #fff ;
}
[data-bs-theme=dark] .modal-content {
    background: #111827;
    color: #fff;
}
[data-bs-theme=dark] .modal-header, [data-bs-theme=dark] .modal-footer {
    border-bottom-color: #1F2937;
    border-top-color: #1F2937;
}

[data-bs-theme=dark] .navbar-divider {
  background-color: rgba(255,255,255,0.2);
}


/* Darker Daterange Picker */

[data-bs-theme=dark] .daterangepicker td.off, [data-bs-theme=dark] .daterangepicker td.off.in-range, [data-bs-theme=dark] .daterangepicker td.off.start-date, [data-bs-theme=dark] .daterangepicker td.off.end-date {
  background-color: transparent;
  color: rgba(200,200,200,0.5);
}
[data-bs-theme=dark] .daterangepicker {
  background-color: inherit;
  color: #ebf4f0;
}

[data-bs-theme=dark] .daterangepicker .calendar-table {
  background-color: transparent;
}

[data-bs-theme=dark] .datepicker.dropdown-menu table  {
  background-color: transparent;
}
[data-bs-theme=dark] .daterangepicker td.active, [data-bs-theme=dark] .daterangepicker td.active:hover {
  background-color: transparent;
  color: #ebf4f8;
}
[data-bs-theme=dark] .daterangepicker td.in-range {
  background-color: rgba(37,47,57,0.9);
  color: #ebf4f8;
}
[data-bs-theme=dark] .btn-success {
  color: #fff;
  background-color: inherit;
  border-color: rgba(5,150,1,0.8);
}
[data-bs-theme=dark] .btn-success.disabled, [data-bs-theme=dark] .btn-success[disabled], [data-bs-theme=dark] fieldset[disabled] .btn-success, .btn-success.disabled:hover, [data-bs-theme=dark] .btn-success[disabled]:hover, [data-bs-theme=dark] fieldset[disabled] .btn-success:hover, [data-bs-theme=dark] .btn-success.disabled:focus, [data-bs-theme=dark] .btn-success[disabled]:focus, [data-bs-theme=dark] fieldset[disabled] .btn-success:focus, [data-bs-theme=dark] .btn-success.disabled.focus, [data-bs-theme=dark] .btn-success[disabled].focus, [data-bs-theme=dark] fieldset[disabled] .btn-success.focus, [data-bs-theme=dark] .btn-success.disabled:active, [data-bs-theme=dark] .btn-success[disabled]:active, [data-bs-theme=dark] fieldset[disabled] .btn-success:active, [data-bs-theme=dark] .btn-success.disabled.active, [data-bs-theme=dark] .btn-success[disabled].active, [data-bs-theme=dark] fieldset[disabled] .btn-success.active {
  color: #fff;
  background-color: inherit;
  border-color: rgba(5,150,1,0.1);
}
[data-bs-theme=dark] .btn-default {
  color: #fff;
  background-color: inherit;
  border-color: rgba(255,255,255,0.6);
}
[data-bs-theme=dark] .daterangepicker select.monthselect {
  color: rgba(37,47,57,0.9);
}
[data-bs-theme=dark] .daterangepicker select.yearselect {
  color: rgba(37,47,57,0.9);
}
[data-bs-theme=dark] .daterangepicker .input-mini {
  color: #ebf4f8;
}

/* Select 2 bootstrap-5 theme override */
html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection {
    background-color: transparent !important;
    border: 1px solid #495057;
}

html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single {
    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='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
	color: #dee2e6 !important;
}

html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
	color: #dee2e6 !important;
}

html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
	border: 1px solid var(--bs-gray-600);
}

html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered .select2-selection__placeholder {
	color: #dee2e6 !important;
}

html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
    background-color: transparent !important;
    color: #dee2e6 !important;
}

html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown {
    color: #dee2e6 !important;
    border: 1px solid #495057 !important;
	background-color: var(--bs-body-bg);
}

html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[role=group] .select2-results__group {
	color: var(--bs-secondary-color)!important;
}

.dashboard-card-title {
    color: rgba(0, 0, 0, .5);
}
/* إخفاء الأسهم الأصلية */
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;
  text-align: right;
  direction: rtl;
}

/* تنسيق الحاوية الجديدة */
.number-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.number-wrapper input {
  text-align: center;
  flex: 1;
}

.number-wrapper .btn {
  width: 36px;
  height: 36px;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.connection-offline {
    z-index: 9999;
    background: #111827;
    color: #fff;
}
.form-group .form-label {
    font-weight: bold;
}
.form-control, .form-select {
    border-color: #c1c1c1;
}

.product-card {
  cursor: pointer;
  transition: transform 0.15s;
}
.product-card:hover {
  transform: scale(1.03);
}
.cart-list {
  max-height: 60vh;
  overflow-y: auto;
}
.total {
  font-size: 1.3rem;
  font-weight: bold;
}

.navbar-divider {
  width: 1px;
  background-color: rgba(0,0,0,0.2);
  margin: 0 0.5rem;
  height: 40px;
}

body.loading::after {
  content: "Loading...";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-size: 1.5rem;
}

* {
    outline: none;
}
*:focus {
    box-shadow: none;
}
/*.pagination {*/
/*    --bs-pagination-disabled-color: rgb(135 160 184 / 75%);*/
/*    --bs-pagination-disabled-bg: #1f2937;*/
/*    --bs-pagination-disabled-border-color: #293a53;*/
/*}*/
body {
    font-family: "DroidKufi-Regular", Sans-Serif;
}

.page-title {
    font-weight: 700;
}
.page-header{
    padding-bottom: 10px;
    margin-bottom: 25px;
}
table {
    vertical-align: middle !important;
}
.dataTables_filter label {
    float: left;
}
.select2-dropdown {
    z-index: 99999 !important;
}
.select2-container {
    width: 100% !important;
}
.modal .form-group {
    margin-bottom: 15px;
}
.dashboard-card-title {
    margin-bottom: 15px;
}
/*.btn-primary:not(:hover) {*/
/*    background: #1E3A8A !important;*/
/*    border-color: #2563eb !important;*/
/*}*/

pre {
  text-align: left !important;
  direction: ltr !important;
  font-size: 20px;
  border: 2px solid #0b2532;
  border-left: 12px solid #0b2532;
  border-radius: 5px;
  padding: 24px 14px;
  line-height: 24px;
  background-image: linear-gradient(180deg, #0b2532 50%, #0d3042 50%);
  background-size: 100% 48px;
  background-position: 0 24px;
  color: #0dcaf0;
}

/* Small devices (landscape phones, 576px and up)*/
@media (min-width: 576px) {
    .w-sm-100 {
        width: 100% !important;
    }

    .w-sm-75 {
        width: 75% !important;
    }

    .w-sm-50 {
        width: 50% !important;
    }

    .w-sm-25 {
        width: 25% !important;
    }
    
    .w-sm-auto {
        width: auto !important;
    }

    .h-sm-100 {
        height: 100% !important;
    }

    .h-sm-75 {
        height: 75% !important;
    }

    .h-sm-50 {
        height: 50% !important;
    }

    .h-sm-25 {
        height: 25% !important;
    }
}


/* Medium devices (tablets, 768px and up)*/
@media (min-width: 768px) {
    .w-md-100 {
        width: 100% !important;
    }

    .w-md-75 {
        width: 75% !important;
    }

    .w-md-50 {
        width: 50% !important;
    }

    .w-md-25 {
        width: 25% !important;
    }
    
    .w-md-auto {
        width: auto !important;
    }

    .h-md-100 {
        height: 100% !important;
    }

    .h-md-75 {
        height: 75% !important;
    }

    .h-md-50 {
        height: 50% !important;
    }

    .h-md-25 {
        height: 25% !important;
    }
}

/* Large devices (desktops, 992px and up)*/
@media (min-width: 992px) {
    .w-lg-100 {
        width: 100% !important;
    }

    .w-lg-75 {
        width: 75% !important;
    }

    .w-lg-50 {
        width: 50% !important;
    }

    .w-lg-25 {
        width: 25% !important;
    }
    
    .w-lg-auto {
        width: auto !important;
    }

    .h-lg-100 {
        height: 100% !important;
    }

    .h-lg-75 {
        height: 75% !important;
    }

    .h-lg-50 {
        height: 50% !important;
    }

    .h-lg-25 {
        height: 25% !important;
    }
}

/* Extra large devices (large desktops, 1200px and up)*/
@media (min-width: 1200px) {
    .w-xl-100 {
        width: 100% !important;
    }

    .w-xl-75 {
        width: 75% !important;
    }

    .w-xl-50 {
        width: 50% !important;
    }

    .w-xl-25 {
        width: 25% !important;
    }
    
    .w-xl-auto {
        width: auto !important;
    }

    .h-xl-100 {
        height: 100% !important;
    }

    .h-xl-75 {
        height: 75% !important;
    }

    .h-xl-50 {
        height: 50% !important;
    }

    .h-xl-25 {
        height: 25% !important;
    }
}


@media (min-width: 576px) {
  .position-sm-static {
    position: static !important;
  }
  .position-sm-relative {
    position: relative !important;
  }
  .position-sm-absolute {
    position: absolute !important;
  }
  .position-sm-fixed {
    position: fixed !important;
  }
  .position-sm-sticky {
    position: sticky !important;
  }
}
@media (min-width: 768px) {
  .position-md-static {
    position: static !important;
  }
  .position-md-relative {
    position: relative !important;
  }
  .position-md-absolute {
    position: absolute !important;
  }
  .position-md-fixed {
    position: fixed !important;
  }
  .position-md-sticky {
    position: sticky !important;
  }
}

@media (min-width: 992px) {
  .position-lg-static {
    position: static !important;
  }
  .position-lg-relative {
    position: relative !important;
  }
  .position-lg-absolute {
    position: absolute !important;
  }
  .position-lg-fixed {
    position: fixed !important;
  }
  .position-lg-sticky {
    position: sticky !important;
  }
}

@media (min-width: 1200px) {
  .position-xl-static {
    position: static !important;
  }
  .position-xl-relative {
    position: relative !important;
  }
  .position-xl-absolute {
    position: absolute !important;
  }
  .position-xl-fixed {
    position: fixed !important;
  }
  .position-xl-sticky {
    position: sticky !important;
  }
}


@media print {
  /* Restore Bootstrap flex grid behavior */
  .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-right: -0.75rem !important;
    margin-left: -0.75rem !important;
  }

  [class*="col-"] {
    flex: 1 0 0% !important;
    padding-right: 0.75rem !important;
    padding-left: 0.75rem !important;
    max-width: 100% !important;
  }

  /* Keep width percentages (Bootstrap style) */
  .col-1 { flex: 0 0 auto !important; width: 8.333333% !important; }
  .col-2 { flex: 0 0 auto !important; width: 16.666667% !important; }
  .col-3 { flex: 0 0 auto !important; width: 25% !important; }
  .col-4 { flex: 0 0 auto !important; width: 33.333333% !important; }
  .col-5 { flex: 0 0 auto !important; width: 41.666667% !important; }
  .col-6 { flex: 0 0 auto !important; width: 50% !important; }
  .col-7 { flex: 0 0 auto !important; width: 58.333333% !important; }
  .col-8 { flex: 0 0 auto !important; width: 66.666667% !important; }
  .col-9 { flex: 0 0 auto !important; width: 75% !important; }
  .col-10 { flex: 0 0 auto !important; width: 83.333333% !important; }
  .col-11 { flex: 0 0 auto !important; width: 91.666667% !important; }
  .col-12 { flex: 0 0 auto !important; width: 100% !important; }

  /* Optional: Better spacing and print look */
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 1rem;
  }

  .border, .table, .invoice {
    border-color: #000 !important;
  }

  .no-print { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .invoice { box-shadow: none !important; border: none !important; background: #fff !important; }
  table > tbody > tr:nth-of-type(odd) > *, .table-striped>tbody>tr:nth-of-type(odd)>* { --bs-table-bg-type: #fff; background-color: #fff !important; color: #000 !important; --bs-table-bg: #fff; }
  .text-light, .text-muted { color: #000 !important; }
  table>:not(caption)>*>* { --bs-table-bg-type: #fff; background-color: #fff !important; color: #000 !important; --bs-table-bg: #fff; }
  
}

.pos-receipt {
  display: none;
  width: 58mm; /* or 80mm */
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #000;
}

.pos-receipt .center { text-align: center; }
.pos-receipt .small { font-size: 10px; }

.items, .totals {
  width: 100%;
  border-collapse: collapse;
}

.items th, .items td, .totals td {
  padding: 2px 0;
  text-align: left;
}

.items th:last-child, .items td:last-child,
.totals td:last-child {
  text-align: right;
}

hr {
  border: none;
  border-top: 1px dashed #000;
  margin: 4px 0;
}

@media print {
  /*body * { visibility: hidden; }*/
  /*.pos-receipt, .pos-receipt * {*/
  /*  visibility: visible;*/
  /*}*/
  /*.pos-receipt {*/
  /*  display: block;*/
  /*  position: absolute;*/
  /*  left: 0;*/
  /*  top: 0;*/
  /*  margin: 0;*/
  /*}*/

  /*@page {*/
  /*  size: 58mm auto;*/
  /*  margin: 0;*/
  /*}*/
}
