body {
    /* Default background for other pages */
    background: url('../images/bkg.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    overflow-y: scroll; /* Force scrollbar space to prevent content shift */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Dark theme specific styles for login page body */
body.login-page {
    background: url('../images/bkg.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    overflow-y: scroll; /* Force scrollbar space to prevent content shift */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}
::-webkit-scrollbar {
    display: none;
  }
  
  /* Hide scrollbar for IE, Edge and Firefox */
  html {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
  }
  
.container {
    width: 90% !important;
    max-width: 90% !important;
}

.card {
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
}

/* Specific dark theme styles for the login card */
.login-page .card {
    background-color: #212529 !important;  /* Bootstrap dark color */
    color: #f8f9fa !important;           /* Bootstrap light color */
    border: 1px solid #444;
    border-radius: 0.75rem;             /* Rounded corners */
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3), /* Primary shadow */
                0 0.5rem 1rem rgba(0, 0, 0, 0.2) !important; /* Secondary shadow */
    transition: all 0.3s ease-in-out;   /* Smooth hover transition */
}

/* Optional: Hover effect */
.login-page .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.4),
                0 0.75rem 1.5rem rgba(0, 0, 0, 0.3) !important;
}

/* Ensure labels inside the card are light */
.login-page .card label {
     color: #f8f9fa !important;
}

/* Style the card header */
 .login-page .card-header {
     background-color: #343a40; /* Slightly different dark shade */
     border-bottom: 1px solid #444;
     text-align: center; /* Ensure header content is centered */
 }

 .login-page .card-header h2 {
     color: #f8f9fa; /* Ensure header text is light */
     margin-top: 1rem; /* Add some space below logo */
 }

 /* Center the logo */
 .login-page .card-header img {
     display: block;
     margin-left: auto;
     margin-right: auto;
     max-height: 100px; /* Keep existing constraint */
 }

/* Override Bootstrap text color utilities if they conflict within the dark card */
.login-page .card .text-white {
    color: #333 !important;
}

.card .text-white-50 {
    color: #666 !important;
}

.table-dark {
    color: #333;
    background-color: transparent;
}

.table-dark td, .table-dark th {
    border-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

.badge-status {
    font-size: inherit;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-weight: 500;
    width: 100%;
    height: 100%;
  
    display: flex;
    box-sizing: border-box;
     align-items: stretch;
    justify-content: center;
  /*  margin: 0;*/
}

/* Scroll to top/bottom buttons */
#scrollTopBtn, #scrollBottomBtn {
  display: none; /* Hidden by default */
  position: fixed; /* Fixed/sticky position */
  bottom: 20px; /* Place the button at the bottom of the page */
  right: 30px; /* Place the button 30px from the right */
  z-index: 99; /* Make sure it does not overlap */
  border: none; /* Remove borders */
  outline: none; /* Remove outline */
  background-color: #555; /* Set a background color */
  color: white; /* Text color */
  cursor: pointer; /* Add a mouse pointer on hover */
  padding: 15px;
  border-radius: 10px; /* Rounded corners */
  font-size: 18px; /* Increase font size */
}

#scrollTopBtn:hover, #scrollBottomBtn:hover {
  background-color: #333; /* Add a dark-grey background on hover */
}

#scrollBottomBtn {
    bottom: 70px; /* Position slightly above the scroll to top button */
}

.badge-status.badge-correct {
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8b0 100%);
    color: #2c5842;
}

.badge-status.badge-incorrect {
    background: linear-gradient(135deg, #ffb7b2 0%, #ff8b8b 100%);
    color: #712b2b;
}

.badge-status.badge-unscannable {
    background: linear-gradient(135deg, #b3e0ff 0%, #66b3ff 100%);
    color: #1a3e72;
}

.dashboard-tile {
    padding: 2rem;
    border-radius: 1rem;
    border: none;
    transition: transform 0.2s;
    text-decoration: none;
    color: #333;
    display: block;
}

.dashboard-tile:hover {
    transform: translateY(-5px);
    color: #333;
}

.dashboard-tile.scan {
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8b0 100%);
}

.dashboard-tile.reports {
    background: linear-gradient(135deg, #dcedc1 0%, #c3d69b 100%);
}

.dashboard-tile.search {
    background: linear-gradient(135deg, #ffd3b6 0%, #ffb88c 100%);
}

/* Custom styles for weight badges */
.weight-badge {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
    min-width: 180px;
    text-align: center;
}

.weight-badge.weight-1 {
    background: linear-gradient(135deg, #c5e8ff 0%, #a1d6ff 100%);
    color: #1a5089;
    border: 1px solid #a1d6ff;
}

.weight-badge.weight-2 {
    background: linear-gradient(135deg, #d8f3d8 0%, #b3e6b3 100%);
    color: #2a6e2a;
    border: 1px solid #b3e6b3;
}

.summary-tile {
    padding: 2rem;
    border-radius: 1rem;
    border: none;
    height: 100%;
}

.summary-tile.correct {
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8b0 100%);
    color: #2c5842;
}

.summary-tile.incorrect {
    background: linear-gradient(135deg, #ffb7b2 0%, #ff8b8b 100%);
    color: #712b2b;
}

.summary-tile.supplied {
    background: linear-gradient(135deg, #dcedc1 0%, #c3d69b 100%);
    color: #4b582f;
}

.summary-tile.returned {
    background: linear-gradient(135deg, #ffd3b6 0%, #ffb88c 100%);
    color: #8b4513;
}




.price-badge {
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
}

.field-badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    /* Glass effect styles */
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.field-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
    transition: all 0.3s ease;
}
.calculated-price {
    font-size: 2rem;
    font-weight: bold;
    color: #28a745;
}

.toast-no-transparency {
    opacity: 1 !important;
}






.card {
    /* General card styles - keep existing border/shadow for non-login pages */
    border: 1px solid rgba(0, 0, 0, 0.125); /* Default Bootstrap border */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    /* background-color: rgba(255, 255, 255, 0.95); /* Original light background */
    /* color: #333; /* Original text color */
}

.table {
    margin-bottom: 0;
}

.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 25px;
    border-radius: 8px;
    color: white;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    width: 20vw;
    min-width: 350px;
    min-height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-correct {
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8b0 100%);
    color: #2c5842;
}

.notification-incorrect {
    background: linear-gradient(135deg, #ffb7b2 0%, #ff8b8b 100%);
    color: #712b2b;
}

.notification-unscannable {
    background: linear-gradient(135deg, #b3e0ff 0%, #66b3ff 100%);
    color: #1a3e72;
}

.label-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-start;
    align-items: stretch;
}

.label-preview {
    min-width: 200px;
    flex: 1 1 auto;
    margin-bottom: 1rem;
}

/* Special styling for Label Reference card */
.flex-grow-1:has(.label-preview:has(#labelRefForm)) {
    flex: 2 1 auto !important;
}

.label-preview form {
    max-width: 100%;
}

.label-preview input,
.label-preview textarea,
.label-preview button {
    width: 100% !important;
}

@media (max-width: 1200px) {
    .label-preview {
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .label-preview {
        min-width: 150px;
    }
}

.label-thumbnail {
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 4px;
    background: transparent;
    flex: 0 0 calc(33.333% - 1rem);
    aspect-ratio: 1/1;
}

.label-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.label-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.label-thumbnail::after {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 1000;
    width: auto;
    max-width: 90vw;
    max-height: 90vh;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}



.table th {
    border-top: none;
    font-weight: 600;
}

/* Modal styling */
.modal {
    display: none;
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: rgba(248, 249, 250, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #212529;
    position: relative;
    margin: 1.75rem auto;
    max-width: 500px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    pointer-events: auto;
}

body.modal-open {
    overflow: hidden;
}

.form-control {
    border: 1px solid rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}
.form-control:focus {
    background-color: #fff;
    color: #212529;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: 0;
}

.btn-close {
    /* Removed filter to restore default dark color */
}

.barcode-container {
    background: white;
    padding: 20px;
    border-radius: 4px;
    margin: 10px 0;
    color: #212529;
}

.detail-card {
    background: rgba(33, 37, 41, 0.9);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.quick-action-tile {
    display: block;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 1.1rem;
}

.quick-action-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-action-tile.scan-tile {
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8b0 100%);
}

.quick-action-tile.reports-tile {
    background: linear-gradient(135deg, #bde0fe 0%, #90c8ff 100%);
}

.quick-action-tile.search-tile {
    background: linear-gradient(135deg, #ffd3b6 0%, #ffb88c 100%);
}

.detail-card .label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.detail-card .value {
    color: white;
}

/* Table row status colors */
.table-dark .table-success {
    --bs-table-bg: rgba(25, 135, 84, 0.7);
}

.table-dark .table-danger {
    --bs-table-bg: rgba(220, 53, 69, 0.7);
}

/* Return to Top Button Styles */
#returnToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1040; /* Lower than modal-backdrop and modal-content */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    background-color: #21b616;
    color: white;
}

#returnToTopBtn.show {
    opacity: 0.8;
    visibility: visible;
    pointer-events: auto;
}

#returnToTopBtn:hover {
    opacity: 1;
    transform: translateY(-3px);
    background-color: #343a40;
}

.date-label {
    white-space: nowrap;
    margin-bottom: 0;
}

#returnModal .modal-footer .btn {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

#returnModal .modal-footer .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

#returnModal .modal-footer .btn:hover {
    background-color: #0056b3;
    border-color: #004085;
}

#returnModal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
}

