/* ABC4Win Theme Styles */
:root {
  /* Professional color palette */
  --supply-primary: #1a3a5f;      /* Deeper blue for primary elements */
  --supply-primary-light: #2c5282; /* Lighter version for hover states */
  --supply-secondary: #2c3544;    /* Dark slate for secondary elements */
  --supply-accent: #3e6990;       /* Medium blue for accents */
  --supply-success: #2d6a4f;      /* Deep green for success states */
  --supply-info: #2a6f97;         /* Muted blue for info states */
  --supply-warning: #cb8c17;      /* Muted orange for warnings */
  --supply-danger: #9e2a2b;       /* Deep red for danger/error states */
  --supply-light: #f8f9fa;        /* Light gray for backgrounds */
  --supply-gray: #6c757d;         /* Medium gray for text */
  --supply-dark: #212529;         /* Very dark gray, nearly black */
  --supply-border: #dcdfe4;       /* Light gray for borders */
  
  /* Typography */
  --supply-font-main: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, sans-serif;
  --supply-font-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Base Overrides */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--supply-font-main);
  color: var(--supply-dark);
  background-color: #f5f7fa;
  line-height: 1.6;
}

/* Heart Pulse Animation */
.heart-pulse {
  display: inline-block;
  animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.3); }
  28% { transform: scale(1); }
  42% { transform: scale(1.3); }
  70% { transform: scale(1); }
}

/* Timeline Styling for Product History */
.timeline-item {
  padding: 1.5rem;
  border-left: 4px solid var(--supply-primary);
  margin-bottom: 1.5rem;
  position: relative;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.timeline-item:before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  border: 4px solid var(--supply-primary);
  left: -10px;
  top: 1.5rem;
}

/* QR Code Container Styling */
.qr-code-container {
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--supply-border);
  position: relative;
}

.qr-code-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.qr-code-container img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.qr-code-container h5 {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--supply-secondary);
}

.qr-code-container p {
  color: var(--supply-gray);
  margin-bottom: 1rem;
}

/* QR Code License Badge */
.qr-license-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--supply-primary), var(--supply-accent));
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

/* QR Code License Information */
.qr-license-info {
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: rgba(var(--supply-primary-rgb), 0.05);
  border-radius: 6px;
  border-left: 4px solid var(--supply-primary);
  font-size: 0.85rem;
  text-align: left;
}

.qr-license-info .license-title {
  font-weight: 600;
  color: var(--supply-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qr-license-info .license-details {
  color: var(--supply-gray);
  line-height: 1.5;
}

.qr-license-info .license-link {
  color: var(--supply-primary);
  text-decoration: underline;
  font-weight: 500;
}

/* Tablet-specific QR Code Styles */
@media (min-width: 768px) and (max-width: 1024px) {
  .qr-code-container {
    padding: 2rem;
    margin-bottom: 1.5rem;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .qr-code-container img {
    max-width: 250px;
    width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
  }
  
  .qr-code-container h5 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .qr-code-container p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }
  
  /* QR Code in modal for tablets */
  .modal .qr-code-container {
    max-width: 400px;
    padding: 2.5rem;
  }
  
  .modal .qr-code-container img {
    max-width: 300px;
  }
  
  /* QR Code grid layout for tablets */
  .qr-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
  }
  
  /* QR Code section in product verification */
  .verification-qr-section .qr-code-container {
    display: inline-block;
    margin: 1rem;
  }
}

/* Custom button styling */
.btn-supply-primary {
  background-color: var(--supply-primary);
  border-color: var(--supply-primary);
  color: white;
}

.btn-supply-primary:hover {
  background-color: #004494;
  border-color: #004494;
  color: white;
}

/* Table styling */
.table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--supply-dark);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.table thead th {
  background-color: var(--supply-secondary);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  padding: 0.85rem 0.75rem;
  border-bottom: none;
  vertical-align: middle;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.table tbody tr:hover {
  background-color: rgba(var(--supply-primary-rgb), 0.05);
}

.table tbody td {
  padding: 0.85rem 0.75rem;
  vertical-align: middle;
  border-top: 1px solid var(--supply-border);
}

.table-bordered {
  border: 1px solid var(--supply-border);
}

.table-bordered td, 
.table-bordered th {
  border: 1px solid var(--supply-border);
}

/* Add RGB values for alpha operations */
:root {
  --supply-primary-rgb: 26, 58, 95;  /* RGB value of the primary color */
  --supply-secondary-rgb: 44, 53, 68; /* RGB value of the secondary color */
}


.footer h5 {
  color: white;
  font-weight: 600;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  display: block;
  padding: 0.35rem 0;
  transition: all 0.2s ease;
}

.footer-link:hover {
  color: white;
  transform: translateX(3px);
}

/* Sticky footer setup */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Page container for sticky footer */
.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.content-wrapper {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}


/* Global Element Styling */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 1.75rem;
  letter-spacing: -0.5px;
}

a {
  color: var(--supply-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--supply-primary-light);
  text-decoration: none;
}

/* Navigation Styling */
/* Navigation Styling */
.navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.5rem 0;
  z-index: 1030; /* Standard Bootstrap navbar z-index, lower than modals */
  min-height: 56px;
  flex-wrap: nowrap;
}

.navbar-brand {
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #fff !important;
  flex-shrink: 0;
}

.navbar-brand img {
  transition: transform 0.3s ease;
  margin-right: 0.5rem;
}

.navbar-brand:hover img {
  transform: scale(1.1);
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .nav-link i {
  margin-right: 0.25rem;
}

/* Button Styling */
.btn {
  border-radius: 4px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
  box-shadow: none !important;
}

.btn-primary {
  background-color: var(--supply-primary);
  border-color: var(--supply-primary);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--supply-primary-light);
  border-color: var(--supply-primary-light);
}

.btn-dark {
  background-color: var(--supply-secondary);
  border-color: var(--supply-secondary);
}

.btn-dark:hover, .btn-dark:focus {
  background-color: #3a4452;
  border-color: #3a4452;
}

.btn-success {
  background-color: var(--supply-success);
  border-color: var(--supply-success);
}

.btn-info {
  background-color: var(--supply-info);
  border-color: var(--supply-info);
}

.btn-danger {
  background-color: var(--supply-danger);
  border-color: var(--supply-danger);
}

.btn-warning {
  background-color: var(--supply-warning);
  border-color: var(--supply-warning);
  color: white;
}

.btn-warning:hover {
  color: white;
}

/* Button width override for desktop - set normal size instead of auto */
@media (min-width: 768px) {
  .btn.w-md-auto {
    width: fit-content !important;
    min-width: 120px;
  }
  
  /* Specific sizing for different button types */
  .btn-sm.w-md-auto {
    min-width: 100px;
  }
  
  .btn-lg.w-md-auto {
    min-width: 140px;
  }
}

/* Input & Form Control Styling */
.form-control, .form-select {
  border-radius: 4px;
  border-color: var(--supply-border);
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  box-shadow: none;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--supply-accent);
  box-shadow: 0 0 0 0.25rem rgba(62, 105, 144, 0.15);
}

.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--supply-dark);
}

.form-check-input:checked {
  background-color: var(--supply-primary);
  border-color: var(--supply-primary);
}

/* Card Styling */
.card {
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
  background-color: #fff;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1rem;
  color: var(--supply-dark);
}

.card-header h4, 
.card-header h5,
.card-header .card-title {
  color: inherit;
  margin-bottom: 0;
}

/* Card header with background colors */
.card-header.bg-primary,
.card-header.bg-secondary,
.card-header.bg-success,
.card-header.bg-danger,
.card-header.bg-warning,
.card-header.bg-info,
.card-header.bg-dark {
  color: white;
}

.card-body {
  padding: 1.25rem;
}

/* Modal Styling */
.modal {
  z-index: 999999999; /* Higher than navbar and other elements */
}

.modal-backdrop {
  z-index: 999999998; /* Just below modal but above other content */
}

.modal-content {
  border: none;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 999999999; /* Ensure modal content is above everything */
  position: relative;
}

.modal-header {
  background-color: var(--supply-primary);
  color: white !important;
  border-bottom: none;
  padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
  font-weight: 600;
  font-size: 1.25rem;
  color: white !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.modal-header .btn-close {
  color: white;
  opacity: 0.8;
  filter: brightness(5);
  transition: opacity 0.2s;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  padding: 0.5rem;
}

.modal-header .btn-close:hover {
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Close button for light backgrounds */
.modal-header.bg-light .btn-close {
  filter: none;
  color: var(--supply-dark);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.modal-header.bg-light .btn-close:hover {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background-color: rgba(0, 0, 0, 0.02);
  border-top: 1px solid var(--supply-border);
}

/* Modal header variations */
.modal-header.bg-success,
.modal-header.bg-info,
.modal-header.bg-warning,
.modal-header.bg-danger,
.modal-header.bg-secondary,
.modal-header.bg-dark {
  color: white !important;
}

.modal-header.bg-success .modal-title,
.modal-header.bg-info .modal-title,
.modal-header.bg-warning .modal-title,
.modal-header.bg-danger .modal-title,
.modal-header.bg-secondary .modal-title,
.modal-header.bg-dark .modal-title {
  color: white !important;
}

.modal-header.bg-light {
  color: var(--supply-dark) !important;
}

.modal-header.bg-light .modal-title {
  color: var(--supply-dark) !important;
}

/* Enhance contrast for warning backgrounds */
.modal-header.bg-warning {
  color: #fff !important;
}

.modal-header.bg-warning .modal-title {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Product Detail Tabs */
.product-tabs .nav-tabs {
  border-bottom: 2px solid var(--supply-border);
  margin-bottom: 1.5rem;
}

.product-tabs .nav-link {
  color: var(--supply-gray);
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  background: transparent;
}

.product-tabs .nav-link:hover {
  color: var(--supply-primary);
  border-bottom-color: rgba(var(--supply-primary-rgb), 0.3);
}

.product-tabs .nav-link.active {
  color: var(--supply-primary);
  border-bottom-color: var(--supply-primary);
  background: transparent;
}

.product-tabs .tab-content {
  padding: 1rem 0;
}

/* Breadcrumbs styling */
.breadcrumb {
  padding: 0.75rem 1rem;
  background-color: rgba(var(--supply-primary-rgb), 0.05);
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--supply-gray);
  content: "›";
  font-size: 1.2rem;
  line-height: 1;
  padding-right: 0.5rem;
  position: relative;
  top: 1px;
}

.breadcrumb-item a {
  color: var(--supply-primary);
  transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
  color: var(--supply-primary-light);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: var(--supply-gray);
}

/* Badges and Pills */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
  border-radius: 4px;
  letter-spacing: 0.3px;
  font-size: 75%;
  position: relative;
}

.badge-primary {
  background-color: var(--supply-primary);
}

.badge-secondary {
  background-color: var(--supply-secondary);
}

.badge-success {
  background-color: var(--supply-success);
}

.badge-danger {
  background-color: var(--supply-danger);
}

.badge-warning {
  background-color: var(--supply-warning);
  color: white;
}

.badge-info {
  background-color: var(--supply-info);
  color: white;
}

/* Progress Bars */
.progress {
  height: 0.75rem;
  background-color: rgba(var(--supply-primary-rgb), 0.1);
  border-radius: 6px;
  box-shadow: none;
  margin-bottom: 1rem;
  overflow: hidden;
}

.progress-bar {
  background-color: var(--supply-primary);
  transition: width 0.6s ease;
}

/* Alerts */
.alert {
  border: none;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.alert-primary {
  background-color: rgba(var(--supply-primary-rgb), 0.1);
  color: var(--supply-primary);
}

.alert-secondary {
  background-color: rgba(var(--supply-secondary-rgb), 0.1);
  color: var(--supply-secondary);
}

.alert-success {
  background-color: rgba(45, 106, 79, 0.1);
  color: var(--supply-success);
}

.alert-danger {
  background-color: rgba(158, 42, 43, 0.1);
  color: var(--supply-danger);
}

.alert-warning {
  background-color: rgba(203, 140, 23, 0.1);
  color: var(--supply-warning);
}

.alert-info {
  background-color: rgba(42, 111, 151, 0.1);
  color: var(--supply-info);
}

/* Utility Classes */
.section-title {
  position: relative;
  margin-bottom: 2rem;
  font-weight: 600;
  color: var(--supply-secondary);
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--supply-primary);
  border-radius: 3px;
}

/* Bootstrap color overrides */
.bg-primary {
  background-color: var(--supply-primary) !important;
}

.bg-secondary {
  background-color: var(--supply-secondary) !important;
}

.bg-success {
  background-color: var(--supply-success) !important;
}

.bg-info {
  background-color: var(--supply-info) !important;
}

.bg-warning {
  background-color: var(--supply-warning) !important;
}

.bg-danger {
  background-color: var(--supply-danger) !important;
}

.bg-dark {
  background-color: var(--supply-dark) !important;
}

.bg-light {
  background-color: var(--supply-light) !important;
}

.text-primary {
  color: var(--supply-primary) !important;
}

.text-secondary {
  color: var(--supply-secondary) !important;
}

.text-success {
  color: var(--supply-success) !important;
}

.text-info {
  color: var(--supply-info) !important;
}

.text-warning {
  color: var(--supply-warning) !important;
}

.text-danger {
  color: var(--supply-danger) !important;
}

.text-dark {
  color: var(--supply-dark) !important;
}

.text-light {
  color: var(--supply-light) !important;
}

.text-muted {
  color: var(--supply-gray) !important;
  opacity: 0.85;
}

/* Page Header */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--supply-border);
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--supply-gray);
  margin-bottom: 0;
}

/* Dropdowns */
.dropdown-menu {
  border: none;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0;
  overflow: hidden;
}

.dropdown-item {
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  color: var(--supply-dark);
  transition: all 0.2s ease;
}

.dropdown-item:hover, .dropdown-item:focus {
  background-color: rgba(var(--supply-primary-rgb), 0.05);
  color: var(--supply-primary);
}

.dropdown-item.active, .dropdown-item:active {
  background-color: var(--supply-primary);
  color: white;
}

.dropdown-divider {
  margin: 0.35rem 0;
  border-top: 1px solid var(--supply-border);
}

/* Tooltips and Popovers */
.tooltip {
  font-family: var(--supply-font-main);
}

.tooltip-inner {
  background-color: var(--supply-secondary);
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before {
  border-top-color: var(--supply-secondary);
}

.bs-tooltip-bottom .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before {
  border-bottom-color: var(--supply-secondary);
}

.bs-tooltip-start .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before {
  border-left-color: var(--supply-secondary);
}

.bs-tooltip-end .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before {
  border-right-color: var(--supply-secondary);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .navbar-collapse {
    background-color: var(--supply-secondary);
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.375rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1050;
  }
  
  /* Ensure footer stays at bottom on mobile */
  .page-container {
    min-height: 100vh;
  }
  
  .content-wrapper {
    flex: 1;
  }
  
  
  .navbar-nav .nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
  }
  
  .card {
    margin-bottom: 1.5rem;
  }
  
  .timeline-item {
    padding: 1.25rem;
  }
}

@media (max-width: 767px) {
  h1 {
    font-size: 1.5rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .section-title {
    font-size: 1.35rem;
  }
  
  .table-responsive {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  }
  
  .modal-header, .modal-body, .modal-footer {
    padding: 1rem;
  }
  
  .qr-code-container {
    padding: 1rem;
  }
  
  .btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
  }
  
  /* Ensure footer stays at bottom on small screens */
  .page-container {
    min-height: 100vh;
  }
  
  .content-wrapper {
    flex: 1;
  }
  
 
}

/* Tablet Portrait Mode (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .qr-code-container {
    max-width: 400px;
    padding: 2.5rem;
  }
  
  .qr-code-container img {
    max-width: 280px;
    margin-bottom: 1.5rem;
  }
  
  /* QR code in verification page for tablet portrait */
  .verification-container .qr-code-container {
    width: 100%;
    max-width: 450px;
  }
}

/* Tablet Landscape Mode (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .qr-code-container {
    max-width: 320px;
    padding: 2rem;
  }
  
  .qr-code-container img {
    max-width: 220px;
    margin-bottom: 1.25rem;
  }
  
  /* Side-by-side layout for QR and product info in landscape */
  .product-qr-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
  }
  
  .product-qr-layout .qr-code-container {
    flex: 0 0 auto;
  }
  
  .product-qr-layout .product-info {
    flex: 1;
  }
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.slide-in-up {
  animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
  0% { 
    transform: translateY(20px); 
    opacity: 0;
  }
  100% { 
    transform: translateY(0); 
    opacity: 1;
  }
}

/* Address Styling */
.address-container {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-left: 4px solid var(--supply-primary);
  transition: all 0.2s ease;
}

.address-container:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.address-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--supply-border);
}

.address-title {
  font-weight: 600;
  color: var(--supply-secondary);
  margin-bottom: 0;
  font-size: 1.1rem;
}

.address-badge {
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
  border-radius: 4px;
  background-color: rgba(var(--supply-primary-rgb), 0.1);
  color: var(--supply-primary);
  font-weight: 500;
}

.address-badge.default {
  background-color: rgba(var(--supply-success-rgb), 0.1);
  color: var(--supply-success);
}

.address-content {
  line-height: 1.7;
  color: var(--supply-dark);
}

.address-content p {
  margin-bottom: 0.25rem;
}

.address-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

.address-actions .btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
}

.address-meta {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--supply-gray);
}

.address-timestamp {
  display: inline-block;
  margin-right: 1rem;
}

.address-coordinates {
  display: inline-block;
  font-family: var(--supply-font-mono);
  background-color: rgba(0, 0, 0, 0.03);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
}

/* Add RGB value for success color */
:root {
  --supply-success-rgb: 45, 106, 79; /* RGB value of the success color */
  --supply-info-rgb: 42, 111, 151;
  --supply-warning-rgb: 203, 140, 23;
  --supply-danger-rgb: 158, 42, 43;
}

/* Advanced QR Code Features */

/* QR Code with Download Option */
.qr-download-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--supply-border);
}

.qr-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--supply-primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.qr-download-btn:hover {
  background-color: var(--supply-primary-light);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* QR Code Scanner Instructions */
.qr-scanner-instructions {
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: rgba(var(--supply-info-rgb), 0.05);
  border-radius: 6px;
  border-left: 4px solid var(--supply-info);
  font-size: 0.85rem;
}

.qr-scanner-instructions .instruction-title {
  font-weight: 600;
  color: var(--supply-info);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* QR Code Security Features */
.qr-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background-color: rgba(var(--supply-success-rgb), 0.1);
  color: var(--supply-success);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* QR Code Statistics */
.qr-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--supply-border);
}

.qr-stat-item {
  text-align: center;
  padding: 0.5rem;
  background-color: rgba(var(--supply-primary-rgb), 0.02);
  border-radius: 4px;
}

.qr-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--supply-primary);
  display: block;
}

.qr-stat-label {
  font-size: 0.75rem;
  color: var(--supply-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

/* Responsive adjustments for address */
@media (max-width: 767px) {
  .address-container {
    padding: 1rem;
  }
  
  .address-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .address-badge {
    margin-top: 0.5rem;
  }
  
  .address-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .address-actions .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Address list styling */
.address-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.address-list .address-container {
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.address-list .address-content {
  flex-grow: 1;
}

/* Address form styling */
.address-form .form-group {
  margin-bottom: 1.25rem;
}

.address-form .form-label {
  font-weight: 500;
}

.address-form .form-text {
  color: var(--supply-gray);
  font-size: 0.85rem;
}

.address-map-container {
  height: 300px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--supply-border);
}

/* Wallet Animations */
@keyframes walletHighlight {
  0% { box-shadow: 0 0 0 0 rgba(var(--supply-primary-rgb), 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(var(--supply-primary-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--supply-primary-rgb), 0); }
}

.wallet-highlight {
  animation: walletHighlight 2s ease-in-out 3;
  transition: all 0.3s ease;
  transform: scale(1.02);
  background-color: var(--supply-primary) !important;
}

#walletDetails {
  animation: fadeIn 0.8s ease-in-out;
}

/* Wallet specific styling */
.wallet-card {
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
}

.wallet-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.wallet-card .card-header {
  padding: 1.25rem 1.5rem;
}

.wallet-card .card-header h4,
.wallet-card .card-header h5 {
  font-weight: 600;
  letter-spacing: -0.5px;
}

.wallet-info-container {
  background-color: white;
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.wallet-balance-display {
  background-color: rgba(var(--supply-primary-rgb), 0.05);
  padding: 1.25rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--supply-primary);
  margin: 1rem 0;
  border: 1px solid rgba(var(--supply-primary-rgb), 0.1);
}

.wallet-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-weight: 500;
}

.wallet-key-field {
  font-family: var(--supply-font-mono);
  letter-spacing: 0.5px;
  background-color: rgba(0, 0, 0, 0.02);
}

.wallet-warning {
  color: var(--supply-danger);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.wallet-info-label {
  font-weight: 600;
  color: var(--supply-secondary);
  margin-bottom: 0.5rem;
  display: block;
}

/* Toast styling */
.toast {
  background-color: white;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  overflow: hidden;
  z-index: 9999999999999999999999999999999999 !important;
}

.toast-container {
  z-index: 9999999999999999999999999999999999 !important;
}

.toast-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.toast-body {
  padding: 1rem;
}

.btn-info {
    --bs-btn-color: #ffffff;
}

/* Mobile-First Responsive Design */
/* ================================= */

/* Touch-friendly improvements */
.btn {
  min-height: 44px;
  touch-action: manipulation;
}

.nav-link {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.form-control, .form-select {
  min-height: 44px;
  font-size: 16px; /* Prevents zoom on iOS */
}

/* Mobile typography and layout adjustments */
@media (max-width: 767.98px) {
  body {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.35rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.1rem; }
  h5, h6 { font-size: 1rem; }
  
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .card {
    margin-bottom: 1rem;
    border-radius: 8px;
  }
  
  .card-body {
    padding: 1rem 0.75rem;
  }
  
  .timeline-item {
    padding: 1rem 0.75rem;
    margin-left: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .table {
    font-size: 0.85rem;
  }
  
  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .navbar-collapse {
    background-color: var(--supply-secondary);
    padding: 1rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: 100%;
    left: 15px;
    right: 15px;
    width: calc(100% - 30px);
    z-index: 1050;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
  }
}

/* Extra small devices */
@media (max-width: 575.98px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .card-body {
    padding: 0.75rem 0.5rem;
  }
  
  .table {
    font-size: 0.8rem;
  }
  
  .btn {
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
  }
}

/* Utility classes for mobile */
.mobile-only { display: none; }
.desktop-only { display: block; }

@media (max-width: 767.98px) {
  .mobile-only { display: block; }
  .desktop-only { display: none; }
  .mobile-text-center { text-align: center; }
  .mobile-w-100 { width: 100% !important; }
}

#QbalanceMobileNavbar{
    display:none;
  }
@media (max-width: 767.98px) {
  #Qbalance {
    display: none;
  }

  #QbalanceMobileNavbar{
    display:block;
  }
}

@media (max-width: 991.98px) {
  .navbar.navbar-expand-lg.navbar-dark.bg-dark.py-2 {
    z-index: 1030;
    padding: 0.375rem 0;
    position: relative;
  }
  
  .navbar {
    padding: 0.375rem 0;
    position: relative;
  }
  
  .navbar .container-fluid {
    position: relative;
  }
  
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 15px;
    right: 15px;
    width: calc(100% - 30px);
    z-index: 1050;
    background-color: var(--supply-secondary);
    padding: 1rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  }
}

/* Additional navbar fixes for mobile menu positioning */
.navbar {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  margin: 20px 15px;
  background: rgba(255,255,255,0.22);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
  backdrop-filter: blur(4.6px);
}

.navbar .container-fluid {
  position: relative;
}

/* Ensure navbar collapse is properly positioned on all devices */
@media (max-width: 1199.98px) {
  .navbar-collapse {
    position: absolute !important;
    top: 100% !important;
    left: 1rem !important;
    right: 1rem !important;
    width: calc(100% - 2rem) !important;
    z-index: 1050 !important;
    background-color: var(--supply-secondary) !important;
    padding: 1rem !important;
    border-radius: 6px !important;
    margin-top: 0.5rem !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
  }
  
  .navbar-nav {
    flex-direction: column !important;
  }
  
  .navbar-nav .nav-item {
    width: 100%;
  }
  
  .navbar-nav .nav-link {
    width: 100%;
    text-align: left;
  }
}

/* Comprehensive responsive QR code styles for all device sizes */
.qr-code-container {
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--supply-border);
  position: relative;
}

.qr-code-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.qr-code-container img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.qr-code-container h5 {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--supply-secondary);
}

.qr-code-container p {
  color: var(--supply-gray);
  margin-bottom: 1rem;
}

/* QR Code License Badge */
.qr-license-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--supply-primary), var(--supply-accent));
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

/* QR Code License Information */
.qr-license-info {
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: rgba(var(--supply-primary-rgb), 0.05);
  border-radius: 6px;
  border-left: 4px solid var(--supply-primary);
  font-size: 0.85rem;
  text-align: left;
}

.qr-license-info .license-title {
  font-weight: 600;
  color: var(--supply-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qr-license-info .license-details {
  color: var(--supply-gray);
  line-height: 1.5;
}

.qr-license-info .license-link {
  color: var(--supply-primary);
  text-decoration: underline;
  font-weight: 500;
}

/* Responsive QR Code Styles for All Devices */

/* Extra Small Devices (320px - 575px) */
@media (max-width: 575.98px) {
  .qr-code-container {
    padding: 1rem;
    margin-bottom: 1rem;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .qr-code-container img {
    max-width: 200px;
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .qr-code-container h5 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .qr-code-container p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .qr-license-badge {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    top: 8px;
    right: 8px;
  }
  
  .qr-license-info {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
}

/* Small Devices (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .qr-code-container {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .qr-code-container img {
    max-width: 220px;
    width: 100%;
    margin-bottom: 1.25rem;
  }
  
  .qr-code-container h5 {
    font-size: 1.1rem;
    margin-bottom: 0.85rem;
  }
  
  .qr-license-info {
    padding: 0.65rem;
    font-size: 0.82rem;
  }
}

/* Tablet-specific QR Code Styles */
@media (min-width: 768px) and (max-width: 1024px) {
  .qr-code-container {
    padding: 2rem;
    margin-bottom: 1.5rem;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .qr-code-container img {
    max-width: 250px;
    width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
  }
  
  .qr-code-container h5 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .qr-code-container p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }
  
  /* QR Code in modal for tablets */
  .modal .qr-code-container {
    max-width: 400px;
    padding: 2.5rem;
  }
  
  .modal .qr-code-container img {
    max-width: 300px;
  }
  
  /* QR Code grid layout for tablets */
  .qr-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
  }
  
  /* QR Code section in product verification */
  .verification-qr-section .qr-code-container {
    display: inline-block;
    margin: 1rem;
  }
}

/* Medium Devices (1025px - 1199px) */
@media (min-width: 1025px) and (max-width: 1199.98px) {
  .qr-code-container {
    padding: 2.25rem;
    margin-bottom: 1.75rem;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .qr-code-container img {
    max-width: 280px;
    width: 100%;
    margin-bottom: 1.75rem;
  }
  
  .qr-code-container h5 {
    font-size: 1.3rem;
    margin-bottom: 1.1rem;
  }
  
  .qr-license-info {
    padding: 0.85rem;
    font-size: 0.9rem;
  }
}

/* Large Devices (1200px+) */
@media (min-width: 1200px) {
  .qr-code-container {
    padding: 2.5rem;
    margin-bottom: 2rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .qr-code-container img {
    max-width: 320px;
    width: 100%;
    margin-bottom: 2rem;
  }
  
  .qr-code-container h5 {
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
  }
  
  .qr-code-container p {
    font-size: 1.1rem;
    margin-bottom: 1.75rem;
  }
  
  .qr-license-info {
    padding: 1rem;
    font-size: 0.95rem;
  }
}

/* QR Code Print Styles */
@media print {
  .qr-code-container {
    break-inside: avoid;
    box-shadow: none !important;
    border: 2px solid #000 !important;
    padding: 1rem !important;
    margin: 1rem 0 !important;
  }
  
  .qr-code-container img {
    max-width: 200px !important;
    margin-bottom: 0.5rem !important;
  }
  
  .qr-license-badge {
    background: #000 !important;
    color: white !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  .qr-license-info {
    background: #f5f5f5 !important;
    border-left-color: #000 !important;
    font-size: 0.8rem !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* Blockchain view button spacing for mobile and tablet */
@media (max-width: 1024px) {
  .mbma15 {
    margin-top: 15px;
  }
}

