html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 120px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Fix table headers for light theme - ensure dark text on light background */
[data-theme="light"] table thead th,
[data-theme="light"] table thead td {
  color: #212529 !important;
  background-color: #f8f9fa !important;
  font-weight: 600;
}

/* Dark theme - keep light text on dark background */
[data-theme="dark"] table thead th,
[data-theme="dark"] table thead td {
  color: #e9ecef !important;
  background-color: #343a40 !important;
  font-weight: 600;
}

/* Light theme - make ALL text much darker for better visibility */
[data-theme="light"] label,
[data-theme="light"] .form-label,
[data-theme="light"] .form-check-label {
  color: #0f172a !important;
  font-weight: 600 !important;
}

[data-theme="light"] .card-body,
[data-theme="light"] .card-text,
[data-theme="light"] p,
[data-theme="light"] span:not(.badge),
[data-theme="light"] div:not(.alert):not(.badge) {
  color: #1e293b !important;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="light"] .table tbody td,
[data-theme="light"] .table tbody th {
  color: #0f172a !important;
}

[data-theme="light"] .stat-label {
  color: #0f172a !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

[data-theme="light"] .breadcrumb-item {
  color: #334155 !important;
}

[data-theme="light"] .breadcrumb-item.active {
  color: #0f172a !important;
  font-weight: 600 !important;
}

[data-theme="light"] small,
[data-theme="light"] .small,
[data-theme="light"] .text-muted {
  color: #475569 !important;
}

/* Fix select dropdown arrows visibility in dark theme - Apply to ALL selects */
[data-theme="dark"] select,
[data-theme="dark"] .form-select,
[data-theme="dark"] select.form-control,
[data-theme="dark"] select.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 16px 12px !important;
}

/* Fix datetime-local input calendar icons in dark theme */
[data-theme="dark"] input[type="datetime-local"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="time"] {
  color-scheme: dark;
}