/* D-Label Dashboard Custom Styles */

/* ===== CSS VARIABLES ===== */
:root {
  /* D-Label Brand Colors */
  --dlabel-primary: #570036;
  --dlabel-secondary: #cec12d;
  
  /* Bootstrap Color Overrides */
  --bs-primary: #570036;
  --bs-primary-rgb: 87, 0, 54;
  --bs-secondary: #cec12d;
  --bs-secondary-rgb: 206, 193, 45;
  
  /* Additional Brand Colors */
  --dlabel-primary-light: #7a1a4f;
  --dlabel-primary-dark: #3d0026;
  --dlabel-secondary-light: #d9d456;
  --dlabel-secondary-dark: #a39b24;
  
  /* Neutral Colors */
  --dlabel-light-gray: #f8f9fa;
  --dlabel-medium-gray: #6c757d;
  --dlabel-dark-gray: #343a40;
  
  /* Status Colors */
  --dlabel-success: #28a745;
  --dlabel-warning: #ffc107;
  --dlabel-danger: #dc3545;
  --dlabel-info: #17a2b8;
  
}

/* ===== BOOTSTRAP OVERRIDES ===== */

/* Primary Button Overrides */
.btn-primary {
  background-color: var(--dlabel-primary);
  border-color: var(--dlabel-primary);
  color: white;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--dlabel-primary-dark);
  border-color: var(--dlabel-primary-dark);
  color: white;
}

.btn-primary:active,
.btn-primary.active {
  background-color: var(--dlabel-primary-dark);
  border-color: var(--dlabel-primary-dark);
}

/* Secondary Button Overrides */
.btn-secondary {
 /* background-color: var(--dlabel-secondary);
  border-color: var(--dlabel-secondary);
  color: var(--dlabel-primary);*/
  background-color: #c3c3c3;
  border-color: #ababab;
  color: #2d2d2d;
  font-weight: 500;
}

.btn-secondary:hover,
.btn-secondary:focus {
  /*background-color: var(--dlabel-secondary-dark);
  border-color: var(--dlabel-secondary-dark);
  color: var(--dlabel-primary);*/
  color: #000;
  background-color: #bbb;
}

/* Outline Button Variants */
.btn-outline-primary {
  color: var(--dlabel-primary);
  border-color: var(--dlabel-primary);
}

.btn-check:checked+.btn, .btn.active, .btn.show, .btn:first-child:active, :not(.btn-check)+.btn:active {    
    background-color: #a10b68;
    border-color: #a10b68;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--dlabel-primary);
  border-color: var(--dlabel-primary);
  color: white;
}

.btn-outline-secondary {
  color: var(--dlabel-secondary-dark);
  border-color: var(--dlabel-secondary);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: var(--dlabel-secondary);
  border-color: var(--dlabel-secondary);
  color: var(--dlabel-primary);
}

/* Form Control Overrides */
.form-control:focus,
.form-select:focus {
  border-color: var(--dlabel-primary);
  box-shadow: 0 0 0 0.2rem rgba(87, 0, 54, 0.25);
}

.form-check-input:checked {
  background-color: var(--dlabel-primary);
  border-color: var(--dlabel-primary);
}

/* Sfondo subtle per form-check con checkbox checked */
.form-check-highlighted {
  background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
  border-radius: 0.375rem;
  padding: 0.35rem 0.5rem;
  transition: background-color 0.15s ease;
}

.form-check-input:focus {
  border-color: var(--dlabel-primary);
  box-shadow: 0 0 0 0.2rem rgba(87, 0, 54, 0.25);
}

/* Link Overrides */
a {
  color: var(--dlabel-primary);
}

a:hover,
a:focus {
  color: var(--dlabel-primary-dark);
}

/* Badge Overrides */
.badge.bg-primary {
  background-color: var(--dlabel-primary) !important;
}

.badge.bg-secondary {
  background-color: var(--dlabel-secondary) !important;
  color: var(--dlabel-primary) !important;
}

/* Alert Overrides */
.alert-primary {
  color: var(--dlabel-primary);
  background-color: rgba(87, 0, 54, 0.1);
  border-color: rgba(87, 0, 54, 0.2);
}

/* Progress Bar Overrides */
.progress-bar {
  background-color: var(--dlabel-primary);
}

/* ===== UTILITY CLASSES ===== */

/* Background Colors */
.bg-dlabel-primary {
  background-color: var(--dlabel-primary) !important;
  color: white !important;
}

.bg-dlabel-secondary {
  background-color: var(--dlabel-secondary) !important;
  color: var(--dlabel-primary) !important;
}

.bg-dlabel-light {
  background-color: var(--dlabel-light-gray) !important;
}

/* Text Colors */
.text-dlabel-primary {
  color: var(--dlabel-primary) !important;
}

.text-dlabel-secondary {
  color: var(--dlabel-secondary-dark) !important;
}

.text-dlabel-light {
  color: var(--dlabel-medium-gray) !important;
}

/* Border Colors */
.border-dlabel-primary {
  border-color: var(--dlabel-primary) !important;
}

.border-dlabel-secondary {
  border-color: var(--dlabel-secondary) !important;
}

/* ===== COMPONENT SPECIFIC STYLES ===== */

/* Header Styles */
.navbar-brand {
  color: white !important;
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: white !important;
}

.navbar-nav .nav-link.active {
  color: white !important;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
}

/* Navbar text and secondary elements */
.navbar .text-secondary {
  color: rgba(255, 255, 255, 0.7) !important;
}

.navbar small {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Navbar dropdown styles */
.navbar-nav .dropdown-menu {
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

.navbar-nav .dropdown-item {
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus {
  background-color: rgba(87, 0, 54, 0.1);
  color: var(--dlabel-primary);
}

.navbar-nav .dropdown-header {
  color: var(--dlabel-primary);
  font-weight: 600;
}

.navbar-nav .dropdown-item.text-danger:hover {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

/* Enhanced Sidebar Styles */
.sidebar .nav-section-title {
  border-bottom: 1px solid #dee2e6;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.sidebar .nav-pills .nav-link {
  color: var(--dlabel-primary);
  padding: 0.85rem 1rem;
  line-height: 1;
  font-size: 14px;
  border-radius: 0;
  margin: 1px 0;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.sidebar .nav-pills .nav-link:hover {
  background-color: rgba(87, 0, 54, 0.1);
  border-left-color: var(--dlabel-secondary);
  color: var(--dlabel-primary-dark);
}

.sidebar .nav-pills .nav-link.active {
  background-color: var(--dlabel-primary);
  color: white;
  border-left-color: var(--dlabel-secondary);
  font-weight: 500;
}

.sidebar .sub_sections .nav-pills .nav-link.active{
  background-color: #454545;
}

.sidebar .nav-link i {
  margin-right: 0.75rem;
  width: 1.2rem;
  text-align: center;
  font-size: 0.9rem;
}

.sidebar .nav-link .ms-auto {
  margin-left: auto !important;
  font-size: 0.8rem;
}

/* Sidebar Header */
.sidebar-header {
  /*background: linear-gradient(135deg, var(--dlabel-primary) 0%, var(--dlabel-primary-dark) 100%);*/
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .sidebar-title {
  font-size: 1rem;
  font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
  background-color: rgba(87, 0, 54, 0.05);
  border-top: 1px solid rgba(87, 0, 54, 0.1);
}

/* Quick Actions in Sidebar */
.sidebar .btn-outline-primary {
  border-color: var(--dlabel-primary);
  color: var(--dlabel-primary);
  font-size: 0.875rem;
}

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

.sidebar .btn-outline-secondary {
  border-color: var(--dlabel-secondary);
  color: var(--dlabel-secondary-dark);
  font-size: 0.875rem;
}

.sidebar .btn-outline-secondary:hover {
  background-color: var(--dlabel-secondary);
  border-color: var(--dlabel-secondary);
  color: var(--dlabel-primary);
}

/* Card Styles */
.card {
  border: 1px solid rgba(87, 0, 54, 0.1);
  box-shadow: 0 0.125rem 0.25rem rgba(87, 0, 54, 0.075);
}

.card-header {
  background-color: rgba(87, 0, 54, 0.05);
  border-bottom: 1px solid rgba(87, 0, 54, 0.1);
  color: var(--dlabel-primary);
  font-weight: 600;
}

/* Statistics Cards */
.stat-card {
  transition: transform 0.2s ease-in-out;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(87, 0, 54, 0.15);
}

.stat-card .card-body {
  padding: 1.5rem;
}

.stat-card .stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dlabel-primary);
  line-height: 1;
}

.stat-card .stat-label {
  color: var(--dlabel-medium-gray);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

.stat-card .stat-icon {
  font-size: 3rem;
  color: var(--dlabel-secondary);
  opacity: 0.7;
}

/* Form Styles */
.form-label {
  color: var(--dlabel-primary);
  font-weight: 500;
}

.required-field::after {
  content: " *";
  color: var(--dlabel-danger);
}

.form-text {
  color: var(--dlabel-medium-gray);
}

footer .text-muted {
    color: rgb(169 169 169 / 75%) !important;
}

/* File Upload Styles */
.file-upload-area {
  border: 2px dashed var(--dlabel-secondary);
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  background-color: rgba(206, 193, 45, 0.05);
  transition: all 0.3s ease;
}

.file-upload-area:hover,
.file-upload-area.dragover {
  border-color: var(--dlabel-primary);
  background-color: rgba(87, 0, 54, 0.05);
}

.file-upload-area.uploading {
  border-color: var(--dlabel-info);
  background-color: rgba(23, 162, 184, 0.05);
}

.file-upload-area.debouncing {
  border-color: var(--dlabel-warning);
  background-color: rgba(255, 193, 7, 0.05);
}

.file-upload-area .upload-icon {
  font-size: 3rem;
  color: var(--dlabel-secondary);
  margin-bottom: 1rem;
}

/* Upload Progress Bar */
.upload-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 0 0 0.5rem 0.5rem;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  background-color: var(--dlabel-primary);
  width: 0%;
  transition: width 0.3s ease;
}


.logo-fallback {
  font-family: "Times New Roman", serif;
  font-size: 1.5rem;
  color: var(--dlabel-primary);
  font-weight: bold;
  text-align: center;
  padding: 1rem;
  border: 1px solid rgba(87, 0, 54, 0.2);
  border-radius: 0.375rem;
  background-color: var(--dlabel-light-gray);
}

/* Logo Gallery Styles */
.logo-gallery {
  margin-top: 1rem;
}

.logo-gallery .row {
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

.logo-gallery .row > [class*="col-"] {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.logo-card {
  transition: transform 0.2s ease-in-out;
}

.logo-card:hover {
  transform: translateY(-2px);
}

.logo-card .card {
  transition: all 0.3s ease;
  border-radius: 0.75rem;
  overflow: hidden;
}

.logo-card .card:hover {
  box-shadow: 0 0.5rem 1rem rgba(87, 0, 54, 0.15) !important;
}

.logo-card .card.border-primary {
  border-color: var(--dlabel-primary) !important;
  background-color: rgba(87, 0, 54, 0.02);
}

.logo-thumbnail {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  background-color: white;
  overflow: hidden;
  position: relative;
}

.logo-thumbnail img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.25rem;
}

.logo-fallback-small {
  font-family: "Times New Roman", serif;
  font-size: 12px;
  font-weight: bold;
  color: var(--dlabel-primary);
  text-align: center;
  padding: 0.5rem;
  line-height: 1.2;
}

.logo-actions {
  gap: 0.5rem;
}

.logo-actions .btn {
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.logo-actions .btn:hover {
  transform: translateY(-1px);
}

.logo-info {
  font-size: 0.75rem;
  line-height: 1.4;
}

.logo-info div {
  width: 46%;
  text-align: left;
  margin-bottom: 0.25rem;
}

.logo-info div:last-child {
  margin-bottom: 0;
}

/* Empty state styles */
.empty-state {
  padding: 3rem 1rem;
  text-align: center;
}

.empty-state i {
  color: var(--dlabel-secondary);
  opacity: 0.7;
  margin-bottom: 1rem;
}

.empty-state h5 {
  color: var(--dlabel-primary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--dlabel-medium-gray);
  margin-bottom: 1.5rem;
}

.empty-state .btn {
  margin: 0 0.25rem;
  font-size: 0.9rem;
}

/* Responsive adjustments for logo gallery */
@media (max-width: 767px) {
  .logo-gallery .row > [class*="col-"] {
    margin-bottom: 1rem;
  }
  
  .logo-thumbnail {
    height: 80px;
  }
  
  .logo-actions .btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }
  
  .logo-info {
    font-size: 0.7rem;
  }
}

@media (max-width: 575px) {
  .logo-gallery .col-sm-12 {
    max-width: 100%;
    flex: 0 0 100%;
  }
  
  .empty-state {
    padding: 2rem 1rem;
  }
  
  .empty-state .btn {
    display: block;
    width: 100%;
    margin: 0.25rem 0;
  }
}

/* Upload Area Styles */
.upload-area {
  border: 2px dashed var(--dlabel-secondary);
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  background-color: rgba(206, 193, 45, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--dlabel-primary);
  background-color: rgba(87, 0, 54, 0.05);
}

.upload-area.uploading {
  border-color: var(--dlabel-info);
  background-color: rgba(23, 162, 184, 0.05);
  cursor: not-allowed;
}

.upload-area.debouncing {
  border-color: var(--dlabel-warning);
  background-color: rgba(255, 193, 7, 0.05);
  cursor: wait;
}

.upload-content {
  pointer-events: none;
}

.upload-area .upload-icon {
  font-size: 3rem;
  color: var(--dlabel-secondary);
  margin-bottom: 1rem;
}

/* Logo Preview Container */
.logo-preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background-color: white;
  padding: 1rem;
}

.logo-preview-container h6,
.logo-preview-container small{
  display: none;
}

/* Footer Styles */
.footer {
  background-color: var(--dlabel-primary);
  color: white;
  padding: 1rem 0;
  margin-top: auto;
}

.footer a {
  color: var(--dlabel-secondary);
}

.footer a:hover {
  color: var(--dlabel-secondary-light);
}

/* ===== RESPONSIVE UTILITIES ===== */

/* Mobile-first responsive text sizes */
.display-responsive {
  font-size: 1.5rem;
}

@media (min-width: 576px) {
  .display-responsive {
    font-size: 2rem;
  }
}

@media (min-width: 768px) {
  .display-responsive {
    font-size: 2.5rem;
  }
}

/* Responsive spacing utilities */
.py-responsive {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

@media (min-width: 768px) {
  .py-responsive {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* ===== ANIMATION UTILITIES ===== */

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

.slide-in-left {
  animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== LOADING STATES ===== */

.loading-spinner {
  border: 2px solid var(--dlabel-light-gray);
  border-top: 2px solid var(--dlabel-primary);
  border-radius: 50%;
  width: 1rem;
  height: 1rem;
  /* animation: spin 1s linear infinite; */
  display: inline-block;
  margin-right: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1rem;
  height: 1rem;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.btn-loading .btn-text {
  opacity: 0;
}
/* ====
= RESPONSIVE DESIGN COMPONENTS ===== */

/* ===== RESPONSIVE CARD LAYOUTS FOR DASHBOARD STATISTICS ===== */

/* Statistics Grid Layout */
.stats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Responsive Statistics Cards */
.stat-card-responsive {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 575px) {
  .stat-card-responsive {
    min-height: 100px;
  }
  
  .stat-card-responsive .stat-number {
    font-size: 2rem;
  }
  
  .stat-card-responsive .stat-icon {
    font-size: 2rem;
  }
}

/* Dashboard Cards Container */
.dashboard-cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .dashboard-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .dashboard-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Quick Actions Card */
.quick-actions-card {
  grid-column: 1 / -1;
}

@media (min-width: 1200px) {
  .quick-actions-card {
    grid-column: span 1;
  }
}

/* ===== MOBILE-FRIENDLY NAVIGATION AND SIDEBAR ===== */

/* Mobile Navigation Toggle */
.navbar-toggler {
  border: 1px solid var(--dlabel-primary);
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(87, 0, 54, 0.25);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23570036' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive Sidebar */
.sidebar-responsive {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background-color: var(--dlabel-light-gray);
  transition: left 0.3s ease;
  z-index: 1050;
  overflow-y: auto;
  border-right: 1px solid rgba(87, 0, 54, 0.1);
}

.sidebar-responsive.show {
  left: 0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Desktop Sidebar */
@media (min-width: 1200px) {
  .sidebar-responsive {
    position: static;
    left: 0;
    width: 250px;
    height: auto;
    min-height: calc(100vh - 56px);
  }
  
  .sidebar-overlay {
    display: none;
  }
}

/* Sidebar Header */
.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(87, 0, 54, 0.1);
  display: flex;
  justify-content: between;
  align-items: center;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--dlabel-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}

@media (min-width: 1200px) {
  .sidebar-close {
    display: none;
  }
}

/* Sidebar Navigation */
.sidebar-nav {
  padding: 1rem 0;
}

.sidebar-nav .nav-item {
  margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--dlabel-primary);
  text-decoration: none;
  border-radius: 0;
  margin: 0 0.5rem;
  transition: all 0.2s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background-color: var(--dlabel-primary);
  color: white;
  border-radius: 0.375rem;
}

.sidebar-nav .nav-link i {
  margin-right: 0.75rem;
  width: 1.25rem;
  text-align: center;
}

/* Collapsible Sidebar Sections */
.sidebar-section {
  margin-bottom: 1rem;
}

.sidebar-section-title {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dlabel-medium-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.sidebar-subsection {
  padding-left: 1rem;
}

.sidebar-subsection .nav-link {
  padding-left: 2.5rem;
  font-size: 0.875rem;
}

/* ===== RESPONSIVE FORM LAYOUTS ===== */

/* Form Grid System */
.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .form-grid-sm-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .form-grid-md-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-grid-md-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .form-grid-lg-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .form-grid-lg-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Full Width Form Elements */
.form-grid .form-group-full {
  grid-column: 1 / -1;
}

/* Responsive Form Sections */
.form-section {
  background-color: white;
  border: 1px solid rgba(87, 0, 54, 0.1);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 767px) {
  .form-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }
}

.form-section-title {
  color: var(--dlabel-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--dlabel-secondary);
}

/* Responsive Input Groups */
.input-group-responsive {
  flex-direction: column;
}

@media (min-width: 576px) {
  .input-group-responsive {
    flex-direction: row;
  }
}

.input-group-responsive .form-control {
  border-radius: 0.375rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 576px) {
  .input-group-responsive .form-control {
    border-radius: 0.375rem 0 0 0.375rem;
    margin-bottom: 0;
  }
  
  .input-group-responsive .form-control:last-child {
    border-radius: 0 0.375rem 0.375rem 0;
  }
}

/* Responsive Button Groups */
.btn-group-responsive {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 576px) {
  .btn-group-responsive {
    flex-direction: row;
    gap: 0.75rem;
  }
}

.btn-group-responsive .btn {
  flex: 1;
}

@media (max-width: 575px) {
  .btn-group-responsive .btn {
    width: 100%;
  }
}

/* ===== RESPONSIVE LAYOUT UTILITIES ===== */

/* Container Responsive Padding */
.container-responsive {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 576px) {
  .container-responsive {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 992px) {
  .container-responsive {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Main Content Area */
main {
  min-height: calc(100vh - 76px); /* Adjusted for header height */
  transition: margin-left 0.3s ease;
}

@media (min-width: 1200px) {
  main, footer, ._nav_breadcrumb {
    margin-left: 280px !important; /* Match sidebar width exactly, override Bootstrap */
    width: calc(100% - 280px) !important; /* Ensure proper width calculation */
  }
}

/* Sidebar Layout Styles */
.sidebar {
  width: 280px;
  height: calc(100vh - 76px);
  position: fixed;
  top: 76px;
  left: 0;
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  background-color: var(--dlabel-light-gray);
  border-right: 1px solid rgba(87, 0, 54, 0.1);
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
}

.sidebar-toggle {
  position: fixed;
  top: 85px;
  left: 15px;
  z-index: 1001;
  border-radius: 50%;
  width: 45px;
  height: 45px;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

/* Mobile Responsive Sidebar */
@media (max-width: 1199.98px) {



  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .sidebar.show + .sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }
  
  main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .sidebar-toggle{
    top: 19px;
    z-index: 1021;
  }

  .navbar-toggler{
    background-color: #fff;
  }

  #navbarNav .navbar-nav:first-child{
    display: none;
  }

  .navbar-brand{
    margin-left: 70px;
  }

}

@media (min-width: 1200px) {
  .sidebar-toggle {
    display: none;
  }
}

._sticky_title{
  position: sticky;
  top: 80px;
  z-index: 100;
  background-color: #fff;
  padding-left: 15px;
  padding-right: 15px;
}

/* Page Header Responsive */
.page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(87, 0, 54, 0.1);
}

.page-header h1 {
  font-size: 1.75rem;
  color: var(--dlabel-primary);
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .page-header h1 {
    font-size: 2.25rem;
  }
}

.page-header .breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 0;
}

/* ===== RESPONSIVE TABLE LAYOUTS ===== */

.table-responsive-custom {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive-custom table {
  min-width: 600px;
}

@media (max-width: 767px) {
  .table-responsive-custom .table td,
  .table-responsive-custom .table th {
    padding: 0.5rem 0.25rem;
    font-size: 0.875rem;
  }
}

/* ===== RESPONSIVE MODAL ADJUSTMENTS ===== */

@media (max-width: 575px) {
  .modal-dialog {
    margin: 0.5rem;
  }
  
  .modal-content {
    border-radius: 0.5rem;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }
}

/* ===== RESPONSIVE CARD ADJUSTMENTS ===== */

@media (max-width: 575px) {
  .card {
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .card-header {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
}

/* ===== RESPONSIVE NAVIGATION BREADCRUMBS ===== */

.breadcrumb-responsive {
  font-size: 0.875rem;
  flex-wrap: wrap;
}

@media (max-width: 575px) {
  .breadcrumb-responsive {
    font-size: 0.8rem;
  }
  
  .breadcrumb-responsive .breadcrumb-item {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ===== RESPONSIVE UTILITY CLASSES ===== */

/* Hide/Show on different screen sizes */
.d-mobile-none {
  display: none;
}

@media (min-width: 768px) {
  .d-mobile-none {
    display: block;
  }
}

.d-desktop-none {
  display: block;
}

@media (min-width: 768px) {
  .d-desktop-none {
    display: none;
  }
}

/* Responsive text alignment */
.text-center-mobile {
  text-align: center;
}

@media (min-width: 768px) {
  .text-left-desktop {
    text-align: left;
  }
}

/* Responsive margins and padding */
.mb-responsive {
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .mb-responsive {
    margin-bottom: 1.5rem;
  }
}

.p-responsive {
  padding: 1rem;
}

@media (min-width: 768px) {
  .p-responsive {
    padding: 1.5rem;
  }
}

@media (min-width: 992px) {
  .p-responsive {
    padding: 2rem;
  }
}
/* ==
=== LOGIN PAGE SPECIFIC STYLES ===== */

/* Login Page Body */
.login-page {
  background: linear-gradient(135deg, var(--dlabel-primary) 0%, var(--dlabel-primary-dark) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Login Card */
.login-page .card {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

.login-page .card-body {
  padding: 3rem;
}

@media (max-width: 575px) {
  .login-page .card-body {
    padding: 2rem 1.5rem;
  }
}

/* Login Form Styling */
.login-page .form-label {
  font-weight: 600;
  color: var(--dlabel-primary);
  margin-bottom: 0.5rem;
}

.login-page .input-group-text {
  background-color: var(--dlabel-light-gray);
  border-color: #ced4da;
  color: var(--dlabel-primary);
}

.login-page .form-control {
  border-left: none;
  padding-left: 0.75rem;
}

.login-page .form-control:focus {
  border-color: var(--dlabel-primary);
  box-shadow: none;
}

.login-page .input-group:focus-within .input-group-text {
  border-color: var(--dlabel-primary);
  background-color: rgba(87, 0, 54, 0.05);
}

/* Password Toggle Button */
.login-page #togglePassword {
  border-left: none;
  background-color: var(--dlabel-light-gray);
  color: var(--dlabel-primary);
}

.login-page #togglePassword:hover {
  background-color: rgba(87, 0, 54, 0.1);
  color: var(--dlabel-primary-dark);
}

/* Login Button */
.login-page .btn-primary {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.login-page .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.5rem 1rem rgba(87, 0, 54, 0.3);
}

/* Remember Me Checkbox */
.login-page .form-check-input {
  margin-top: 0.125rem;
}

.login-page .form-check-label {
  color: var(--dlabel-medium-gray);
  font-size: 0.9rem;
}

/* Forgot Password Link */
.login-page .text-center a {
  color: var(--dlabel-primary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-page .text-center a:hover {
  color: var(--dlabel-primary-dark);
  text-decoration: underline;
}

/* Login Page Title */
.login-page h2 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-page .text-muted {
  color: var(--dlabel-medium-gray) !important;
  font-size: 0.95rem;
}

/* Alert Styling for Login Page */
.login-page .alert {
  border-radius: 0.5rem;
  border: none;
  font-size: 0.9rem;
}

.login-page .alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #721c24;
}

.login-page .alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  color: #155724;
}

/* Responsive adjustments for login page */
@media (max-width: 575px) {
  .login-page .col-md-4 {
    padding: 1rem;
  }
  
  .login-page h2 {
    font-size: 1.5rem;
  }
  
  .login-page .btn-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
}

/* Loading state for login button */
.login-page .btn-loading {
  position: relative;
  color: transparent;
}

.login-page .btn-loading::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  top: 50%;
  left: 50%;
  margin-left: -0.5rem;
  margin-top: -0.5rem;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s ease infinite;
}/* =
==== FORGOT PASSWORD PAGE SPECIFIC STYLES ===== */

/* Success State Styling */
.login-page .text-success {
  color: var(--dlabel-success) !important;
}

.login-page .alert-info {
  background-color: rgba(23, 162, 184, 0.1);
  border-color: rgba(23, 162, 184, 0.2);
  color: #0c5460;
}

/* Form Text Styling */
.login-page .form-text {
  color: var(--dlabel-medium-gray);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Success Icon Animation */
.login-page .fa-envelope-open-text {
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Loading state for forgot password button */
.login-page .btn-loading .fa-spinner {
  animation: spin 1s linear infinite;
}
/*
 ===== DASHBOARD SPECIFIC STYLES ===== */

/* Dashboard Statistics Cards */
.border-left-primary {
  border-left: 0.25rem solid var(--dlabel-primary) !important;
}

.border-left-success {
  border-left: 0.25rem solid var(--dlabel-success) !important;
}

.border-left-info {
  border-left: 0.25rem solid var(--dlabel-info) !important;
}

.border-left-warning {
  border-left: 0.25rem solid var(--dlabel-warning) !important;
}

/* Dashboard Card Styling */
.dashboard-card {
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Dashboard Statistics Text Styling */
.text-xs {
  font-size: 0.75rem;
}

.font-weight-bold {
  font-weight: 700 !important;
}

.text-uppercase {
  text-transform: uppercase;
}

.text-gray-800 {
  color: #5a5c69 !important;
}

.text-gray-300 {
  color: #dddfeb !important;
}

/* Dashboard Welcome Alert */
.alert-primary {
  background-color: rgba(87, 0, 54, 0.1);
  border-color: rgba(87, 0, 54, 0.2);
  color: var(--dlabel-primary);
}

/* Dashboard Quick Actions */
.btn-block {
  display: block;
  width: 100%;
  text-align: center;
  padding: 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.btn-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.btn-block i {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Dashboard Activity List */
.list-group-item {
  border-left: none;
  border-right: none;
  border-top: 1px solid rgba(0, 0, 0, 0.125);
  border-bottom: none;
}

.list-group-item:first-child {
  border-top: none;
}

.list-group-item:last-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Progress Bar Styling */
.progress-sm {
  height: 0.5rem;
}

.progress-bar.bg-warning {
  background-color: var(--dlabel-warning) !important;
}

/* Dashboard Responsive Adjustments */
@media (max-width: 767px) {
  .dashboard-card .card-body {
    padding: 1rem;
  }
  
  .dashboard-card .h5 {
    font-size: 1.1rem;
  }
  
  .dashboard-card .fa-2x {
    font-size: 1.5em !important;
  }
  
  .btn-block {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  .btn-block i {
    font-size: 1.25rem;
  }
}

/* ===== PROFILE PAGE SPECIFIC STYLES ===== */

/* Profile Section Styling */
.profile-section {
  scroll-margin-top: 100px; /* Account for fixed header */
}

.profile-section .card-header {
  background-color: rgba(87, 0, 54, 0.05);
  border-bottom: 1px solid rgba(87, 0, 54, 0.1);
  font-weight: 600;
}

.profile-section .card-header h5 {
  margin-bottom: 0;
  color: var(--dlabel-primary);
}

/* Profile Completion Progress */
.progress {
  height: 0.75rem;
  background-color: rgba(87, 0, 54, 0.1);
}

.progress-bar {
  background-color: var(--dlabel-primary);
  transition: width 0.6s ease;
}

/* Required Field Indicators */
.text-danger {
  color: #dc3545 !important;
}

.form-label .text-danger {
  font-weight: 700;
}

/* Form Validation Styling */
.was-validated .form-control:valid,
.form-control.is-valid {
  border-color: var(--dlabel-success);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.38 1.38L7.7 4.09 6.76 3.15 4.62 5.29z'/%3e%3c/svg%3e");
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4M7.2 4.6l-1.4 1.4'/%3e%3c/svg%3e");
}

/* Logo Management Styles */
.logo-preview-container {
  margin-bottom: 1rem;
}

.logo-preview {
  border: 2px dashed rgba(87, 0, 54, 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  background-color: rgba(248, 249, 250, 0.8);
  height: 180px;
  display: block;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.logo-preview.has-logo {
  border-style: solid;
  border-color: var(--dlabel-primary);
  background-color: white;
}

.logo-preview img {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
  border-radius: 0.25rem;
}

.logo-fallback {
  padding: 1rem;
  background-color: white;
  border: 1px solid rgba(87, 0, 54, 0.2);
  border-radius: 0.375rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.logo-fallback-small {
  padding: 0.5rem;
  background-color: white;
  border: 1px solid rgba(87, 0, 54, 0.2);
  border-radius: 0.25rem;
  text-align: center;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

/* Upload Area Styling */
.upload-area {
  border: 2px dashed var(--dlabel-secondary);
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  background-color: rgba(206, 193, 45, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--dlabel-primary);
  background-color: rgba(87, 0, 54, 0.05);
  transform: translateY(-2px);
}

.upload-area.uploading {
  pointer-events: none;
  opacity: 0.7;
}

.upload-content {
  text-align: center;
  pointer-events: none;
}

.upload-area .fa-cloud-upload-alt {
  color: var(--dlabel-secondary);
  margin-bottom: 1rem;
}

.upload-area:hover .fa-cloud-upload-alt {
  color: var(--dlabel-primary);
}

.upload-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: rgba(87, 0, 54, 0.1);
  border-radius: 0 0 0.5rem 0.5rem;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  background-color: var(--dlabel-primary);
  width: 0%;
  transition: width 0.3s ease;
}

/* Logo Gallery Styling - DISABLED (using Bootstrap grid instead) */
.logo-gallery-old {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.logo-item {
  border: 1px solid rgba(87, 0, 54, 0.1);
  border-radius: 0.5rem;
  padding: 1rem;
  background-color: white;
  transition: all 0.3s ease;
  position: relative;
}

.logo-item:hover {
  border-color: var(--dlabel-primary);
  box-shadow: 0 0.25rem 0.5rem rgba(87, 0, 54, 0.1);
}

.logo-item.primary {
  border-color: var(--dlabel-primary);
  border-width: 2px;
  background-color: rgba(87, 0, 54, 0.02);
}

.logo-thumbnail {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(87, 0, 54, 0.1);
  border-radius: 0.25rem;
  background-color: var(--dlabel-light-gray);
  overflow: hidden;
}

.logo-thumbnail img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.logo-actions .btn {
  flex: 1;
  font-size: 0.875rem;
  padding: 0.375rem 0.5rem;
}

.logo-info {
  text-align: center;
}

.logo-info .badge {
  font-size: 0.75rem;
}

.logo-delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--dlabel-danger);
  color: white;
  border: none;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.logo-item:hover .logo-delete {
  opacity: 1;
}

.logo-delete:hover {
  background-color: #c82333;
}

/* Logo Upload Error Styling */
.upload-error {
  color: var(--dlabel-danger);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}

.upload-error.show {
  display: block;
}

/* Logo Preview Modal */
.logo-preview-modal .modal-body {
  text-align: center;
  padding: 2rem;
}

.logo-preview-modal img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Password Section Styling */
.input-group .btn {
  border-left: 1px solid #ced4da;
}

.input-group .form-control:focus + .btn {
  border-color: var(--dlabel-primary);
}

/* Password Toggle Button */
.btn-outline-secondary {
  color: var(--dlabel-medium-gray);
  border-color: #ced4da;
}

.btn-outline-secondary:hover {
  color: var(--dlabel-primary);
  background-color: rgba(87, 0, 54, 0.05);
  border-color: var(--dlabel-primary);
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 0.5rem;
}

.password-strength .list-unstyled li {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.password-strength .fa-check {
  color: var(--dlabel-success);
}

.password-strength .fa-times {
  color: var(--dlabel-danger);
}

/* Profile Form Sections */
.profile-section .card {
  box-shadow: 0 0.125rem 0.25rem rgba(87, 0, 54, 0.075);
  border: 1px solid rgba(87, 0, 54, 0.1);
}

.profile-section .card-header {
  background: linear-gradient(135deg, rgba(87, 0, 54, 0.05) 0%, rgba(87, 0, 54, 0.02) 100%);
  border-bottom: 1px solid rgba(87, 0, 54, 0.1);
}

/* Profile Action Buttons */
.btn-toolbar .btn-group .btn {
  margin-right: 0.5rem;
}

.btn-toolbar .btn-group .btn:last-child {
  margin-right: 0;
}

/* Responsive Profile Layout */
@media (max-width: 767px) {
  .profile-section .card-body {
    padding: 1rem;
  }
  
  .logo-gallery-old {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 1.5rem 1rem;
  }
  
  .btn-toolbar {
    flex-direction: column;
  }
  
  .btn-toolbar .btn-group {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .btn-toolbar .btn-group .btn {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
}

/* Password Requirements Card */
.card.bg-light {
  background-color: rgba(87, 0, 54, 0.02) !important;
  border: 1px solid rgba(87, 0, 54, 0.1);
}

.card.bg-light .card-title {
  color: var(--dlabel-primary);
  font-size: 1rem;
}

.card.bg-light .list-unstyled li {
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.card.bg-light .fa-check {
  color: var(--dlabel-success);
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 0.5rem;
}

.password-strength .progress {
  height: 0.25rem;
}

.password-strength-weak .progress-bar {
  background-color: #dc3545;
}

.password-strength-medium .progress-bar {
  background-color: #ffc107;
}

.password-strength-strong .progress-bar {
  background-color: #28a745;
}

/* Profile Action Buttons */
.btn-toolbar {
  gap: 0.5rem;
}

.btn-toolbar .btn-group {
  gap: 0.5rem;
}

/* Mobile Responsive Adjustments for Profile */
@media (max-width: 767px) {
  .profile-section .card-body {
    padding: 1rem;
  }
  
  .logo-gallery-old {
    grid-template-columns: 1fr;
  }
  
  .upload-area {
    padding: 1.5rem 1rem;
  }
  
  .upload-area .fa-cloud-upload-alt {
    font-size: 2rem !important;
  }
  
  .btn-toolbar {
    flex-direction: column;
  }
  
  
  
  .btn-toolbar .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .logo-actions {
    flex-direction: column;
  }
  
  .logo-actions .btn {
    width: 100%;
  }
}

/* Smooth Scrolling for Section Navigation */
html {
  scroll-behavior: smooth;
}

/* Section Highlighting */
.profile-section:target {
  animation: highlightSection 2s ease-in-out;
}

@keyframes highlightSection {
  0% {
    background-color: rgba(206, 193, 45, 0.1);
  }
  100% {
    background-color: transparent;
  }
}

/* Form Focus States */
.form-control:focus,
.form-select:focus {
  border-color: var(--dlabel-primary);
  box-shadow: 0 0 0 0.2rem rgba(87, 0, 54, 0.25);
}

/* Custom File Input Styling */
.form-control[type="file"] {
  padding: 0.375rem 0.75rem;
}

.form-control[type="file"]::-webkit-file-upload-button {
  background-color: var(--dlabel-secondary);
  border: none;
  color: var(--dlabel-primary);
  padding: 0.375rem 0.75rem;
  margin-right: 0.75rem;
  border-radius: 0.25rem;
  font-weight: 500;
}

.form-control[type="file"]::-webkit-file-upload-button:hover {
  background-color: var(--dlabel-secondary-dark);
}

/* Loading States for Profile Actions */
.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1rem;
  height: 1rem;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.btn-loading .btn-text {
  opacity: 0;
}

/* Success/Error Message Styling */
.alert-profile {
  border-radius: 0.5rem;
  border: none;
  font-weight: 500;
}

.alert-profile .fas {
  margin-right: 0.5rem;
}

/* Profile Completion Badge */
.badge.bg-primary {
  background-color: var(--dlabel-primary) !important;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
}

/* Tooltip Styling for Profile */
.tooltip-inner {
  background-color: var(--dlabel-primary);
  color: white;
  font-size: 0.875rem;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: var(--dlabel-primary);
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: var(--dlabel-primary);
}

.tooltip.bs-tooltip-start .tooltip-arrow::before {
  border-left-color: var(--dlabel-primary);
}

.tooltip.bs-tooltip-end .tooltip-arrow::before {
  border-right-color: var(--dlabel-primary);
}
/*
 ===== COMPANY INFORMATION FORMS ENHANCEMENT ===== */

/* Enhanced Required Field Indicators */
.form-label .text-danger {
  font-size: 1.1em;
  font-weight: 700;
  margin-left: 2px;
}

/* Form Section Headers with Icons */
.profile-section .card-header i {
  color: var(--dlabel-primary);
  margin-right: 0.5rem;
}

/* Enhanced Form Validation States */
.form-control.is-valid:focus,
.was-validated .form-control:valid:focus {
  border-color: var(--dlabel-success);
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control.is-invalid:focus,
.was-validated .form-control:invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Form Select Validation */
.form-select.is-valid {
  border-color: var(--dlabel-success);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.38 1.38L7.7 4.09 6.76 3.15 4.62 5.29z'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-position: right 0.75rem center, center right 2.25rem;
}

.form-select.is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4M7.2 4.6l-1.4 1.4'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-position: right 0.75rem center, center right 2.25rem;
}

/* Enhanced Invalid Feedback */
.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #dc3545;
  font-weight: 500;
}

.valid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--dlabel-success);
  font-weight: 500;
}

/* Form Field Groups */
.form-field-group {
  background-color: rgba(248, 249, 250, 0.5);
  border: 1px solid rgba(87, 0, 54, 0.1);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-field-group .form-label {
  font-weight: 600;
  color: var(--dlabel-primary);
}

/* Input Pattern Validation Hints */
.form-text.pattern-hint {
  font-size: 0.8rem;
  color: var(--dlabel-medium-gray);
  font-style: italic;
}

.form-text.pattern-hint::before {
  content: "💡 ";
  margin-right: 0.25rem;
}

/* Company Type Select Enhancement */
#business_type {
  background-color: white;
  transition: all 0.3s ease;
}

#business_type:focus {
  background-color: rgba(87, 0, 54, 0.02);
}

/* Address Fields Group */
.address-fields-group {
  background-color: rgba(87, 0, 54, 0.02);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
}

/* Contact Fields Group */
.contact-fields-group {
  background-color: rgba(206, 193, 45, 0.05);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
}

/* Form Completion Indicators */
.field-completion-indicator {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  pointer-events: none;
}

.field-completion-indicator.complete {
  color: var(--dlabel-success);
}

.field-completion-indicator.incomplete {
  color: var(--dlabel-warning);
}

/* Responsive Form Enhancements */
@media (max-width: 767px) {
  .profile-section .card-body {
    padding: 1rem;
  }
  
  .form-field-group {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .address-fields-group,
  .contact-fields-group {
    padding: 0.75rem;
  }
}

/* Form Animation Enhancements */
.form-control,
.form-select {
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0.25rem 0.5rem rgba(83, 83, 83, 0.1), 0 0 0 0.2rem rgba(49, 49, 49, 0.363);
}

/* Save Button Enhancement */
.btn-primary[onclick="saveProfile()"] {
  position: relative;
  overflow: hidden;
}

.btn-primary[onclick="saveProfile()"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary[onclick="saveProfile()"]:hover::before {
  left: 100%;
}
/* 
===== LOGO UPLOAD AND DRAG-AND-DROP STYLES ===== */

/* Logo Upload Area */
.logo-upload-area {
  border: 2px dashed #dee2e6;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
  position: relative;
  overflow: hidden;
}

.logo-upload-area:hover {
  border-color: var(--dlabel-primary);
  background-color: rgba(87, 0, 54, 0.05);
}

.logo-upload-area.dragover {
  border-color: var(--dlabel-primary);
  background-color: rgba(87, 0, 54, 0.1);
  transform: scale(1.02);
}

.logo-upload-area.uploading {
  border-color: var(--dlabel-secondary);
  background-color: rgba(206, 193, 45, 0.1);
  cursor: not-allowed;
}

.logo-upload-area .upload-content {
  position: relative;
  z-index: 2;
}

.logo-upload-area .upload-content i {
  display: block;
  margin-bottom: 1rem;
}

.logo-upload-area .upload-content p {
  margin-bottom: 0.5rem;
}

/* Upload Progress Bar */
.upload-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--dlabel-primary), var(--dlabel-secondary));
  width: 0%;
  transition: width 0.3s ease;
}

/* Upload Error */
.upload-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 0.375rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.upload-error.show {
  opacity: 1;
  transform: translateY(0);
}

/* Logo Gallery - DISABLED (using Bootstrap grid instead) */
.logo-gallery-old2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.logo-item {
  position: relative;
  border: 2px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  background-color: #fff;
}

.logo-item:hover {
  border-color: var(--dlabel-primary);
  box-shadow: 0 4px 8px rgba(87, 0, 54, 0.1);
}

.logo-item.primary {
  border-color: var(--dlabel-primary);
  background-color: rgba(87, 0, 54, 0.05);
}

.logo-item .logo-delete {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #dc3545;
  color: white;
  border: none;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.logo-item:hover .logo-delete {
  opacity: 1;
}

.logo-item .logo-delete:hover {
  background-color: #c82333;
}

.logo-thumbnail {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 0.375rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
}

.logo-thumbnail img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.logo-actions .btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.logo-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.logo-info small {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Current Logo Preview */
.current-logo-preview {
  width: 120px;
  height: 120px;
  border: 2px solid #dee2e6;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  margin-bottom: 1rem;
  overflow: hidden;
}

.current-logo-preview.has-logo {
  border-color: var(--dlabel-primary);
}

.current-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.current-logo-preview .logo-fallback {
  text-align: center;
  padding: 1rem;
}

/* Logo Preview Modal */
.logo-preview-modal .modal-body {
  text-align: center;
  padding: 2rem;
}

.logo-preview-modal .modal-body img {
  max-height: 400px;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.logo-preview-modal .logo-fallback {
  background-color: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* Responsive adjustments for logo gallery - DISABLED (using Bootstrap grid) */
@media (max-width: 575px) {

  html{
    font-size: 13px;
  }

  .logo-gallery-old2 {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
  }
  
  .logo-item {
    padding: 0.75rem;
  }
  
  .logo-thumbnail {
    /* width: 60px; */
    width: 100%;
    height: 60px;
  }
  
  .logo-actions .btn {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
  
  .current-logo-preview {
    width: 100px;
    height: 100px;
  }
}

/* File input hidden */
#logoUpload {
  display: none;
}

/* Loading animation for buttons */
.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading .fas.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toast container positioning */
.toast-container {
  z-index: 9999;
}

/* Enhanced drag and drop visual feedback */
.logo-upload-area.dragover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    rgba(87, 0, 54, 0.1) 25%, 
    transparent 25%, 
    transparent 50%, 
    rgba(87, 0, 54, 0.1) 50%, 
    rgba(87, 0, 54, 0.1) 75%, 
    transparent 75%, 
    transparent);
  background-size: 20px 20px;
  animation: move 0.5s linear infinite;
  z-index: 1;
}

@keyframes move {
  0% { background-position: 0 0; }
  100% { background-position: 20px 20px; }
}
/* =
==== FORM VALIDATION OVERRIDES ===== */

/* Hide invalid feedback by default - only show when field has is-invalid class */
.invalid-feedback {
  display: none !important;
}

.form-control.is-invalid ~ .invalid-feedback,
.form-select.is-invalid ~ .invalid-feedback {
  display: block !important;
}

/* Remove Bootstrap's automatic validation styling */
.was-validated .form-control:valid,
.was-validated .form-select:valid,
.form-control.is-valid,
.form-select.is-valid {
  border-color: #ced4da !important;
  padding-right: 0.75rem !important;
  background-image: none !important;
}

.was-validated .form-control:valid:focus,
.was-validated .form-select:valid:focus,
.form-control.is-valid:focus,
.form-select.is-valid:focus {
  border-color: var(--dlabel-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(87, 0, 54, 0.25) !important;
}

/* Fix invalid field styling */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #dc3545 !important;
  padding-right: 2.25rem !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right calc(0.375em + 0.1875rem) center !important;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) !important;
}

/* Override Bootstrap's was-validated automatic styling */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
  border-color: #ced4da !important;
  padding-right: 0.75rem !important;
  background-image: none !important;
}

/* Only show invalid styling when explicitly marked with is-invalid class */
.form-control:not(.is-invalid),
.form-select:not(.is-invalid) {
  border-color: #ced4da !important;
  padding-right: 0.75rem !important;
  /* background-image: none !important; */
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Remove valid feedback display */
.valid-feedback {
  display: none !important;
}

/* Ensure invalid feedback styling */
.invalid-feedback {
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #dc3545;
}
/* ==
=== TEXT LOGO CREATION STYLES ===== */

/* Text Logo Creator Container */
.text-logo-creator {
  padding: 1rem;
  background-color: rgba(87, 0, 54, 0.02);
  border-radius: 0.5rem;
  border: 1px solid rgba(87, 0, 54, 0.1);
}

/* Text Logo Input Styling */
.text-logo-creator .form-control {
  font-family: 'Times New Roman', serif;
  font-size: 1.1rem;
  font-weight: 500;
  border: 2px solid #dee2e6;
  transition: all 0.3s ease;
}

.text-logo-creator .form-control:focus {
  border-color: var(--dlabel-primary);
  box-shadow: 0 0 0 0.2rem rgba(87, 0, 54, 0.15);
  font-weight: bold;
}

/* Character Counter */
.text-logo-creator .form-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

#textLogoCounter {
  font-weight: 600;
  color: var(--dlabel-primary);
}

#textLogoCounter.warning {
  color: var(--dlabel-warning);
}

#textLogoCounter.danger {
  color: var(--dlabel-danger);
}

/* Text Logo Preview Container */
.text-logo-preview-container {
  position: relative;
}

.text-logo-preview {
  min-height: 120px;
  border: 2px dashed #dee2e6;
  border-radius: 0.5rem;
  background-color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.text-logo-preview.has-content {
  border-color: var(--dlabel-primary);
  border-style: solid;
  background-color: rgba(87, 0, 54, 0.02);
}

/* Canvas Styling */
#textLogoCanvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 0.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: white;
}

/* Text Logo Placeholder */
.text-logo-placeholder {
  text-align: center;
  color: var(--dlabel-medium-gray);
  padding: 2rem;
}

.text-logo-placeholder.hidden {
  display: none;
}

/* Create Button Styling */
#createTextLogoBtn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
}

#createTextLogoBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#createTextLogoBtn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(87, 0, 54, 0.2);
}

/* Tab Navigation Styling */
#logoCreationTabs .nav-link {
  color: var(--dlabel-medium-gray);
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  transition: all 0.3s ease;
}

#logoCreationTabs .nav-link:hover {
  color: var(--dlabel-primary);
  border-bottom-color: var(--dlabel-secondary);
}

#logoCreationTabs .nav-link.active {
  color: var(--dlabel-primary);
  background-color: rgba(87, 0, 54, 0.05);
  border-color: var(--dlabel-primary);
  border-bottom-color: var(--dlabel-primary);
  font-weight: 600;
}

/* Tab Content Styling */
.tab-content {
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  padding: 1.5rem;
  background-color: white;
}

/* Text Logo in Gallery */
.logo-item .text-logo-thumbnail {
  font-family: 'Times New Roman', serif;
  font-weight: bold;
  color: var(--dlabel-primary);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  line-height: 1.2;
  word-break: break-word;
  hyphens: auto;
  font-size: 0.9rem;
}

/* Responsive Text Logo Sizing */
@media (max-width: 575px) {
  .text-logo-creator {
    padding: 0.75rem;
  }
  
  .text-logo-preview {
    min-height: 100px;
  }
  
  #textLogoCanvas {
    max-width: 100%;
    height: auto;
  }
  
  .logo-item .text-logo-thumbnail {
    font-size: 0.8rem;
  }
}

/* Animation for text logo creation */
.text-logo-creating {
  position: relative;
  overflow: hidden;
}

.text-logo-creating::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(87, 0, 54, 0.1), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Text Logo Validation States */
.text-logo-input-valid {
  border-color: var(--dlabel-success) !important;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15) !important;
}

.text-logo-input-invalid {
  border-color: var(--dlabel-danger) !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15) !important;
}

/* Success state for text logo creation */
.text-logo-success {
  border-color: var(--dlabel-success);
  background-color: rgba(40, 167, 69, 0.05);
}

.text-logo-success::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  color: var(--dlabel-success);
  font-weight: bold;
  font-size: 1.2rem;
}


/* ===== NUOVA ETICHETTA — FORM PAGE ===== */

/* Mini Editor (contenteditable) */
.mini-editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 4px 6px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 0.375rem 0.375rem 0 0;
}
.mini-editor-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    padding: 0;
    line-height: 1;
}
.mini-editor-btn:hover {
    background: #e9ecef;
}
.mini-editor-btn.active {
    background: #570036;
    color: #fff;
    border-color: #570036;
}
.mini-editor {
    min-height: 60px;
    max-height: 120px;
    overflow-y: auto;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 0 0 0.375rem 0.375rem;
    font-size: 0.95rem;
    line-height: 1.5;
    outline: none;
    background: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.mini-editor:focus {
    border-color: #570036;
    box-shadow: 0 0 0 0.2rem rgba(87, 0, 54, 0.15);
}
.mini-editor:empty::before {
    content: attr(data-placeholder);
    color: #adb5bd;
    pointer-events: none;
}

/* Anteprima sticky sidebar */
.anteprima-sticky {
    position: sticky;
    top: 160px;
}

/* Smartphone container for iframe preview */
.smartphone-container {
    width: 100%;
    max-width: 375px;
    margin: 0 auto;
    aspect-ratio: 9 / 16;
    border: 3px solid #333;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
}

.smartphone-iframe {
    width: 100%;
    height: 100%;
    border: none;
    overflow-y: auto;
}

/* Ingredienti sortable panel */
#ingredientiSortable .categoria-group {
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

#ingredientiSortable .categoria-group-header {
    background: #f8f9fa;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--dlabel-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

#ingredientiSortable .categoria-group-header .drag-handle {
    color: #adb5bd;
    cursor: grab;
}

#ingredientiSortable .ingrediente-item,
#ingredientiCustomPool .ingrediente-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    gap: 8px;
    font-size: 0.88rem;
}

#ingredientiSortable .ingrediente-item:hover,
#ingredientiCustomPool .ingrediente-item:hover {
    background: #f8f9fa;
}

#ingredientiSortable .ingrediente-item .drag-handle,
#ingredientiCustomPool .ingrediente-item .drag-handle {
    color: #ccc;
    cursor: grab;
}

#ingredientiSortable .ingrediente-item .btn-remove-ingrediente,
#ingredientiCustomPool .ingrediente-item .btn-remove-ingrediente {
    margin-left: auto;
    color: #dc3545;
    cursor: pointer;
    opacity: 0.6;
    border: none;
    background: none;
    padding: 2px 6px;
}

#ingredientiSortable .ingrediente-item .btn-remove-ingrediente:hover,
#ingredientiCustomPool .ingrediente-item .btn-remove-ingrediente:hover {
    opacity: 1;
}

#ingredientiSortable .ingrediente-item .allergene-badge,
#ingredientiCustomPool .ingrediente-item .allergene-badge {
    font-size: 0.7rem;
    background: #fff3cd;
    color: #856404;
    padding: 1px 6px;
    border-radius: 4px;
}

/* Badge Biologico (fogliolina verde) */
#ingredientiSortable .ingrediente-item .bio-badge,
#ingredientiCustomPool .ingrediente-item .bio-badge {
    font-size: 0.7rem;
    background: #d4edda;
    color: #1e7e34;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Selettore modalità (nome/codice/entrambi) per ingrediente in etichetta */
#ingredientiSortable .ingrediente-item .ingrediente-modalita-select,
#ingredientiCustomPool .ingrediente-item .ingrediente-modalita-select {
    width: auto;
    min-width: 90px;
    max-width: 110px;
    font-size: 0.75rem;
    padding: 2px 22px 2px 6px;
    height: auto;
    line-height: 1.3;
    margin-left: auto;
}

#ingredientiSortable .ingrediente-item .ingrediente-modalita-select + .btn-remove-ingrediente,
#ingredientiCustomPool .ingrediente-item .ingrediente-modalita-select + .btn-remove-ingrediente {
    margin-left: 4px;
}

/* Tag Bio e codice nella modal catalogo ingredienti */
#listaIngredientiModal .bio-tag {
    font-size: 0.72rem;
    background: #d4edda;
    color: #1e7e34;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    white-space: nowrap;
}

#listaIngredientiModal .ing-codice-tag {
    font-size: 0.78rem;
    background: #f0f0f0;
    color: #444;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
}

/* Riciclaggio checkboxes */
.riciclaggio-check {
    padding: 8px 12px 8px 2rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: background 0.15s;
}

.riciclaggio-check:hover {
    background: #f8f9fa;
}

/* Consumo responsabile badges */
.consumo-check {
    padding: 10px 12px 10px 2rem;
}

.consumo-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    font-size: 0.75rem;
    margin-right: 6px;
    vertical-align: middle;
}

.consumo-icon-badge.t1 { background: #dc3545; }
.consumo-icon-badge.t2 { background: #fd7e14; }
.consumo-icon-badge.t3 { background: #6f42c1; }

.consumo-icon-img {
    width: 32px;
    height: 32px;
    margin-right: 6px;
    vertical-align: middle;
    object-fit: contain;
}

/* Modal ingredienti */
#listaIngredientiModal .categoria-section {
    margin-bottom: 16px;
}

#listaIngredientiModal .categoria-section h6 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dlabel-primary);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--dlabel-primary);
}

#listaIngredientiModal .ingrediente-checkbox-item {
  padding: 0;
}

#listaIngredientiModal .ingrediente-checkbox-item .form-check-input{
  margin-left: 0;
  margin-right: 10px;
  margin-top: 9px;
}

#listaIngredientiModal .ingrediente-checkbox-item label{
  padding-top: 5px;
  padding-bottom: 5px;
  display: block;
  cursor: pointer;
}

#listaIngredientiModal .ingrediente-checkbox-item label:hover{
  background-color: #00000005;
}

#listaIngredientiModal .ingrediente-checkbox-item .allergene-tag {
    font-size: 0.7rem;
    background: #fff3cd;
    color: #856404;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
}

#listaIngredientiModal .ingrediente-checkbox-item.d-none-search {
    display: none;
}

/* SortableJS ghost/drag feedback */
.sortable-ghost {
    opacity: 0.4;
    background: #e8f4fd !important;
}

#ingredientiSortable .categoria-group-header .drag-handle:active {
    cursor: grabbing;
}

#ingredientiSortable .ingrediente-item .drag-handle:active,
#ingredientiCustomPool .ingrediente-item .drag-handle:active {
    cursor: grabbing;
}

/* ── Archivio Etichette ─────────────────────────────────────── */
.archivio-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.archivio-thumb-placeholder {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 1.2rem;
}
#qrCodeContainer canvas {
    border-radius: 8px;
}


/* ===== GESTIONE ETICHETTE — ADDITIONAL STYLES ===== */

/* ── Form Etichetta: card macrosezioni ── */
#formEtichetta > .card {
    border: 1px solid rgba(87, 0, 54, 0.12);
    border-radius: 0.625rem;
    transition: box-shadow 0.2s ease;
}

#formEtichetta > .card:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(87, 0, 54, 0.08);
}

#formEtichetta > .card > .card-header {
    background: linear-gradient(135deg, rgba(87, 0, 54, 0.06) 0%, rgba(87, 0, 54, 0.02) 100%);
    border-bottom: 2px solid var(--dlabel-secondary);
}

#formEtichetta > .card > .card-header h5 {
    color: var(--dlabel-primary);
    font-size: 1rem;
}

/* ── Smartphone preview: notch decoration ── */
.smartphone-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 20px;
    background: #333;
    border-radius: 0 0 14px 14px;
    z-index: 2;
}

/* ── Smartphone preview: responsive ── */
@media (max-width: 991.98px) {
    .anteprima-sticky {
        position: static;
        margin-bottom: 1.5rem;
    }
    .smartphone-container {
        max-width: 300px;
        aspect-ratio: 9 / 14;
    }
}

@media (max-width: 575px) {
    .smartphone-container {
        max-width: 300px;
    }
}

/* ── Bottone sticky anteprima mobile (< 1200px) ── */
.btn-anteprima-mobile {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1040;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 50px;
    background: var(--dlabel-primary, #570036);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(87, 0, 54, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-anteprima-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(87, 0, 54, 0.45);
}

.btn-anteprima-mobile:active {
    transform: translateY(0);
}

.btn-anteprima-mobile-icon {
    position: relative;
    font-size: 1.2rem;
    line-height: 1;
}

.btn-anteprima-status {
    position: absolute;
    top: -5px;
    right: -7px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    border: 2px solid var(--dlabel-primary, #570036);
    transition: background 0.2s ease;
}

.btn-anteprima-status.is-loading {
    background: #fd7e14;
}

.btn-anteprima-status.is-ready {
    background: #28a745;
}

.btn-anteprima-status i {
    font-size: 8px;
    color: #fff;
    line-height: 1;
}

.btn-anteprima-status .fa-spinner {
    color: #fff;
}

.btn-anteprima-status .fa-check {
    color: #fff;
}

/* ── Modal anteprima mobile ── */
.modal-anteprima-mobile {
    max-width: 420px;
    margin: 0.5rem auto;
}

.modal-anteprima-mobile .modal-body {
    background: #f0f0f0;
    padding: 16px 0;
    min-height: 60vh;
}

.smartphone-container-modal {
    max-width: 340px;
    aspect-ratio: 9 / 16;
    margin: 0 auto;
}

@media (max-width: 575px) {
    .modal-anteprima-mobile {
        max-width: calc(100% - 1rem);
        margin: 0.5rem;
    }

    .smartphone-container-modal {
        max-width: 280px;
    }

    .btn-anteprima-mobile {
        bottom: 16px;
        right: 16px;
        padding: 8px 14px;
        font-size: 0.82rem;
    }
}

/* ── Ingredienti sortable: drag placeholder ── */
.sortable-drag {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.sortable-chosen {
    background: rgba(87, 0, 54, 0.04) !important;
}

#ingredientiSortable .categoria-ingredienti-list {
    min-height: 4px;
}

/* ── Ingredienti inline preview ── */
#ingredientiInlinePreview {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--dlabel-secondary);
    line-height: 1.6;
}

/* ── Riciclaggio: enhanced checkbox items ── */
.riciclaggio-check .form-check-label {
    display: block;
    cursor: pointer;
    align-items: flex-start;
    gap: 4px;
    line-height: 1.4;
}

.riciclaggio-check .form-check-label i {
    font-size: 1.1rem;
    margin-top: 1px;
    flex-shrink: 0;
}

.riciclaggio-check .form-check-label small {
    font-size: 0.78rem;
    color: var(--dlabel-medium-gray);
}

/* ── Consumo responsabile: enhanced layout ── */
.consumo-check .form-check-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

/* ── Archivio Etichette: DataTable action buttons ── */
#tabellaEtichette .btn-group-sm .btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 0.25rem;
    margin-right: 4px;
}

#tabellaEtichette .btn-group-sm .btn + .btn {
    margin-left: -1px;
}

#tabellaEtichette td {
    vertical-align: middle;
}

/* ── QR Code Modal ── */
#qrCodeModal .modal-body {
    padding: 1.5rem;
}

#qrCodeContainer {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrCodeContainer canvas,
#qrCodeContainer img {
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#qrUrlInput {
    font-size: 0.85rem;
    background: #f8f9fa;
}

/* ── Scheda Tecnica Pubblica: responsive enhancements ── */
@media (max-width: 480px) {
    .scheda-container {
        padding: 12px 10px;
    }
    .scheda-nome-vino {
        font-size: 1rem;
    }
    .scheda-info-table td {
        padding: 5px 6px;
        font-size: 0.82rem;
    }
    .nutri-table th,
    .nutri-table td {
        padding: 4px 6px;
        font-size: 0.8rem;
    }
    .consumo-icon {
        width: 44px;
        height: 44px;
    }
}

@media print {
    .scheda-container {
        max-width: 100%;
        padding: 0;
    }
}

/* ── Gestione Ingredienti Admin: table badges ── */
#tabellaIngredienti .badge-allergene {
    background: #fff3cd;
    color: #856404;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
}

#tabellaCategorie .btn-group-sm .btn,
#tabellaIngredienti .btn-group-sm .btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
}

/* ── Modal ingredienti: search highlight ── */
#ricercaIngredienti {
    border-radius: 0.5rem;
}

#modalIngredienti .modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}


/* ===== IMAGE CROPPER MODAL ===== */
#modalImageCropper .modal-body {
    background: #1a1a1a;
}

.cropper-workspace {
    max-height: 60vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cropper-workspace img {
    display: block;
    max-width: 100%;
    max-height: 60vh;
}

.cropper-toolbar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #2a2a2a;
    border-top: 1px solid #444;
}

.cropper-toolbar .btn {
    color: #fff;
    border-color: #666;
    min-width: 38px;
}

.cropper-toolbar .btn:hover {
    background: #555;
    border-color: #888;
    color: #fff;
}

/* Mobile: toolbar più compatta */
@media (max-width: 576px) {
    .cropper-workspace {
        max-height: 50vh;
    }
    .cropper-toolbar {
        gap: 4px;
        padding: 8px 10px;
    }
    .cropper-toolbar .btn {
        min-width: 34px;
        padding: 0.25rem 0.4rem;
    }
}


/* ===== RICICLAGGIO ICON SQUARES ===== */
.riciclaggio-icon-square {
    display: flex;
    width: 100%;
    height: 60px;
    border-radius: 6px;
    margin-bottom: 6px;
    align-items: center;
    justify-content: center;
}

.riciclaggio-icon-square img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
}

/* Label layout: icona sopra, testo sotto */
.riciclaggio-check .form-check-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* ===== RICICLAGGIO CUSTOM ITEMS ===== */
.riciclaggio-custom-wrapper {
    display: flex;
    gap: 12px;
}

.riciclaggio-custom-item {
    flex: 1;
    background: #f8f9fa;
    border: 1px dashed #ced4da;
    border-radius: 8px;
    padding: 10px 12px;
}

.riciclaggio-custom-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 6px;
}


/* ─── Info box (note sotto titoli Ingredienti / Smaltimento) ─────────── */
.info-box-ingredienti {
    position: relative;
    background: #fafbfc;
    border-left: 3px solid #cec12d;
    border-radius: 4px;
    padding: 10px 14px 10px 40px;
    font-size: 0.78rem;
    color: #5a5a5a;
    line-height: 1.45;
}
.info-box-ingredienti .info-box-icon {
    position: absolute;
    top: 12px;
    left: 14px;
    color: #cec12d;
    font-size: 0.95rem;
}
.info-box-ingredienti .info-box-list {
    margin: 0;
    padding-left: 16px;
    list-style: disc;
}
.info-box-ingredienti .info-box-list li {
    margin-bottom: 2px;
}
.info-box-ingredienti .info-box-list li:last-child {
    margin-bottom: 0;
}
.info-box-ingredienti strong {
    color: #333;
    font-weight: 600;
}
.info-box-ingredienti em {
    color: #570036;
    font-style: normal;
    font-weight: 500;
}

/* ─── Ingrediente personalizzato (input inline draggabile) ───────────── */
#ingredientiSortable .ingrediente-item.ingrediente-custom,
#ingredientiCustomPool .ingrediente-item.ingrediente-custom {
    background: #fffbea;
}
#ingredientiSortable .ingrediente-item.ingrediente-custom .ingrediente-custom-input,
#ingredientiCustomPool .ingrediente-item.ingrediente-custom .ingrediente-custom-input {
    flex: 1;
    border: 1px dashed #cec12d;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.85rem;
    background: #fff;
    min-width: 0;
}
#ingredientiSortable .ingrediente-item.ingrediente-custom .ingrediente-custom-input:focus,
#ingredientiCustomPool .ingrediente-item.ingrediente-custom .ingrediente-custom-input:focus {
    outline: none;
    border-color: #570036;
    border-style: solid;
    box-shadow: 0 0 0 2px rgba(87, 0, 54, 0.1);
}
#ingredientiSortable .ingrediente-item.ingrediente-custom .custom-badge,
#ingredientiCustomPool .ingrediente-item.ingrediente-custom .custom-badge {
    font-size: 0.65rem;
    background: #cec12d;
    color: #fff;
    padding: 1px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    white-space: nowrap;
}


/* ─── Pool ingredienti personalizzati (staccati dai gruppi categoria) ── */
#ingredientiCustomPoolWrapper {
    margin-top: 14px;
    border-top: 2px dashed #e0e0e0;
    padding-top: 12px;
}
.custom-pool-header {
    font-size: 0.82rem;
    font-weight: 600;
    color: #570036;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}
.custom-pool-header small {
    font-size: 0.72rem;
    color: #8a8a8a;
}
.ingredienti-custom-pool {
    background: #fdfbf3;
    border: 1px dashed #cec12d;
    border-radius: 6px;
    padding: 6px;
    min-height: 46px;
}
.ingredienti-custom-pool:empty::before {
    content: "Trascina qui gli ingredienti personalizzati per staccarli da una categoria";
    color: #b0a968;
    font-style: italic;
    font-size: 0.78rem;
    display: block;
    padding: 8px;
    text-align: center;
}
.ingredienti-custom-pool .ingrediente-item {
    margin-bottom: 4px;
    border-radius: 4px;
    border-top: 1px solid #f0e8b8;
}
.ingredienti-custom-pool .ingrediente-item:last-child {
    margin-bottom: 0;
}


/* ─── Codice etichetta (visualizzato in modifica, non modificabile) ────── */
.codice-etichetta-display {
    background: #f1f3f5;
    color: #6c757d;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    border-left: 0;
    cursor: default;
    user-select: all;
}
.codice-etichetta-display i {
    color: #adb5bd;
}

/* ─── Bottone ⓘ info popover (titoli sezioni nuova-etichetta) ─────────── */
.card-header-with-info {
    position: relative;
    padding-right: 2.6rem; /* spazio per il bottone assoluto */
}

.btn-info-popover {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border: 2px solid var(--dlabel-secondary);
    background: var(--dlabel-secondary);
    color: var(--dlabel-primary);
    font-size: 0.9rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    line-height: 1;
    z-index: 2;
}
.btn-info-popover:hover,
.btn-info-popover:focus {
    background: #fff;
    color: var(--dlabel-primary);
    border-color: var(--dlabel-secondary);
    box-shadow: 0 0 0 3px rgba(206, 193, 45, 0.35);
    transform: translateY(-50%) scale(1.12);
    outline: none;
}

/* Popover personalizzato per info sezioni */
.popover-info-sezione {
    max-width: 340px;
    font-size: 0.82rem;
    line-height: 1.5;
    border-color: rgba(87, 0, 54, 0.25);
    box-shadow: 0 4px 16px rgba(87, 0, 54, 0.12);
}
.popover-info-sezione .popover-header {
    display: none;
}
.popover-info-sezione .popover-body {
    padding: 0.65rem 0.85rem;
    color: #333;
}
.popover-info-sezione .popover-body ul {
    font-size: 0.82rem;
}
.popover-info-sezione .popover-body li + li {
    margin-top: 0.3rem;
}
.popover-info-sezione .popover-arrow::before {
    border-right-color: rgba(87, 0, 54, 0.25);
}

@media (max-width: 575.98px) {
    .popover-info-sezione {
        max-width: calc(100vw - 2rem);
    }
}

/* ─── QR Code skeleton loader ────────────────────────────────── */
#qrCodeContainer {
    min-height: 260px;
    position: relative;
}
#qrCodeContainer.qr-loading {
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}
#qrCodeContainer.qr-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.6) 40%,
        rgba(255,255,255,0.8) 50%,
        rgba(255,255,255,0.6) 60%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: qr-shimmer 1.4s ease-in-out infinite;
}
@keyframes qr-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
#qrCodeImg {
    display: block;
    transition: opacity 0.2s ease;
}
/* ===== Banner impersonation super admin =====
   Il banner sta nel flusso subito sotto l'header. Quando è presente
   (body.has-impersonation-banner) la sidebar fixed e le colonne allineate
   vengono spinte in basso della sua altezza, così non lo coprono. */
.impersonation-banner {
    min-height: 46px;
}
body.has-impersonation-banner .sidebar {
    top: calc(76px + 46px);
    height: calc(100vh - 76px - 46px);
}
body.has-impersonation-banner .sidebar-toggle {
    top: calc(85px + 46px);
}
@media (max-width: 1199.98px) {
    body.has-impersonation-banner .sidebar-toggle {
        top: calc(19px + 46px);
    }
}

#qrCodeImg.qr-img-hidden {
    opacity: 0;
    width: 260px;
    height: 260px;
}
