:root {
    --pos-primary: #4361ee;
    --pos-secondary: #3f37c9;
    --pos-dark: #212529;
    --pos-light: #f8f9fa;
    --pos-success: #4cc9f0;
    --pos-danger: #f72585;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f7fa;
    overflow-x: hidden;
}

.header {
    font-family: 'Poppins', sans-serif;
}

.product-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card .card-body {
    padding: 1.25rem;
}

.product-img {
    height: 120px;
    object-fit: contain;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    border-radius: 12px 12px 0 0;
}

.sidebar {
    /* height: 100vh; */
    overflow-y: auto;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
    /* padding-right: 30px !important; */
}

.cart-item {
    border-bottom: 1px solid #eee;
    padding: 12px 0;
    transition: all 0.2s;
    margin-right: 18px !important;
}

.cart-item:hover {
    background-color: rgba(67, 97, 238, 0.03);
}

.btn-pos-primary {
    background-color: var(--pos-primary);
    color: white;
    border: none;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.btn-pos-primary:hover {
    background-color: var(--pos-secondary);
    color: white;
}

.btn-pos-outline {
    border: 1px solid var(--pos-primary);
    color: var(--pos-primary);
    font-weight: 500;
}

.btn-pos-outline:hover {
    background-color: var(--pos-primary);
    color: white;
}

.badge-stock {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 50px;
}

.search-box {
    border-radius: 50px;
    padding-left: 20px;
    border: 1px solid #dee2e6;
}

.search-box:focus {
    border-color: var(--pos-primary);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

.category-btn {
    border-radius: 50px;
    padding: 8px 20px;
}

.total-card {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
}

.payment-btn {
    border-radius: 50px;
    padding: 12px;
    font-weight: 500;
    transition: all 0.3s;
}

.payment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.quantity-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.quantity-input {
    width: 30px;
    text-align: center;
    border: none;
    background-color: transparent;
    font-weight: 500;
}

.empty-cart {
    opacity: 0.6;
    text-align: center;
    padding: 40px 0;
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--pos-primary);
}

.product-price {
    font-weight: 600;
    color: var(--pos-primary);
}

.cart-item-name {
    max-width: 130px;
}

.cart-item-price {
    font-weight: 600;
    color: var(--pos-dark);
}

.discount-badge {
    background-color: #f72585;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
}

.animated-add {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.floating-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}


/* Product Management Styles */
.page-container {
    display: none;

}

.page-container.active {
    display: block;
}

.nav-tabs .nav-link.active {
    font-weight: 500;
    color: var(--pos-primary);
    border-bottom: 2px solid var(--pos-primary);
}

.nav-tabs .nav-link {
    color: var(--pos-dark);
    border: none;
    padding: 10px 20px;
}

.nav-tabs .nav-link:hover {
    border: none;
    color: var(--pos-primary);
}

.management-header {
    background-color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.product-table th, .orders-table th {
    font-weight: 500;
    color: var(--pos-dark);
    background-color: #f8f9fa;
}

.product-table td, .orders-table td {
    vertical-align: middle;
}

.product-img-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 5px;
    background-color: #f8f9fa;
    padding: 5px;
}

.action-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 3px;
}

.form-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.image-upload-container {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #f8f9fa;
}

.image-upload-container:hover {
    border-color: var(--pos-primary);
    background-color: rgba(67, 97, 238, 0.05);
}

.preview-image {
    max-width: 200px;
    max-height: 200px;
    margin-top: 15px;
    border-radius: 5px;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-inactive {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Order status badges */
.status-pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.status-onhold {
    background-color: rgba(111, 66, 193, 0.1); /* light purple background */
    color: #6f42c1; /* rich purple text */
}

.status-completed {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-cancelled {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.status-processing {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}
.status-shipped {
    background-color: rgba(25, 135, 84, 0.1); /* soft green background */
    color: #198754; /* Bootstrap green */
}

/* Order details styles */
.order-details-card {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.order-details-header {
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.order-product-item {
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
}

.order-product-item:last-child {
    border-bottom: none;
}

.order-summary {
    background-color: #f8f9fa;
    border-radius: 0 0 10px 10px;
    padding: 15px 20px;
}

/* Filter buttons */
.filter-btn {
    border-radius: 50px;
    padding: 6px 15px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 8px;
}

.filter-btn.active {
    background-color: var(--pos-primary);
    color: white;
}

.thumb-img {
    height: 30px;
    object-fit: cover; /* Optional */
}

/* For JavaFX web view */
.bg-dark, .page-container  {
    /* padding-right: 25px; */
}

/* for vertical scroll bard */
/* For WebKit browsers */
::-webkit-scrollbar {
  width: 10px; /* width of the scrollbar */
}

::-webkit-scrollbar-track {
  background: #f1f1f1; /* track color */
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4facfe, #00f2fe); /* gradient thumb */
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #43e97b, #38f9d7); /* hover effect */
}

/* For Firefox */
* {
  scrollbar-width: thin; /* auto | thin | none */
  scrollbar-color: #4facfe #f1f1f1; /* thumb color | track color */
}

.sidebar {
  overflow-y: scroll !important;     /* enable vertical scrolling */
  scrollbar-width: none;  /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.sidebar::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Pagination */
.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.pagination .page-link {
    color: #0d6efd;
}

.pagination .page-link:hover {
    color: #024dbc;
}

.status-badge {
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
    font-size: 0.75em;
    font-weight: 600;
}

.status-badge.active {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: #842029;
}

.thumb-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    margin-right: 10px;
}

#clearSearchBtn {
    border: 1px solid #dee2e6 !important;
}

/* waiting model */

.waiting-modal .modal-body {
    padding: 40px 20px;
    text-align: center;
}

.spinner-border {
    width: 4rem;
    height: 4rem;
    margin-bottom: 20px;
    color: #4776E6;
}

.modal-backdrop {
    background-color: rgba(255, 255, 255, 0.8);
}

.waiting-modal .modal-header {
    border: none;
    justify-content: center;
    padding: 20px 20px 0;
}

.waiting-modal .modal-title {
    font-weight: 600;
    color: #3a4f6c;
}

.bg-filter {
    background-color: #ced4da !important;
}
.btn-search {
    background-color: #e9ecef !important;
}
.bg-light {
    background-color: #ced4da !important;
}

.fs-sm-6 { font-size: 1.05rem !important; }   /* ~12px */
@media (min-width: 768px) {
  .fs-md-5 { font-size: 1.25rem !important; }    /* ~16px */
}
@media (min-width: 992px) {
  .fs-lg-4 { font-size: 1.5rem !important; } /* ~20px */
  .fs-lg-5 { font-size: 1.25rem !important; } /* ~20px */
  .fs-lg-6 { font-size: 1.15rem !important; } /* ~20px */
}

.filter-btn-products.active, .filter-btn-orders.active {
    border: 1px solid #eee;
}

.btn-pdf {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-pdf:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* PDF Modal Styles */
.pdf-modal .modal-dialog {
    max-width: 350px;
    height: 80vh;
    margin: 10vh auto;
}

.pdf-modal .modal-content {
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.pdf-modal .modal-header {
    color: auto;
    padding: 15px;
}

.pdf-modal .modal-title {
    font-weight: 600;
    font-size: 18px;
}

.pdf-modal .modal-body {
    padding: 0;
    height: calc(100% - 70px);
    background: #f8f9fa;
}

.pdf-modal .modal-footer {
    background: #ecf0f1;
    padding: 12px 15px;
    border-top: 1px solid #ddd;
}

#pdfFrame {
    width: 100%;
    height: 100%;
    border: none;
}

.pdf-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    flex-direction: column;
    background: #f8f9fa;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    color: #3498db;
}

.btn-download {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-download:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-close {
    filter: invert(1);
}

.instructions {
    background: #e8f4fc;
    border-left: 4px solid #3498db;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.feature-list {
    list-style-type: none;
    padding: 0;
}

.feature-list li {
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.cart-item-name {
    min-width: 100px;
}
.cart-controls {
    min-width: 210px;
}

#pdfFrameInvoice {
    height: 70vh;
    width: 100%;
}