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: 60px;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}

/* Custom Styles */
.card {
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar-brand i {
  margin-right: 0.5rem;
}

.badge {
  padding: 0.5em 0.75em;
}

.btn {
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.priority-high {
  border-left: 4px solid #dc3545;
}

.priority-medium {
  border-left: 4px solid #ffc107;
}

.priority-low {
  border-left: 4px solid #6c757d;
}

.task-item {
  cursor: pointer;
  padding: 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.task-item:hover {
  background-color: #f8f9fa;
  border-color: #0d6efd;
}

.status-badge {
  min-width: 80px;
  display: inline-block;
  text-align: center;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    color: #e0e0e0;
  }

  .card {
    background-color: #2d2d2d;
    border-color: #3d3d3d;
    color: #e0e0e0;
  }

  .card-header {
    background-color: #3d3d3d;
    border-bottom-color: #4d4d4d;
    color: #ffffff;
  }

  .navbar {
    background-color: #2d2d2d !important;
    border-bottom-color: #3d3d3d;
  }

  .navbar-light .navbar-nav .nav-link {
    color: #e0e0e0 !important;
  }

  .navbar-light .navbar-brand {
    color: #ffffff !important;
  }

  .task-item {
    background-color: #2d2d2d;
    border-color: #3d3d3d;
    color: #e0e0e0;
  }

  .task-item:hover {
    background-color: #3d3d3d;
    border-color: #4d4d4d;
  }

  .text-muted {
    color: #aaaaaa !important;
  }

  .border-bottom {
    border-bottom-color: #3d3d3d !important;
  }

  .footer {
    background-color: #2d2d2d;
    border-top-color: #3d3d3d;
  }

  /* Fix for light text on light backgrounds */
  h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
  }

  p {
    color: #e0e0e0;
  }

  .lead {
    color: #d0d0d0;
  }

  /* Card improvements for dark mode */
  .card-body {
    background-color: #2d2d2d;
    color: #e0e0e0;
  }

  .card-title {
    color: #ffffff;
  }

  .card-subtitle {
    color: #b0b0b0;
  }

  /* Border colors */
  .border-primary {
    border-color: #0d6efd !important;
  }

  .border-success {
    border-color: #198754 !important;
  }

  .border-warning {
    border-color: #ffc107 !important;
  }

  .border-info {
    border-color: #0dcaf0 !important;
  }

  /* Button text */
  .btn-outline-primary,
  .btn-outline-secondary,
  .btn-outline-success,
  .btn-outline-info,
  .btn-outline-warning {
    color: #e0e0e0;
  }

  .btn-outline-primary:hover,
  .btn-outline-secondary:hover,
  .btn-outline-success:hover,
  .btn-outline-info:hover,
  .btn-outline-warning:hover {
    color: #ffffff;
  }

  /* Alerts in dark mode */
  .alert {
    background-color: #3d3d3d;
    border-color: #4d4d4d;
    color: #e0e0e0;
  }

  .spinner-border {
    color: #ffffff;
  }
}

/* Force white text on colored backgrounds */
.bg-primary, .bg-success, .bg-warning, .bg-info, .bg-danger,
.bg-secondary, .card-header.bg-primary, .card-header.bg-success,
.card-header.bg-warning, .card-header.bg-info, .card-header.bg-secondary {
  color: #ffffff !important;
}

.text-white {
  color: #ffffff !important;
}
