/* Global Styles */
body {
  font-family: "Inter", sans-serif;
  background-color: #f8f9fa;
  min-height: 100vh;
}

/* Navbar Styles */
.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 600;
  display: flex;
  align-items: center;
}

/* Card Styles */
.card {
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-title {
  font-weight: 600;
  color: #212529;
  margin-bottom: 1.5rem;
}

/* Table Styles */
.table {
  margin-bottom: 0;
}

.table th {
  font-weight: 600;
  color: #495057;
  border-top: none;
  padding: 1rem;
}

.table td,
.table th {
  vertical-align: middle;
  padding: 0.75rem 1rem;
}

/* Action Buttons */
.action-btn {
  padding: 0.5rem;
  border-radius: 5px;
  transition: all 0.2s;
  margin-right: 0.5rem;
  cursor: pointer;
}

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

.delete-btn {
  color: #dc3545;
  background-color: rgba(220, 53, 69, 0.1);
}

/* Status Badge Pills */
.status-badge {
  display: inline-block;
  padding: 0.35em 1em;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95em;
  letter-spacing: 0.02em;
  margin-right: 0.25em;
  margin-bottom: 0.1em;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  vertical-align: middle;
}

.status-TODO {
  background: #e9ecef;
  color: #495057;
}

.status-IN_PROGRESS {
  background: #fff3cd;
  color: #856404;
}

.status-COMPLETED {
  background: #d4edda;
  color: #155724;
}

.status-CANCELLED {
  background: #f8d7da;
  color: #721c24;
}

/* Highlight row/cell being edited */
tr.editing-row,
td.editing-cell {
  background: #e3f2fd !important;
  transition: background 0.2s;
}

/* Editable cell hover effect */
.editable-cell {
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.editable-cell:hover {
  background: #f1f3f4;
}

.editable-cell:hover:after {
  content: "\270E"; /* pencil icon */
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1em;
  color: #adb5bd;
}

/* Deadline formatting (handled in JS, but style for consistency) */
td.deadline-cell {
  font-family: "Inter", sans-serif;
  font-size: 0.98em;
  color: #495057;
}

/* Editable Fields Styles */
.editable-field {
  border: 1px solid transparent;
  background-color: transparent;
  transition: background 0.2s, border 0.2s, box-shadow 0.2s;
}

.editable-field:hover {
  border-color: #dee2e6;
  background-color: #fff;
}

.editable-field:focus {
  border-color: #80bdff;
  background-color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Deadline Control Styles */
.deadline-control {
  display: flex;
  gap: 8px;
  align-items: center;
}

.deadline-control input[type="datetime-local"] {
  flex: 1;
  min-width: 200px;
}

.deadline-control .btn-outline-danger {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.deadline-control .btn-outline-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Make textarea height consistent */
textarea.editable-field {
  min-height: 38px;
  resize: vertical;
}

/* Style for overdue tasks */
tr.overdue {
  background-color: rgba(220, 53, 69, 0.1);
}

/* Style for tasks due soon */
tr.due-soon {
  background-color: rgba(255, 193, 7, 0.1);
}

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

.card,
.modal-content {
  animation: fadeIn 0.3s ease-out;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .card {
    margin-bottom: 1rem;
  }

  .table td {
    padding: 0.75rem;
  }

  .search-box {
    max-width: 100%;
  }

  .stats-container {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .stat-item {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 200px;
  }
}

/* Deadline styles */
.text-danger {
  color: #dc3545 !important;
}

.text-warning {
  color: #ffc107 !important;
}

.text-success {
  color: #28a745 !important;
}

.text-muted {
  color: #6c757d !important;
}

/* Search Box */
.search-box {
  position: relative;
  max-width: 300px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
}

.search-box .form-control {
  padding-left: 2.5rem;
  border-radius: 20px;
}

/* Stats Container */
.stats-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  transition: transform 0.2s;
}

.stat-item:hover {
  transform: translateX(5px);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-icon.total {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
}

.stat-icon.completed {
  background-color: rgba(25, 135, 84, 0.1);
  color: #198754;
}

.stat-icon.in-progress {
  background-color: rgba(255, 193, 7, 0.1);
  color: #ffc107;
}

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

.stat-label {
  font-size: 0.875rem;
  color: #6c757d;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: #212529;
}

/* Help Modal */
.help-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s;
}

.help-item:hover {
  transform: translateX(5px);
}

.help-item i {
  font-size: 1.5rem;
  margin-top: 0.25rem;
}

.help-content h6 {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.help-content p {
  color: #6c757d;
  margin-bottom: 0;
}

.status-help {
  margin-bottom: 1rem;
  transition: transform 0.2s;
}

.status-help:hover {
  transform: translateX(5px);
}

.status-help p {
  margin: 0.5rem 0 0;
  color: #6c757d;
}

/* Empty State */
#noTasksMessage {
  padding: 3rem 0;
}

#noTasksMessage img {
  opacity: 0.8;
  transition: transform 0.3s;
}

#noTasksMessage:hover img {
  transform: scale(1.1);
}

/* Modal Styles */
.modal-content {
  border: none;
  border-radius: 10px;
}

.modal-header {
  border-bottom: 1px solid #e9ecef;
  padding: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid #e9ecef;
  padding: 1.5rem;
}

/* Button Styles */
.btn {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.2s;
}

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

.btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

.btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-secondary:hover {
  background-color: #5c636a;
  border-color: #565e64;
}
