/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ==========================================================================
   FALLBACK STYLES FOR OLDER BROWSERS
   These provide basic styling if Tailwind CSS v4 features aren't supported.
   Applies to browsers that don't support @layer (Chrome < 99, Firefox < 97)
   ========================================================================== */

/* Basic reset and defaults - works on all browsers */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Fallback body styles */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
  background-color: #f8fafc;
  margin: 0;
  padding: 0;
}

/* Fallback for common utility classes - only applies if Tailwind classes fail */
@supports not (background: rgb(from red r g b)) {
  /* Basic colors */
  .bg-white { background-color: #ffffff; }
  .bg-slate-50 { background-color: #f8fafc; }
  .bg-slate-100 { background-color: #f1f5f9; }
  .bg-primary-500, .bg-primary { background-color: #6366F1 !important; }
  .bg-primary-600 { background-color: #4F46E5; }
  .bg-primary-700 { background-color: #4338CA; }
  .bg-green-100 { background-color: #dcfce7; }
  .bg-red-100 { background-color: #fee2e2; }

  .text-white { color: #ffffff; }
  .text-slate-500 { color: #64748b; }
  .text-slate-600 { color: #475569; }
  .text-slate-700 { color: #334155; }
  .text-slate-800 { color: #1e293b; }
  .text-slate-900 { color: #0f172a; }
  .text-primary-500 { color: #6366F1; }
  .text-primary-600 { color: #4F46E5; }
  .text-primary-700 { color: #4338CA; }
  .text-green-700 { color: #15803d; }
  .text-red-700 { color: #b91c1c; }

  /* Basic layout */
  .flex { display: flex; }
  .inline-flex { display: inline-flex; }
  .grid { display: grid; }
  .block { display: block; }
  .hidden { display: none; }

  .flex-col { flex-direction: column; }
  .flex-1 { flex: 1 1 0%; }
  .items-center { align-items: center; }
  .justify-center { justify-content: center; }
  .justify-between { justify-content: space-between; }
  .gap-2 { gap: 0.5rem; }
  .gap-4 { gap: 1rem; }

  /* Spacing */
  .p-2 { padding: 0.5rem; }
  .p-3 { padding: 0.75rem; }
  .p-4 { padding: 1rem; }
  .p-6 { padding: 1.5rem; }
  .px-4 { padding-left: 1rem; padding-right: 1rem; }
  .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .mb-2 { margin-bottom: 0.5rem; }
  .mb-4 { margin-bottom: 1rem; }
  .mt-2 { margin-top: 0.5rem; }
  .mt-4 { margin-top: 1rem; }

  /* Typography */
  .text-sm { font-size: 0.875rem; }
  .text-base { font-size: 1rem; }
  .text-lg { font-size: 1.125rem; }
  .text-xl { font-size: 1.25rem; }
  .text-2xl { font-size: 1.5rem; }
  .font-medium { font-weight: 500; }
  .font-semibold { font-weight: 600; }
  .font-bold { font-weight: 700; }
  .text-center { text-align: center; }

  /* Borders and rounded corners */
  .rounded { border-radius: 0.25rem; }
  .rounded-md { border-radius: 0.375rem; }
  .rounded-lg { border-radius: 0.5rem; }
  .rounded-xl { border-radius: 0.75rem; }
  .border { border-width: 1px; border-style: solid; }
  .border-slate-200 { border-color: #e2e8f0; }
  .border-slate-300 { border-color: #cbd5e1; }

  /* Shadows */
  .shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1); }
  .shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
  .shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); }

  /* Width and height */
  .w-full { width: 100%; }
  .h-10 { height: 2.5rem; }
  .h-11 { height: 2.75rem; }
  .min-h-screen { min-height: 100vh; }

  /* Buttons - basic fallback */
  button, .btn, [type="submit"] {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease;
  }

  /* Forms - basic fallback */
  input, select, textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
  }

  input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  }
}

/* ==========================================================================
   END FALLBACK STYLES
   ========================================================================== */

/* Cross-platform font rendering consistency */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Prevent horizontal overflow on Windows */
body {
  overflow-x: hidden;
}

/* Ensure consistent input sizing across platforms */
input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

/* Hide scrollbar on header navigation while keeping scroll functionality */
header nav {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

header nav::-webkit-scrollbar {
  display: none;  /* Chrome, Safari, Opera */
}

/* Sidebar scrollbar styling */
aside[data-app-shell-target="sidebar"] nav {
  scrollbar-width: thin;
  scrollbar-color: rgb(203 213 225) transparent; /* slate-300 */
}

aside[data-app-shell-target="sidebar"] nav::-webkit-scrollbar {
  width: 4px;
}

aside[data-app-shell-target="sidebar"] nav::-webkit-scrollbar-track {
  background: transparent;
}

aside[data-app-shell-target="sidebar"] nav::-webkit-scrollbar-thumb {
  background-color: rgb(203 213 225); /* slate-300 */
  border-radius: 4px;
}

aside[data-app-shell-target="sidebar"] nav::-webkit-scrollbar-thumb:hover {
  background-color: rgb(148 163 184); /* slate-400 */
}

/* Dark mode scrollbar */
.dark aside[data-app-shell-target="sidebar"] nav {
  scrollbar-color: rgb(71 85 105) transparent; /* slate-600 */
}

.dark aside[data-app-shell-target="sidebar"] nav::-webkit-scrollbar-thumb {
  background-color: rgb(71 85 105); /* slate-600 */
}

.dark aside[data-app-shell-target="sidebar"] nav::-webkit-scrollbar-thumb:hover {
  background-color: rgb(100 116 139); /* slate-500 */
}

/* Keep master-detail content scrolling visible and stable after Turbo frame loads. */
.master-detail-workspace {
  flex: 1 1 0%;
  height: auto;
  min-height: 0;
}

.master-detail-scrollbar {
  overflow-y: scroll !important;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: rgb(148 163 184) rgb(241 245 249); /* slate-400 / slate-100 */
}

.master-detail-scrollbar::-webkit-scrollbar {
  width: 10px;
}

.master-detail-scrollbar::-webkit-scrollbar-track {
  background: rgb(241 245 249); /* slate-100 */
}

.master-detail-scrollbar::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 2px solid rgb(241 245 249);
  border-radius: 9999px;
  background-color: rgb(148 163 184); /* slate-400 */
}

.master-detail-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: rgb(100 116 139); /* slate-500 */
}

.dark .master-detail-scrollbar {
  scrollbar-color: rgb(100 116 139) rgb(30 41 59); /* slate-500 / slate-800 */
}

.dark .master-detail-scrollbar::-webkit-scrollbar-track {
  background: rgb(30 41 59); /* slate-800 */
}

.dark .master-detail-scrollbar::-webkit-scrollbar-thumb {
  border-color: rgb(30 41 59);
  background-color: rgb(100 116 139); /* slate-500 */
}

.dark .master-detail-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: rgb(148 163 184); /* slate-400 */
}

/* Print styles for barcode printing - 50mm x 25mm labels */
@media print {
  body.print-barcode {
    margin: 0 !important;
    padding: 0 !important;
  }

  body.print-barcode > *:not(.barcode-print-wrapper) {
    display: none !important;
  }

  body.print-barcode .barcode-print-wrapper {
    display: block;
    margin: 0;
    padding: 0;
  }

  body.print-barcode .barcode-label {
    width: 50mm;
    height: 25mm;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    page-break-after: always;
  }

  body.print-barcode .barcode-label:last-child {
    page-break-after: avoid;
  }

  body.print-barcode .barcode-label img {
    width: 48mm;
    height: 18mm;
  }

  body.print-barcode .barcode-label .barcode-text {
    font-size: 9pt;
    font-family: monospace;
    margin-top: 1mm;
  }
}

  body.print-go-live nav,
  body.print-go-live header,
  body.print-go-live footer,
  body.print-go-live aside,
  body.print-go-live .no-print {
    display: none !important;
  }

  body.print-go-live {
    background: white !important;
  }

  body.print-go-live main,
  body.print-go-live .go-live-print-area {
    width: 100% !important;
    max-width: none !important;
  }

  body.print-go-live main {
    padding: 0 !important;
  }

  body.print-go-live .go-live-print-area {
    padding: 0 !important;
  }

  body.print-go-live .go-live-print-card {
    break-inside: avoid;
    box-shadow: none !important;
  }
}

/* Pagy pagination styles */
.pagy.series-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  margin-bottom: 1rem;
}

.pagy.series-nav a,
.pagy.series-nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0.375rem;
  border: 1px solid rgb(226 232 240);
  background-color: white;
  color: rgb(71 85 105);
  transition: all 0.15s ease;
}

.pagy.series-nav a:hover {
  background-color: rgb(241 245 249);
  border-color: rgb(203 213 225);
  color: rgb(15 23 42);
}

.pagy.series-nav a[aria-current="page"],
.pagy.series-nav [aria-disabled="true"] {
  background-color: rgb(15 23 42);
  border-color: rgb(15 23 42);
  color: white;
  cursor: default;
}

.pagy.series-nav a[aria-label="Previous"],
.pagy.series-nav a[aria-label="Next"] {
  font-weight: 600;
}

/* ==========================================================================
   CLEARTAX-INSPIRED DESIGN SYSTEM STYLES
   Modern, clean, professional UI components
   ========================================================================== */

/* Page headers with gradient accent */
.page-header {
  position: relative;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(99, 102, 241, 0.3) 0%,
    rgba(99, 102, 241, 0.1) 50%,
    transparent 100%);
}

/* Stats cards with subtle gradient borders */
.stat-card {
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.dark .stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Modern data tables */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  background: rgb(248 250 252);
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(100 116 139);
  text-align: left;
  border-bottom: 1px solid rgb(226 232 240);
}

.data-table thead th:first-child {
  border-top-left-radius: 0.5rem;
}

.data-table thead th:last-child {
  border-top-right-radius: 0.5rem;
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background-color: rgb(248 250 252);
}

.data-table tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgb(241 245 249);
  font-size: 0.875rem;
  color: rgb(51 65 85);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Progress steps (ClearTax-style) */
.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
}

.progress-step {
  display: flex;
  align-items: center;
  position: relative;
}

.progress-step-number {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  background: rgb(241 245 249);
  color: rgb(148 163 184);
  border: 2px solid rgb(226 232 240);
  transition: all 0.2s ease;
}

.progress-step.active .progress-step-number {
  background: #6366F1;
  color: white;
  border-color: #6366F1;
}

.progress-step.completed .progress-step-number {
  background: #22C55E;
  color: white;
  border-color: #22C55E;
}

.progress-step-connector {
  width: 3rem;
  height: 2px;
  background: rgb(226 232 240);
  margin: 0 0.5rem;
}

.progress-step.completed + .progress-step .progress-step-connector,
.progress-step.completed .progress-step-connector {
  background: #22C55E;
}

/* Status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-pill-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
}

.status-pill.active {
  background: rgba(34, 197, 94, 0.1);
  color: rgb(22 163 74);
}

.status-pill.active .status-pill-dot {
  background: rgb(34 197 94);
}

.status-pill.pending {
  background: rgba(245, 158, 11, 0.1);
  color: rgb(180 83 9);
}

.status-pill.pending .status-pill-dot {
  background: rgb(245 158 11);
}

.status-pill.inactive {
  background: rgba(100, 116, 139, 0.1);
  color: rgb(71 85 105);
}

.status-pill.inactive .status-pill-dot {
  background: rgb(148 163 184);
}

.status-pill.error {
  background: rgba(239, 68, 68, 0.1);
  color: rgb(185 28 28);
}

.status-pill.error .status-pill-dot {
  background: rgb(239 68 68);
}

/* Info panels */
.info-panel {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(99, 102, 241, 0.02) 100%);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.info-panel.success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(34, 197, 94, 0.02) 100%);
  border-color: rgba(34, 197, 94, 0.15);
}

.info-panel.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(245, 158, 11, 0.02) 100%);
  border-color: rgba(245, 158, 11, 0.15);
}

.info-panel.danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0.02) 100%);
  border-color: rgba(239, 68, 68, 0.15);
}

/* Floating action buttons */
.fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 40;
}

.fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* Shimmer loading effect */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgb(241 245 249) 0%,
    rgb(226 232 240) 50%,
    rgb(241 245 249) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.25rem;
}

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

.empty-state-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-icon svg {
  width: 2rem;
  height: 2rem;
  color: #6366F1;
}

/* Breadcrumb refinement */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.breadcrumb-item {
  color: rgb(100 116 139);
}

.breadcrumb-item a {
  color: rgb(100 116 139);
  text-decoration: none;
  transition: color 0.15s ease;
}

.breadcrumb-item a:hover {
  color: #6366F1;
}

.breadcrumb-item.active {
  color: rgb(15 23 42);
  font-weight: 500;
}

.breadcrumb-separator {
  color: rgb(203 213 225);
}

/* Metric widgets */
.metric-widget {
  background: white;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.metric-widget-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.metric-widget-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #6366F1;
}

.metric-widget-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: rgb(15 23 42);
  line-height: 1;
}

.metric-widget-label {
  font-size: 0.75rem;
  color: rgb(100 116 139);
  margin-top: 0.25rem;
}

.metric-widget-change {
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.metric-widget-change.positive {
  color: rgb(22 163 74);
}

.metric-widget-change.negative {
  color: rgb(220 38 38);
}

/* Card component */
.card,
.rounded-md.border.border-slate-200.bg-white,
.rounded-lg.border.border-slate-200.bg-white,
section.rounded-md.border,
section.rounded-lg.border {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px -2px #00000014, 0 3px 6px #0000000a, 0 5px 12px 4px #00000005;
  border: 1px solid #ccc;
}

.dark .card,
.dark .rounded-md.border.border-slate-200.bg-white,
.dark .rounded-lg.border.border-slate-200.bg-white,
.dark section.rounded-md.border,
.dark section.rounded-lg.border,
.dark .rounded-md.border.border-slate-200,
.dark .rounded-lg.border.border-slate-200 {
  background: rgb(30 41 59);
  border-color: rgb(51 65 85);
  box-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.3), 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* Table default styling */
.table-default > tbody > tr > td {
  color: #455560;
  vertical-align: middle;
  border-bottom: 1px solid #ccc;
}

.table-default > thead > tr > th {
  text-align: left;
  color: #455560;
  background: #fbfcfc;
  border-bottom: 1px solid #ccc;
}

/* Allow text-right/text-center classes to override default left alignment */
.table-default > thead > tr > th.text-right {
  text-align: right;
}

.table-default > thead > tr > th.text-center {
  text-align: center;
}

table tbody tr td,
table tbody tr th,
table thead tr th {
  border-bottom-color: #ccc;
}

/* Dark mode table styles */
.dark .table-default > tbody > tr > td {
  color: rgb(203 213 225);
  border-bottom-color: rgb(51 65 85);
}

.dark .table-default > thead > tr > th {
  color: rgb(148 163 184);
  background: rgb(30 41 59);
  border-bottom-color: rgb(51 65 85);
}

.dark table tbody tr td,
.dark table tbody tr th,
.dark table thead tr th {
  border-bottom-color: rgb(51 65 85);
}

/* Dark mode adjustments */
.dark .data-table thead th {
  background: rgb(30 41 59);
  border-color: rgb(51 65 85);
  color: rgb(148 163 184);
}

.dark .data-table tbody tr:hover {
  background: rgb(51 65 85);
}

.dark .data-table tbody td {
  border-color: rgb(51 65 85);
  color: rgb(203 213 225);
}

.dark .metric-widget {
  background: rgb(30 41 59);
  border-color: rgb(51 65 85);
}

.dark .info-panel {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
}

.dark .empty-state-icon {
  background: rgba(99, 102, 241, 0.15);
}

.dark .metric-widget-value {
  color: white;
}

.dark .metric-widget-label {
  color: rgb(148 163 184);
}

.dark .skeleton {
  background: linear-gradient(
    90deg,
    rgb(51 65 85) 0%,
    rgb(71 85 105) 50%,
    rgb(51 65 85) 100%
  );
}

/* Dark mode pagination */
.dark .pagy.series-nav a,
.dark .pagy.series-nav span {
  background-color: rgb(30 41 59);
  border-color: rgb(51 65 85);
  color: rgb(148 163 184);
}

.dark .pagy.series-nav a:hover {
  background-color: rgb(51 65 85);
  border-color: rgb(71 85 105);
  color: rgb(226 232 240);
}

.dark .pagy.series-nav a[aria-current="page"],
.dark .pagy.series-nav [aria-disabled="true"] {
  background-color: rgb(99 102 241);
  border-color: rgb(99 102 241);
  color: white;
}

/* Dark mode breadcrumb */
.dark .breadcrumb-item {
  color: rgb(148 163 184);
}

.dark .breadcrumb-item a {
  color: rgb(148 163 184);
}

.dark .breadcrumb-item a:hover {
  color: rgb(129 140 248);
}

.dark .breadcrumb-item.active {
  color: rgb(226 232 240);
}

.dark .breadcrumb-separator {
  color: rgb(71 85 105);
}

/* Dark mode progress steps */
.dark .progress-step-number {
  background: rgb(51 65 85);
  color: rgb(148 163 184);
  border-color: rgb(71 85 105);
}

.dark .progress-step-connector {
  background: rgb(71 85 105);
}

/* ==========================================================================
   COMPREHENSIVE DARK MODE OVERRIDES
   Override common bg-white patterns that don't have dark: variants
   ========================================================================== */

/* Override inline style backgrounds in dark mode */
.dark [style*="background-color: #ffffff"],
.dark [style*="background-color:#ffffff"],
.dark [style*="background: #ffffff"],
.dark [style*="background:#ffffff"],
.dark [style*="background-color: #fff"],
.dark [style*="background-color:#fff"],
.dark [style*="background: #fff"],
.dark [style*="background:#fff"],
.dark [style*="background-color: white"],
.dark [style*="background-color:white"],
.dark [style*="background: white"],
.dark [style*="background:white"] {
  background-color: rgb(30 41 59) !important;
}

/* Common white background elements */
.dark .bg-white {
  background-color: rgb(30 41 59) !important;
}

/* Form inputs in dark mode */
.dark input:not([type="checkbox"]):not([type="radio"]),
.dark select,
.dark textarea {
  background-color: rgb(30 41 59);
  border-color: rgb(51 65 85);
  color: rgb(226 232 240);
}

.dark input:focus,
.dark select:focus,
.dark textarea:focus {
  border-color: rgb(99 102 241);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.dark input::placeholder,
.dark textarea::placeholder {
  color: rgb(100 116 139);
}

/* Text color overrides for dark mode */
.dark .text-gray-900,
.dark .text-slate-900 {
  color: rgb(241 245 249) !important;
}

.dark .text-gray-800,
.dark .text-slate-800 {
  color: rgb(226 232 240) !important;
}

.dark .text-gray-700,
.dark .text-slate-700 {
  color: rgb(203 213 225) !important;
}

.dark .text-gray-600,
.dark .text-slate-600 {
  color: rgb(148 163 184) !important;
}

.dark .text-gray-500,
.dark .text-slate-500 {
  color: rgb(100 116 139) !important;
}

/* Border color overrides for dark mode */
.dark .border-gray-200,
.dark .border-slate-200 {
  border-color: rgb(51 65 85) !important;
}

.dark .border-gray-300,
.dark .border-slate-300 {
  border-color: rgb(71 85 105) !important;
}

/* Background overrides for dark mode */
.dark .bg-gray-50,
.dark .bg-slate-50 {
  background-color: rgb(15 23 42) !important;
}

.dark .bg-gray-100,
.dark .bg-slate-100 {
  background-color: rgb(30 41 59) !important;
}

/* Dropdown menus and popovers */
.dark [data-controller*="dropdown"] > div,
.dark [data-dropdown-target="menu"],
.dark .dropdown-menu {
  background-color: rgb(30 41 59);
  border-color: rgb(51 65 85);
}

/* Modal and dialog backgrounds */
.dark [data-controller*="modal"] > div > div,
.dark .modal-content,
.dark [role="dialog"] > div {
  background-color: rgb(30 41 59);
}

/* Divide colors for dark mode */
.dark .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: rgb(51 65 85) !important;
}

.dark .divide-slate-200 > :not([hidden]) ~ :not([hidden]),
.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
  border-color: rgb(51 65 85) !important;
}

/* Table specific dark mode */
.dark table {
  border-color: rgb(51 65 85);
}

.dark table thead {
  background-color: rgb(15 23 42);
}

.dark table thead th {
  color: rgb(148 163 184);
  border-bottom-color: rgb(51 65 85);
}

.dark table tbody td {
  border-bottom-color: rgb(51 65 85);
  color: rgb(203 213 225);
}

.dark table tbody tr:hover {
  background-color: rgb(51 65 85);
}

/* Colored backgrounds for dark mode */
.dark .bg-amber-50 {
  background-color: rgba(245, 158, 11, 0.15) !important;
}

.dark .bg-amber-100 {
  background-color: rgba(245, 158, 11, 0.2) !important;
}

.dark .bg-yellow-50 {
  background-color: rgba(234, 179, 8, 0.15) !important;
}

.dark .bg-yellow-100 {
  background-color: rgba(234, 179, 8, 0.2) !important;
}

.dark .bg-red-50 {
  background-color: rgba(239, 68, 68, 0.15) !important;
}

.dark .bg-red-100 {
  background-color: rgba(239, 68, 68, 0.2) !important;
}

.dark .bg-green-50 {
  background-color: rgba(34, 197, 94, 0.15) !important;
}

.dark .bg-green-100 {
  background-color: rgba(34, 197, 94, 0.2) !important;
}

.dark .bg-blue-50 {
  background-color: rgba(59, 130, 246, 0.15) !important;
}

.dark .bg-blue-100 {
  background-color: rgba(59, 130, 246, 0.2) !important;
}

.dark .bg-orange-50 {
  background-color: rgba(249, 115, 22, 0.15) !important;
}

.dark .bg-orange-100 {
  background-color: rgba(249, 115, 22, 0.2) !important;
}

.dark .bg-indigo-50 {
  background-color: rgba(99, 102, 241, 0.15) !important;
}

.dark .bg-indigo-100 {
  background-color: rgba(99, 102, 241, 0.2) !important;
}

.dark .bg-purple-50 {
  background-color: rgba(168, 85, 247, 0.15) !important;
}

.dark .bg-purple-100 {
  background-color: rgba(168, 85, 247, 0.2) !important;
}

.dark .bg-pink-50 {
  background-color: rgba(236, 72, 153, 0.15) !important;
}

.dark .bg-pink-100 {
  background-color: rgba(236, 72, 153, 0.2) !important;
}

.dark .bg-emerald-50 {
  background-color: rgba(16, 185, 129, 0.15) !important;
}

.dark .bg-emerald-100 {
  background-color: rgba(16, 185, 129, 0.2) !important;
}

.dark .bg-teal-50 {
  background-color: rgba(20, 184, 166, 0.15) !important;
}

.dark .bg-teal-100 {
  background-color: rgba(20, 184, 166, 0.2) !important;
}

.dark .bg-cyan-50 {
  background-color: rgba(6, 182, 212, 0.15) !important;
}

.dark .bg-cyan-100 {
  background-color: rgba(6, 182, 212, 0.2) !important;
}

.dark .bg-rose-50 {
  background-color: rgba(244, 63, 94, 0.15) !important;
}

.dark .bg-rose-100 {
  background-color: rgba(244, 63, 94, 0.2) !important;
}
