/* @font-face {
  font-family: 'Inter';
  src: url(../fonts/Inter/Inter-VariableFont_opsz,wght.ttf) format('truetype');
  font-weight: 100 900;
  font-style: normal;
} */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');

:root {
  --primary: #0a66c2;
  --primary-light: #fecdd3;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --text-dark: #111827;
  --text-medium: #374151;
  --text-light: #6b7280;
  --header-height: 80px;
  --transition: 0.3s ease;
}

:root.dark {
  --primary: #0a66c2;
  --primary-light: #fecdd3;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --text-dark: #111827;
  --text-medium: #374151;
  --text-light: #6b7280;
  --header-height: 80px;
  --transition: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-family: "Outfit", sans-serif;
}

body {
  background: var(--bg-light);
  min-height: 100vh;
  color: var(--text-dark);
}

.data-placeholder {
  background: #f3f4f6;
  border-radius: 0.5rem;
  block-size: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

.snackbar {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 320px;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08), 0 3px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.snackbar.show {
  opacity: 1;
  transform: translateX(0);
}

.snackbar.hide {
  opacity: 0;
  transform: translateX(100%);
}

.snackbar-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background-position: center;
  background-repeat: no-repeat;
}

.snackbar-content {
  flex-grow: 1;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
}

.snackbar-close {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.error-snackbar {
  background-color: #fef0f0;
  border-left: 4px solid #e53935;
  color: #8a1c1c;
}

.error-snackbar .snackbar-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3Cpath fill='%23e53935' d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-7v2h2v-2h-2zm0-8v6h2V7h-2z'/%3E%3C/svg%3E");
}

.error-snackbar .snackbar-close {
  color: #e53935;
}

.error-snackbar .snackbar-close:hover {
  color: #8a1c1c;
}

.success-snackbar {
  background-color: #f0f8f1;
  border-left: 4px solid #43a047;
  color: #2a632c;
}

.success-snackbar .snackbar-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3Cpath fill='%2343a047' d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-.997-6l7.07-7.071-1.414-1.414-5.656 5.657-2.829-2.829-1.414 1.414L11.003 16z'/%3E%3C/svg%3E");
}

.success-snackbar .snackbar-close {
  color: #43a047;
}

.success-snackbar .snackbar-close:hover {
  color: #2a632c;
}

@keyframes snackbar-slide-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes snackbar-slide-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.snackbar.show {
  animation: snackbar-slide-in 0.3s ease forwards;
}

.snackbar.hide {
  animation: snackbar-slide-out 0.3s ease forwards;
}

.confirmation-dialog {
  position: fixed;
  z-index: 1000;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirmation-dialog-backdrop {
  position: absolute;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background: rgba(0,0,0,0.35);
}

.confirmation-dialog-content {
  position: relative;
  background: #fff;
  border-radius: 10px;
  padding: 2rem 2.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 1;
  width: 20vw;
  text-align: center;
}

@media (max-width: 600px) {
  .confirmation-dialog-content {
    padding: 1.2rem 0.5rem;
    min-width: 0;
    max-width: 90vw;
  }
}

.confirmation-dialog-content h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.confirmation-dialog-content p {
  margin-bottom: 2rem;
  color: #444;
}

.confirmation-dialog-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.confirmation-dialog-actions .btn {
  min-width: 80px;
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.confirmation-dialog-actions .btn-danger {
  background: #e74c3c;
  color: #fff;
}

.confirmation-dialog-actions .btn-danger:hover {
  background: #c0392b;
}

.confirmation-dialog-actions .btn-secondary {
  background: #e0e0e0;
  color: #333;
}

.confirmation-dialog-actions .btn-secondary:hover {
  background: #bdbdbd;
}

.main-content-wrapper {
  min-height: 100vh;
  background-color: #fff;
}

.main-content-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 1;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 100;
}

.main-content-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.main-content-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.main-content-modal-content {
  position: relative;
  width: 100%;
  max-width: 76%;
  min-height: 100vh;
  background: var(--bg-white);
  border-radius: 0;
  overflow-y: scroll;
  transform: scale(0.95);
  opacity: 0;
  transition: all var(--transition);
  height: 100%;
}

.main-content-modal.active .main-content-modal-content {
  transform: scale(1);
  opacity: 1;
  width: 80vw;
}

.modal-container {
  padding: 20px;
  max-width: 100%;
  box-sizing: border-box;
  height: 100%;
}

.back-button {
  display: none;
  border: none;
  color: #0d6efd;
  background-color: transparent;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.back-icon {
  margin-right: 8px;
}


@media (max-width: 768px) {
  .main-content-modal {
    padding: 0;
  }
  .main-content-modal-content {
    max-width: 100%;
    width: 100%;
    border-radius: 0;
    height: 100vh; 
    overflow: scroll;
  }

  .main-content-modal.active .main-content-modal-content {
    width: 100%;
  }

  .modal-container .container-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  }
  
  .back-button {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: flex-start;
    cursor: pointer;
  }
}


.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-white);
  display: flex;
  align-items: center;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 50;
}

.header-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.home-link svg {
  block-size: 1.2rem;
  inline-size: 1.2rem;
  color: #b9b9b9;
}

.mis-link {
  color: #b9b9b9;
  font-weight: 500;
  text-decoration: none;
  margin-left: 0.25rem;
  transition: color 0.2s ease;
}

.separator {
  color: #999;
  margin: 0 0.25rem;
  user-select: none;
}

.page-title {
  color: #999;
  font-size: .965rem;
  font-weight: normal;
  display: inline;
}

.page-title:last-of-type {
  color: #666;
}

@media (max-width: 480px) {
  .breadcrumb {
      display: none;
  }
}

.header-right {
  display: flex;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-container {
  position: relative;
  width: 300px;
}

.search-input {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.25rem;
}

.notification-container {
  position: relative;
}

.notification-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  color: var(--text-medium);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  background: var(--bg-light);
}

.notification-btn:hover {
  background: var(--bg-light);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--success);
  color: white;
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  font-weight: 500;
}

.profile-container {
  margin-left: 1rem;
  border-radius: 9999px;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-btn:hover {
  background: var(--bg-light);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-medium);
}

.profile-info {
  display: none;
}

@media (min-width: 768px) {
  .profile-info {
    display: block;
    text-align: left;
  }
}

.profile-email {
  font-size: 12px;
  color: #6b7280;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 4px;
  width: 224px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  display: none;
  z-index: 50;
  padding-block-start: .4rem;
}

.dropdown-menu.active {
  display: block;
}

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.dropdown-header .profile-name {
  margin-block-start: 0;
  text-align: left;
}

.dropdown-items {
  padding: 8px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: #374151;
  text-decoration: none;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: #f3f4f6;
}

.dropdown-item.danger {
  color: #dc2626;
}

.dropdown-divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 8px 0;
}

/* Batch Upload Styles */
.batch-upload-section {
  margin-bottom: 1rem;
}

.upload-card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.upload-header {
  margin-bottom: 0.75rem;
}

.upload-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.upload-header p {
  color: var(--text-light);
  font-size: 0.875rem;
  margin: 0;
}

.upload-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f9fafb;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-upload-area:hover {
  border-color: var(--primary);
  background: #f0f9ff;
}

.file-upload-area.drag-over {
  border-color: var(--primary);
  background: #dbeafe;
}

.upload-icon {
  margin-bottom: 0.5rem;
  color: #6b7280;
}

.upload-icon svg {
  width: 32px;
  height: 32px;
}

.upload-text h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.upload-text p {
  color: var(--text-light);
  margin-bottom: 0.125rem;
  font-size: 0.875rem;
}

.upload-text small {
  color: #9ca3af;
  font-size: 0.75rem;
}

.upload-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.upload-actions .action-btn {
  flex: 1;
  min-width: 160px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Compact version for when file is selected */
.file-upload-area.compact {
  padding: 0.5rem;
  min-height: 60px;
}

.file-upload-area.compact .upload-icon {
  margin-bottom: 0.25rem;
}

.file-upload-area.compact .upload-icon svg {
  width: 24px;
  height: 24px;
}

.file-upload-area.compact .upload-text h4 {
  font-size: 0.875rem;
  margin-bottom: 0.125rem;
}

.file-upload-area.compact .upload-text p {
  font-size: 0.75rem;
  margin-bottom: 0;
}

.file-upload-area.compact .upload-text small {
  font-size: 0.625rem;
}

@media (max-width: 768px) {
  .upload-actions {
    flex-direction: column;
  }
  
  .upload-actions .action-btn {
    min-width: auto;
  }
  
  .upload-card {
    padding: 0.75rem;
  }
  
  .file-upload-area {
    padding: 0.75rem;
    min-height: 70px;
  }
}

@media (max-width: 1024px) {
  .search-container {
      display: none;
  }
  
  .profile-name.on-header {
      display: none;
  }
}

@media (max-width: 640px) {
  .header-content {
      padding: 0 1rem;
  }
  
  .system-name,
  .separator {
      display: none;
  }
}

.menu-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: var(--text-medium);
  cursor: pointer;
}

.menu-btn:active {
  background: var(--primary-light);
}

.sidebar {
  position: fixed;
  display: flex;
  flex-direction: column;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  width: 240px;
  /* background-color: #1a1a1a; */
  background-color: #fff;
  transition: transform var(--transition);
  z-index: 100;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
  }
}

@media (min-width: 1024px) {
  .main-content-wrapper {
    padding-left: 240px;
  }

  .sidebar {
    transform: none;
    box-shadow: none;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
  }
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(4px);
  z-index: 90;
}

@media (max-width: 1024px) {
  .overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
}


.sidebar-header {
  padding-inline-start: .6rem;
  padding-block-end: 1rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.sidebar-logo {
  inline-size: 140px; 
  block-size: 60px;
}

.sidebar-logo-auth {
  inline-size: 200px; 
  block-size: 80px;
}

.menu {
  list-style: none;
  padding: 0;
}
        
.menu-section {
  margin-bottom: 1.5rem;
}

.menu-section-header {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  color: #a0a0a0;
  margin-bottom: 0.75rem;
  margin-inline-start: 1.5rem;
  padding-left: 0.5rem;
}

.menu-item {
  margin: 0.25rem 0;
  border-radius: .8rem;
  cursor: pointer;
  background-color: inherit;
}

.menu-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.5rem;
  color: #666;
  text-decoration: none;
  /* font-weight: 500; */
  position: relative;
  font-size: 0.9375rem;
  overflow: hidden;
  cursor: pointer;
}

.menu-link:hover::before {
  transform: translateX(0);
}

.menu-link.active {
  color: #333;
}

.menu-link svg {
  width: 1.5rem;
  margin-right: 0.75rem;
  transition: all 0.3s ease;
}

.menu-link:hover i {
  transform: translateX(3px);
  color: #3b82f6;
}

.menu-link .chevron {
  margin-left: auto;
  transition: transform 0.3s ease;
  opacity: 0.7;
  font-size: 0.875rem;
  transform-origin: center center;
  transform: rotate(180deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  position: relative;
  top: 1px;
}

.menu-item.expanded .chevron {
  transform: rotate(0deg);
}

.submenu {
  display: none;
  list-style: none;
  /* background-color: #1d1d1d; */
  overflow: hidden;
}

.menu-item.expanded .submenu {
  display: block;
  animation: scaleIn 0.3s ease-out;
}

.submenu-link {
  display: block;
  padding: 0.765rem 1.5rem 0.765rem 3.75rem;
  color: #666;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.submenu-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  /* background: #252525; */
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: -1;
}

.submenu-link:hover {
  /* color: #ffffff; */
  padding-left: 4rem;
}

.submenu-link:hover::before {
  transform: translateX(0);
}

.submenu-link.active {
  /* color: #ffffff; */
  /* background-color: #1c1c1c; */
}

.sidebar-footer {
  /* border-top: 1px solid rgba(0,0,0,0.1); */
  padding: 1rem;
  font-size: 0.75rem;
  color: #6b7280;
  text-align: center;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 1rem 1.5rem;
  /* background-color: #141414; */
  /* border-top: 1px solid #2d2d2d; */
  animation: fadeIn 1s ease-out;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #666666;
  font-size: 0.75rem;
  transition: all 0.3s ease;
}

.version-badge {
  padding: 0.25rem 0.5rem;
  /* background-color: #252525; */
  border-radius: 0.25rem;
  font-weight: 500;
  color: #808080;
  transition: all 0.3s ease;
}

.sidebar-footer:hover .version-badge {
  background-color: #2563eb;
  color: #ffffff;
  transform: translateY(-1px);
}

.menu-link.active i {
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.action-buttons {
  display: flex;
  gap: 12px;
}

.report-actions {
  display: flex;
  gap: 12px;
}

.alert {
  background: var(--danger-light);
  border-left: 4px solid var(--danger);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.alert-title {
  color: var(--danger);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.alert-description {
  color: var(--text-medium);
  font-size: 0.875rem;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

.chart-card {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chart-placeholder {
  background: #f3f4f6;
  border-radius: 0.5rem;
  block-size: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

.table-container {
  overflow-x: auto;
}

.metrics-table {
  width: 100%;
  border-collapse: collapse;
}

.metrics-table th,
.metrics-table td {
  padding: 0.75rem 1rem;
  text-align: left;
}

.metrics-table th {
  background-color: #f9fafb;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #6b7280;
}

.metrics-table td {
  border-top: 1px solid #e5e7eb;
  font-size: 0.875rem;
}

.metrics-table tr:hover {
  background-color: #f9fafb;
}

.chart-title {
  font-size: 1.2rem;
  font-weight: 500;
  color: #1e293b;
  margin-block: 1rem 1.4rem;
}

.date-inputs {
  display: flex;
  gap: 0.5rem;
}

.date-input {
  flex: 1;
}

@media (min-width: 1024px) {
  .main-content-wrapper {
      padding-left: 240px;
  }

  .header {
      left: 240px;
  }

  .stats-grid {
      grid-template-columns: repeat(4, 1fr);
  }

  .actions-grid {
      grid-template-columns: repeat(4, 1fr);
  }

  .reports-grid {
      grid-template-columns: repeat(2, 1fr);
  }

  .menu-btn {
      display: none;
  }
}

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

  .actions-grid {
      grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .filters,
  .report-filters {
      flex-direction: column;
  }

  .filter-group {
      width: 100%;
      flex-direction: column;
      align-items: stretch;
      gap: 0.5rem;
  }

  select,
  .search-input {
      width: 100%;
      min-width: 0;
  }

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

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.main-content {
  padding: calc(var(--header-height) + .0rem) 0 0;
  margin: 0 auto;
  block-size: 100%;
}

.container {
  background: #f1f1f1;
  padding: 24px;
  min-block-size: calc(100vh - var(--header-height));
}

/* Media Query for Responsiveness */
@media (max-width: 768px) {
  .container {
    background: var(--bg-white);
    border-radius: 0;
    box-shadow: none;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: white;
  border-radius: 10px;
  border: 1px solid #f3f4f7;
  padding: 15px 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.stat-title {
  color: #666;
  font-size: 0.975rem;
  font-weight: 500;
}

.stat-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 500;
  color: #1c1c1d;
  margin-bottom: 4px;
}

.stat-change {
  font-size: 0.75rem;
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 4px;
}

.increase {
  color: #16a34a;
}

.warning {
  color: #ea580c;
}

.danger {
  color: #dc2626;
}

.success {
  color: #16a34a;
}

.bg-blue {
  background: #eff6ff;
  color: #2563eb;
}

.bg-green {
  background: #f0fdf4;
  color: #16a34a;
}

.bg-yellow {
  background: #fefce8;
  color: #ca8a04;
}

.bg-red {
  background: #fef2f2;
  color: #dc2626;
}

.bg-purple {
  background: #faf5ff;
  color: #7c3aed;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.filters {
  background: var(--bg-white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.filter-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-medium);
  white-space: nowrap;
}

.filter-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-medium);
}

select,
.search-input,
.filter-select,
.date-input {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-dark);
  background-color: var(--bg-white);
  transition: all 0.2s ease;
}

select {
  padding-right: 2rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  min-width: 160px;
}

.search-input {
  min-width: 240px;
}

.table-container {
  overflow-x: auto;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-pending {
  background-color: var(--warning-light);
  color: var(--warning);
}

.status-inactive {
  background-color: var(--danger-light);
  color: var(--danger);
}

.status-active {
  background-color: var(--success-light);
  color: var(--success);
}

.status-ready {
  background-color: var(--success-light);
  color: var(--success);
}

.status-completed {
  background-color: #f4f4f5;
  color: #3f3f46;
}

.status-in-stock {
  background-color: var(--success-light);
  color: var(--success);
}

.status-low-stock {
  background-color: var(--warning-light);
  color: var(--warning);
}

.status-critical {
  background-color: var(--danger-light);
  color: var(--danger);
}

.customer-type {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.type-regular {
  background-color: var(--bg-light);
  color: var(--text-medium);
}

.type-vip {
  background-color: var(--warning-light);
  color: var(--warning);
}

.type-wholesale {
  background-color: var(--success-light);
  color: var(--success);
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 100;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: var(--bg-white);
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  overflow: visible;
  transform: scale(0.95);
  opacity: 0;
  transition: all var(--transition);
}

.modal.active .modal-content {
  transform: scale(1);
  opacity: 1;
}

.modal-header,
.card-header {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title,
.card-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #ececec;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-medium);
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--bg-light);
}

.modal-close svg {
  width: 10px;
  height: 10px;
}

.modal-body,
.card-content {
  padding: 1.25rem;
}

.modal-footer {
  padding: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-body .permissions-container {
  background-color: white;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  padding: 25px;
  border: 1px solid #eee;
}

.modal-body .permission-category {
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.modal-body .category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
}

.modal-body .category-header h3 {
  font-size: 15px;
  font-weight: 500;
  color: #555;
}

.modal-body .chevron {
  transition: transform 0.3s ease;
}

.modal-body .chevron.down {
  transform: rotate(180deg);
}

.modal-body .category-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.modal-body .category-content.open {
  max-height: 500px;
}

.modal-body .permission-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  padding-left: 10px;
}

.modal-body .permission-item .checkbox {
  margin-right: 10px;
  color: #2563eb;
  display: flex;
  align-items: center;
}

.modal-body .permission-item span {
  color: #444;
  font-size: 13px;
}

.btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

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

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

.btn-secondary {
  background: var(--bg-light);
  color: var(--text-medium);
}

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

.btn-primary.disabled {
  background-color: #0d6dfdaf;
  cursor: not-allowed;
}

.action-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.465rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
}

.actions-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: .4rem;
}

.quick-actions {
  display: grid;
  gap: 1rem;
}

canvas {
  width: 100% !important;
  height: 500px !important;
}

/* Chart size controls */
.chart-container {
  height: 300px;
  max-height: 300px;
}

.chart-container canvas {
  height: 100% !important;
  max-height: 100% !important;
}

/* Smaller chart variant */
.chart-container.small {
  height: 300px;
  max-height: 300px;
}

/* Medium chart variant */
.chart-container.medium {
  height: 350px;
  max-height: 350px;
}

.alert {
  background: var(--danger-light);
  border-left: 4px solid var(--danger);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  margin-top: 1.25rem;
}

.alert-title {
  color: var(--danger);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.alert-description {
  color: var(--text-medium);
  font-size: 0.875rem;
}

.report-filters {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.reports-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(1, 1fr);
}

.report-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.report-header {
  padding: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
}

.report-body {
  padding: 1.25rem;
  min-height: 300px;
}

.report-chart {
  width: 100%;
  height: 300px;
}

@media (min-width: 1024px) {
  .main-content-wrapper {
      padding-left: 240px;
  }

  .header {
      left: 240px;
  }

  .stats-grid {
      grid-template-columns: repeat(6, 1fr);
  }

  .actions-grid {
      grid-template-columns: repeat(4, 1fr);
  }

  .reports-grid {
      grid-template-columns: repeat(2, 1fr);
  }

  .menu-btn {
      display: none;
  }
}

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

  .actions-grid {
      grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .filters,
  .report-filters {
      flex-direction: column;
      align-items: stretch;
  }

  .filter-group {
      width: 100%;
      flex-direction: column;
      gap: 0.5rem;
  }

  select,
  .search-input {
      width: 100%;
      min-width: 0;
  }

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

.customer-details-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.avatar-container-wrapper {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: .8rem;
  padding: .8rem;
  margin-block: .6rem;
  border-block-end: 1px solid #e9ecef;
}

.basic-info-wrapper {
  border-radius: 1rem;
  padding: .8rem;
  margin-block: .6rem;
}

.avatar-container {
  width: 80px;
  height: 80px;
  background: #f1f3f5;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-fullname {
  font-size: 18px;
  font-weight: 600;
  color: #444;
  text-transform: uppercase;
}

.avatar-username {
  font-size: 14px;
  font-weight: 500;
  color: #666;
  margin-block-start: .2rem;
}

.container-section {
  border-bottom: 1px solid #e9ecef;
  background: white;
  border-radius: 0.8rem;
  padding: 1rem;
}

.container-header-title {
  font-size: 1.4rem;
  margin-block-end: .4rem;
  font-weight: 600;
}

.container-header-subtitle {
  color: #868e96;
  font-size: 15px;
  margin-block-end: .6rem;
}

.container-section:first-child {
  margin-block-end: 2rem;
}

.container-section:nth-child(2) {
  border-start-start-radius: 9px;
  border-start-end-radius: 9px;
}

.container-section:last-child {
  border-end-start-radius: 9px;
  border-end-end-radius: 9px;
}

.info-title {
  margin: 0 0 1.5rem 0;
  font-size: 16px;
  font-weight: 600;
  color: #555;
}

.info-grid {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
}

.info-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.info-group label {
  color: #868e96;
  font-size: 15px;
}

.info-group p {
  margin: 0;
  color: #495057;
  font-size: 14px;
}

@media (max-width: 768px) {
  
  .action-buttons {
      justify-content: flex-end;
      margin-left: auto;
  }

  .status-badge {
      margin-left: auto;
  }
  .container {
      padding: 1rem;
  }

  .info-row {
      grid-template-columns: 1fr;
      gap: 1rem;
  }

  .profile-header {
      padding: 1.5rem;
  }

  .info-section {
      padding: 1.5rem;
  }

  .btn-primary {
      width: 100%;
      justify-content: center;
  }
}


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

.profile-card .profile-banner {
  height: 120px;
  background-color: #e0e0e0;
  position: relative;
}

.profile-card .profile-info {
  padding: 20px;
  position: relative;
}

.profile-card .profile-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #f5f7fa;
  border: 4px solid white;
  position: absolute;
  top: -40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  font-size: 30px;
}

.profile-card .profile-name {
  margin-left: 100px;
  margin-bottom: 10px;
}

.profile-card .profile-name h2 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 5px;
}

.profile-card .username {
  color: #64748b;
  font-size: 14px;
}

.key-indicators {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.indicator {
  flex: 1;
  background-color: #f8fafc;
  padding: 15px;
  border-radius: 8px;
}

.indicator-label {
  font-size: 14px;
  font-weight: normal;
  color: #64748b;
  margin-bottom: 5px;
}

.indicator-value {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
}

.indicator-value.positive {
  color: #10b981;
}

.sections-content {
  display: none;
}

.sections-content.active {
  display: block;
}

.section-content-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.section-content-wrapper > *:only-child {
  grid-column: span 3;
}


.section-card {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  border: 1px solid #f0f0f0;
}

.section-header {
  font-size: 16px;
  color: #1e293b;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header a {
  font-size: 14px;
  color: #3b82f6;
  text-decoration: none;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.info-group {
  margin-bottom: 10px;
}

.info-label {
  font-size: 12px;
  font-weight: normal;
  color: #64748b;
  margin-bottom: 3px;
}

.info-value {
  font-size: 14px;
  color: #1e293b;
  font-weight: 500;
}

.tabs {
  display: flex;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: pointer !important;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 10px 20px;
  color: #64748b;
  cursor: pointer !important;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

.tab.active {
  background-color: #fff;
  border-radius: 0.4rem;
}

.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.transaction {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  background-color: #f1f3f5;
  padding: .8rem 1.2rem;
  border-radius: .6rem;
}

.transaction:last-child {
  border-bottom: none;
}

.transaction-info {
  display: flex;
  flex-direction: column;
}

.transaction-title {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
}

.transaction-date {
  font-size: 13px;
  color: #959697;
  margin-block-start: .2rem;
  font-weight: normal;
}

.transaction-amount {
  font-weight: 600;
  font-size: 13px;
}

.transaction-amount.credit {
  color: #10b981;
}

.transaction-amount.debit {
  color: #ef4444;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.activity-item {
  display: flex;
  gap: 10px;
  background-color: #f1f3f5;
  padding: .8rem 1.2rem;
  border-radius: .6rem;
}

.activity-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #e0f2fe;
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.activity-details {
  flex: 1;
}

.activity-title {
  font-size: 14px;
  font-weight: normal;
  color: #1e293b;
  margin-bottom: 3px;
}

.activity-time {
  font-size: 12px;
  font-weight: normal;
  color: #64748b;
}

.chart-container {
  height: 200px;
  position: relative;
  padding-block-end: .8rem;
}

.chart {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 10px;
}

.chart-bar {
  width: 30px;
  background-color: #bfdbfe;
  border-radius: 4px 4px 0 0;
}

.chart-bar.highest {
  background-color: #3b82f6;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  margin-top: 10px;
}

.chart-label {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  width: 30px;
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

.status-active {
  background-color: #dcfce7;
  color: #059669;
}

@media (max-width: 1024px) {
  .section-content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;;
  }
}

@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .key-indicators {
    flex-direction: column;
    gap: 10px;
  }
  
  .profile-name {
    margin-left: 0;
    margin-top: 50px;
    text-align: center;
  }
  
  .profile-photo {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 576px) {
  .tabs {
    padding-bottom: 5px;
  }
  
  .tab {
    padding: 10px 15px;
    font-size: 13px;
  }
  
  .section-card {
    padding: 15px;
  }
  
  .chart-container {
    height: 150px;
  }
  
  .chart-bar {
    width: 20px;
  }
  
  .chart-label {
    width: 20px;
  }
  
  .transaction-title, .activity-title {
    font-size: 13px;
  }
  
  .transaction-date, .activity-time {
    font-size: 11px;
  }
  
  .activity-icon {
    width: 25px;
    height: 25px;
  }
}
/* Base Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardPop {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  70% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* Container and Card Styles */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
  background: transparent;
}

.auth-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid rgba(225, 29, 72, 0.1);
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  opacity: 0;
  animation: cardPop 0.5s cubic-bezier(0.26, 0.53, 0.74, 1.48) forwards;
  animation-delay: 0.3s;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 4px 6px -2px rgba(0, 0, 0, 0.03),
    0 0 30px rgba(225, 29, 72, 0.05);
}

/* Header and Footer Styles */
.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Form Styles */
.form-group-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.4rem;
}

.form-group-wrapper > .form-group:first-child {
  flex: 1;
}

.form-group {
  margin-bottom: 1rem;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: all 0.2s ease-in-out;
}

.form-control:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 91, 225, 0.1);
}

.form-trigger {
  width: 100%;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: all 0.2s ease-in-out;
}

.form-trigger svg {
  color: #666;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #4a6cf7;
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  background-color: white;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

/* Media Query for Responsiveness */
@media (max-width: 768px) {
  .form-row {
      flex-direction: column;
      gap: 0;
  }
}

.form-col {
  flex: 1;
}

/* Checkbox and Toggle Styles */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  transition: all 0.2s ease;
}

.form-check label {
  font-size: 0.875rem;
  color: #6b7280;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #4a6cf7;
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

/* Input with Icon Styles */
.input-with-icon {
  position: relative;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 12px;
  block-size: 14px;
  inline-size: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
  font-weight: 100;
  pointer-events: none;
}

.input-with-icon .form-control {
  padding-left: 2.5rem;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: none;
  width: 100%;
  position: relative;
  overflow: hidden;
}

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

.btn-primary:hover {
  background-color: var(--primary);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.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 rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s infinite linear;
}

/* Forgot Password Styles */
.forgot-password {
  text-align: right;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.forgot-password a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-password a:hover {
  text-decoration: underline;
}

.settings-section-header {
  /* display: flex;
  justify-content: space-between; */
  margin-block: 1.8rem 2rem;
  background-color: #fff;
}

.settings-section-header h2 {
  font-size: 1.2rem;
}

.settings-section-header p {
  color: #6b7280;
  font-size: 14px;
  margin-block-start: .5rem;
}

.checkbox-group {
  border: 1px solid #e9ecef;
  padding: .8rem .8rem;
  border-radius: .8rem;
}

.checkbox-group p {
  margin-block-end: .5rem;
}

.checkbox-group small {
  color: #6b7280;
  font-size: 15px;
}

/* Media Query for Responsiveness */
@media (max-width: 768px) {
  .settings-section-header p {
    display: none;
  }
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
}

.settings-actions button {
  inline-size: fit-content;
  padding: 0.465rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}

.qr-code-tool {
  margin: 0 auto;
  border-radius: 8px;
  border: 1px solid #f9fafb;
  background-color: #fff;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.qrcodes-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.qrcodes-form-grid .form-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.qrcodes-form-grid button {
  align-self: end;
  justify-self: end;
}


.qrcodes-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #fff;
  border-radius: 8px;
  margin-block-start: .2rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

.info-text {
  font-size: 14px;
  color: #6b7280;
  margin-left: 10px;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  background-color: #fff;
}

.default-message-container {
  display: none;
  justify-content: center;
  align-items: center;
  height: 200px;
  text-align: center;
  background: white;
  margin-block: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.default-message {
  font-weight: 300;
  color: #666;
  text-align: center;
}

.default-icon {
  margin-bottom: 10px;
}

.qr-item {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  /* padding: 15px; */
  text-align: center;
}

.qr-item img {
  width: 100%;
  height: auto;

  all: unset;
}

.serial-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #d1d5db;
}

.serial-number {
  font-family: monospace;
  font-size: 14px;
}

.copy-button {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #f9fafb;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-button:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.copy-button.copied {
  background: #10b981;
  border-color: #059669;
  color: white;
}

.qr-download-actions {
  display: flex;
  justify-content: center;
  margin: 15px 0;
}

.download-ui-btn {
  padding: 8px 20px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  background-color: inherit;
}

.progress-container {
  display: none;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-top: 20px;
}

.progress-status {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #e5e7eb;
  border-radius: 50%;
  border-top-color: #007bff;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

.progress-bar {
  background-color: #f3f4f6;
  border-radius: 9999px;
  height: 8px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-fill {
  height: 100%;
  background-color: #007bff;
  width: 0;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .qrcodes-form-grid {
    display: block;
  }

  .qrcodes-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .qr-grid {
    /* grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); */
  }
}

@media print {
  .form-container,
  .controls,
  .progress-container,
  .copy-button {
    display: none !important;
  }

  .serial-container {
    display: none !important;
  }

  .qr-grid {
    gap: 10px;
  }

  .qr-item {
    box-shadow: none;
    border: 1px solid #eee;
    page-break-inside: avoid;
  }
}

/* CSS for the loader */
.loader {
  border: 3px solid #f5f5f5; /* Light grey */
  border-top: 3px solid var(--primary); /* Blue */
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: none;
  animation: spin 2s linear infinite;
  margin-left: 10px; /* Space between button text and loader */
}

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


/* Modern Data Table Styling - Consolidated */

/* Table Controls */
.table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  /* margin-bottom: 1.5rem; */
  align-items: flex-start;
  background-color: #fff;
  padding: 2rem 1rem 1rem 1rem;
  border-start-end-radius: 0.8rem;
  border-start-start-radius: 0.8rem;
}

.table-controls .filters-group {
  display: flex;
  gap: 1rem;
  flex: 1;
}

.table-controls .length-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.table-controls .search-group {
  flex: 1;
}

.table-controls .form-select,
.table-controls .form-input {
  appearance: none;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25;
  min-width: 200px;
  color: #1a202c;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
}

.table-controls .form-input {
  background-image: none;
  padding-right: 0.75rem;
}

.table-controls .form-control:focus,
.table-controls .form-select:focus,
.table-controls .form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-group .form-control {
  padding-block: 6px;
}

/* Table Wrapper */
.table-wrapper {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: visible; /* Changed from hidden to visible */
}

/* Main Table Styling */
.table,
table.dataTable {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  width: 100% !important;
  border-collapse: collapse;
  text-align: left;
  margin: 25px 0 1rem 0;
  font-size: 0.9em;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.15);
  overflow: visible; /* Changed from hidden to visible */
  border-radius: 10px;
  background-color: inherit;
}

/* Table Header */
.table th,
table.dataTable thead th {
  background: #f8fafc;
  padding: 1rem 1rem;
  font-weight: 600;
  color: #475569;
  /* border-bottom: 2px solid #e2e8f0; */
}

/* Table Body */
.table td,
table.dataTable td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #495057;
  font-size: 14px;
}

.table tbody tr,
table.dataTable tbody tr {
  background-color: inherit;
}

.table tbody tr:nth-child(even),
table.dataTable tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.table tbody tr:hover,
table.dataTable tbody tr:hover {
  background-color: #f2f2f2;
  cursor: pointer;
}

/* Special Column Styling */
.table td:nth-child(1),
table.dataTable td:nth-child(1) { 
  color: #0d6efd;
  font-weight: 500;
}

.table td:nth-child(2),
table.dataTable td:nth-child(2) {
  font-weight: 500;
}

.table td:last-child,
table.dataTable td:last-child {
  white-space: nowrap;
}

/* Status Classes */
.status-active {
  color: #059669;
  font-weight: 500;
}

.status-inactive {
  color: #dc2626;
  font-weight: 500;
}

.status-pending {
  color: #d97706;
  font-weight: 500;
}

/* Action Buttons */
.table .btn-icon,
table.dataTable .btn-icon {
  padding: 4px 8px;
  background: #2563eb;
  border: none;
  transition: transform 0.2s;
  color: #fff;
  inline-size: fit-content;
  border-radius: 4px;
}

.table .btn-icon:hover,
table.dataTable .btn-icon:hover {
  transform: scale(1.1);
}

.table .btn-icon i,
table.dataTable .btn-icon i {
  font-size: 16px;
}

.table .action-buttons,
table.dataTable .action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.table .btn-icon[title],
table.dataTable .btn-icon[title] {
  position: relative;
}

/* Details Row */
.details-row {
  padding: 1rem;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.details-row dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem 1rem;
}

.details-row dt {
  color: #64748b;
  font-weight: 500;
}

.details-control {
  width: 40px;
  cursor: pointer;
}

.details-control i {
  margin-right: 12px;
}

/* Sorting Icons */
table.dataTable thead .sorting {
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7XQMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC');
  background-repeat: no-repeat;
  background-position: center right;
  padding-right: 20px;
  cursor: pointer;
}

table.dataTable thead .sorting_asc {
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==');
  background-repeat: no-repeat;
  background-position: center right;
  padding-right: 20px;
  cursor: pointer;
}

table.dataTable thead .sorting_desc {
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/POIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=');
  background-repeat: no-repeat;
  background-position: center right;
  padding-right: 20px;
  cursor: pointer;
}

table.dataTable thead .sorting:hover,
table.dataTable thead .sorting_asc:hover,
table.dataTable thead .sorting_desc:hover {
  background-color: #f8f9fa;
}

/* Pagination */
.dataTables_paginate {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  background-color: #fff;
  border-radius: 0.8rem;
  padding: 1rem;
}

.dataTables_paginate .paginate_button {
  padding: 6px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  margin-inline-start: 3px;
}

.dataTables_paginate .paginate_button.current {
  background-color: #2563eb;
  color: white;
  border-color: #2563eb;
}

.dataTables_paginate .paginate_button:hover:not(.current) {
  background-color: #f8f9fa;
  border-color: #dee2e6;
}

.dataTables_paginate .paginate_button.disabled {
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Info Display */
.dataTables_info {
  padding: 1rem;
  color: #64748b;
  font-size: 0.875rem;
  background-color: #fff;
  border-radius: 0.8rem;
}

.dataTables_empty {
  text-align: center;
  padding-block: 1rem;
}

.dataTables_wrapper {
  padding: 1rem;
  background-color: #fff;
  border-end-start-radius: 0.8rem;
  border-end-end-radius: 0.8rem;
  overflow: visible; /* Added to prevent clipping */
}

/* Hide DataTables default controls */
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
  display: none;
}

/* Responsive Design */
@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }
  
  .mobile-only {
    display: block;
  }
  
  .table-controls {
    flex-direction: column;
  }

  .filters-group {
    flex-direction: column;
    width: 100%;
  }

  .length-group,
  .search-group {
    width: 100%;
  }

  .table-controls .form-select,
  .table-controls .form-input {
    width: 100%;
    min-width: unset;
  }
  
  .details-row dl {
    grid-template-columns: 100px 1fr;
  }

  .details-control .icon-chevron-right,
  .details-control .icon-chevron-down {
    display: inline-block;
  }
}

@media (min-width: 768px) {
  .mobile-only {
    display: none;
  }
  
  .desktop-only {
    display: table-cell !important;
  }

  .details-control .icon-chevron-right,
  .details-control .icon-chevron-down {
    display: none;
  }
}

/* Fixed Actions Container and Dropdown */
.actions-container {
  position: relative;
  display: inline-block;
}

.actions-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #092253;
}

.actions-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  min-width: 180px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.actions-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-items {
  padding: 4px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f3f4f6;
  color: #111827;
  text-decoration: none;
}

.dropdown-item svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.dropdown-item.danger {
  color: #dc2626;
}

.dropdown-item.danger:hover {
  background-color: #fee2e2;
  color: #b91c1c;
}

.dropdown-divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 0.5rem 0;
}

/* Dropdown Select Styles */
.dropdown-select-wrapper {
  position: relative;
  width: 100%;
}

.dropdown-select-input {
  position: relative;
  cursor: pointer;
  background-color: #fff;
}

.dropdown-select-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.dropdown-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
  pointer-events: none;
  color: var(--text-light);
}

.dropdown-select-arrow.active {
  transform: translateY(-50%) rotate(180deg);
}

.dropdown-select-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  max-height: 250px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

/* Ensure dropdown can extend beyond modal boundaries */
.modal .dropdown-select-menu {
  position: absolute;
  z-index: 1002;
  max-height: 280px;
}

/* Adjust dropdown positioning when inside modal */
.modal .dropdown-select-wrapper {
  position: relative;
}

/* Ensure modal content doesn't clip dropdown */
.modal-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: var(--bg-white);
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  overflow: visible;
  transform: scale(0.95);
  opacity: 0;
  transition: all var(--transition);
}

.dropdown-select-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-select-search {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.dropdown-select-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: #f9fafb;
}

.dropdown-select-search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.dropdown-select-options {
  max-height: 120px;
  overflow-y: auto;
  flex: 1;
}

/* Ensure dropdown options have enough space in modals */
.modal .dropdown-select-options {
  max-height: 120px;
}

/* Handle smaller screens where modal space is limited */
@media (max-width: 768px) {
  .modal .dropdown-select-menu {
    max-height: 200px;
  }
  
  .modal .dropdown-select-options {
    max-height: 100px;
  }
}

.dropdown-select-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 14px;
  color: var(--text-dark);
}

.dropdown-select-option:hover {
  background-color: #f3f4f6;
}

.dropdown-select-option.no-results {
  color: var(--text-light);
  cursor: default;
}

.dropdown-select-option.no-results:hover {
  background-color: transparent;
}

/* Scrollbar styling for dropdown options */
.dropdown-select-options::-webkit-scrollbar {
  width: 6px;
}

.dropdown-select-options::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.dropdown-select-options::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.dropdown-select-options::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.dropdown-select-add-new {
  border-top: 1px solid #e5e7eb;
  padding: 8px;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.dropdown-select-add-new-btn {
  width: 100%;
  padding: 10px 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s ease;
}

.dropdown-select-add-new-btn:hover {
  background: #1e40af;
}

.dropdown-select-add-new-btn:active {
  background: #1e3a8a;
}

.dropdown-select-add-new-btn svg {
  width: 16px;
  height: 16px;
}

.dropdown-select-add-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.dropdown-select-add-btn:hover {
  background: #0a66c2;
}

.balance-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  border-radius: 1.25rem;
  padding: 1rem;
  margin: 1rem;
  inline-size: 400px;
  block-size: 240px;
  color: #333;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  background: 
    radial-gradient(
      circle at 50% 50%,
      #0a66c2 0%,
      #0a66c2 45%,
      transparent 46%
    ),
    #DBEBFA;
  background-size: 200% 150%;
  background-position: left;
  transition: background-position 0.5s ease;
}

.balance-card .logo-item {
  inline-size: fit-content;
  block-size: fit-content;
}

.balance-card .logo-item img {
  inline-size: fit-content;
  block-size: fit-content;
}

.account-holder-name {
  position: absolute;
  top: 20%;
  left: 56%;
  transform: translateY(-20%);
  max-width: 200px;
  text-align: left;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
  white-space: normal;
  margin-right: 8px;
  color: #fff;
}

.balance-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.balance-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block-end: 1.2rem;
  opacity: 0.9;
  font-size: 0.9rem;
}

.balance-card .account-number {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #333;
  backdrop-filter: blur(5px);
}

.balance-card .account-number::before {
  content: '';
  inline-size: 2rem;
  block-size: 1.4rem;
  border-radius: 30%;
  background-color: var(--bg-color-grey);
}

.balance-card .status-badge {
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  color: var(--text-color-white);
  background-color: rgba(0, 0, 0, 0.05);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: capitalize;
}

.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: inherit;
  border-radius: 50%;
  display: inline-block;
}

.balance-card .status-badge.inactive {
  color: var(--text-color-white);
  background-color: var(--bg-color-grey);
}

.balance-card .balance-section {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.balance-card .balance-section .balance-text {
  flex: 1;
}

.balance-card .qr-item {
  background: white;
  border-radius: 0.4rem;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 128px;
  height: 128px;
}

.balance-card .qr-item .serial-number {
  margin: 0;
}

.balance-card .qr-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.balance-card .qr-item-text-content {
  color: #fff;
  inline-size: 140px;
  margin: 1rem 0.2rem;
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 0.6rem;
}

.balance-card .qr-item-text-content h4 {
  font-weight: normal;
  margin-block-end: 0.4rem;
}

.balance-card .qr-item-text-content-list {
  text-align: left;
  font-size: 0.52rem;
}

.balance-card .balance-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.balance-card .balance-amount {
  font-weight: 700;
  font-size: 1.2rem;
  color: #333;
  position: relative;
  margin: 0;
  line-height: 1.2;
}

.balance-card #balance-value {
  display: inline-block;
  transition: all 0.4s ease;
  transform-style: preserve-3d;
  filter: blur(0.4375rem);
  color: #666;
  position: absolute;
  opacity: 0;
  background: rgba(0, 0, 0, 0.1);
  padding: 0 4px;
  border-radius: 4px;
  line-height: 1.2;
}

.balance-card #balance-value.visible {
  filter: none;
  transform: rotateX(0deg);
  opacity: 1;
  position: relative;
  color: #333;
  background: transparent;
  padding: 0;
}

.balance-card .balance-placeholder {
  display: inline-block;
  transition: all 0.4s ease;
  filter: blur(0.4375rem);
  color: #666;
  font-size: 1rem;
  letter-spacing: 0.1em;
  opacity: 0.7;
  background: rgba(0, 0, 0, 0.1);
  padding: 0 4px;
  border-radius: 4px;
  line-height: 1.2;
}

.balance-card .balance-placeholder.hidden {
  display: none;
}

.balance-card .toggle-visibility {
  border: none;
  cursor: pointer;
  background-color: inherit;
  transition: transform 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
  color: #333;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.balance-card .toggle-visibility svg {
  width: 14px;
  height: 14px;
}

@keyframes balance-value-toggler-spinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.balance-card .card-holder {
  opacity: 0.9;
  text-transform: uppercase;
  margin-top: 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0;
}
