body {
  padding-top: 0; /* Remove padding as we have a navbar */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f8f9fa;
}

.login-page {
  background-color: #f8f9fa;
}

.login-container {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.brand {
  color: #0d6efd;
  font-weight: 700;
}

.nav-tabs .nav-link {
  cursor: pointer;
}

.task-item {
  transition: all 0.2s ease;
}

.task-item:hover {
  background-color: #f8f9fa;
}

.task-item .badge {
  font-size: 0.75rem;
}

.task-item.priority-high {
  border-left: 4px solid #dc3545;
}

.task-item.priority-medium {
  border-left: 4px solid #ffc107;
}

.task-item.priority-low {
  border-left: 4px solid #0d6efd;
}

.recommendation-card {
  height: 100%;
  transition: transform 0.2s;
}

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

.recommendation-card .card-footer {
  background-color: transparent;
  border-top: none;
}

/* Leaderboard styles */
#leaderboardTable tr:nth-child(1) {
  font-weight: bold;
}

#leaderboardTable tr:nth-child(1) td {
  font-size: 1.1rem;
}

#topContributorCard {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Family member colors for events and tasks */
.mom-item {
  border-left: 4px solid #ff6b6b;
}

.dad-item {
  border-left: 4px solid #4ecdc4;
}

.nanny-item {
  border-left: 4px solid #ffbe0b;
}

.housekeeper-item {
  border-left: 4px solid #8a2be2;
}

.family-item {
  border-left: 4px solid #3a86ff;
}

.unassigned-item {
  border-left: 4px solid #ced4da;
}

/* Table row hover effect */
.table-hover tbody tr:hover {
  background-color: rgba(0,123,255,0.1);
}

/* Calendar and Task Controls Bar Styling */
.calendar-controls-bar,
.task-controls-bar {
  background-color: #f8f9fa !important;
  border-bottom: 1px solid #dee2e6;
}

.calendar-controls-bar .btn-group,
.task-controls-bar .btn-group {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.calendar-controls-bar .form-select,
.task-controls-bar .form-select {
  border: 1px solid #ced4da;
}

/* Calendar Content Area */
.calendar-content-area {
  min-height: 600px;
}

.task-content-area {
  min-height: 600px;
}

/* Calendar styling */
#calendarContainer {
  min-height: 500px;
  border: none !important;
}

#taskCalendarView {
  border: none !important;
}

/* Calendar Grid View (Month View) */
.calendar-grid {
  margin-bottom: 20px;
}

.calendar-header div {
  font-weight: bold;
}

.calendar-day {
  min-height: 100px;
  border: 1px solid #dee2e6;
  padding: 5px;
  position: relative;
}

.calendar-day.today {
  background-color: #f8f9fa;
  border: 2px solid #0d6efd;
}

.calendar-day.prev-month,
.calendar-day.next-month {
  background-color: #f8f9fa;
  color: #adb5bd;
}

.day-header {
  margin-bottom: 5px;
}

.day-number {
  font-weight: bold;
}

.event-indicator {
  margin-bottom: 2px;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  background-color: rgba(0, 123, 255, 0.1);
}

.event-indicator:hover {
  background-color: rgba(0, 123, 255, 0.2);
}

.more-events {
  text-align: center;
  color: #6c757d;
  margin-top: 5px;
}

/* Week View */
.week-view {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  min-height: 600px;
}

.day-column {
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.day-column.today {
  background-color: #f8f9fa;
  border: 2px solid #0d6efd;
}

.day-header {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid #dee2e6;
  background-color: #f8f9fa;
}

.day-events {
  padding: 10px;
  overflow-y: auto;
  max-height: 600px;
}

.event-card {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 4px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-time {
  font-weight: bold;
  font-size: 0.9rem;
}

.event-title {
  font-weight: bold;
  margin: 5px 0;
}

.event-description {
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: #6c757d;
}

.event-assigned {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 5px;
}

.event-actions {
  text-align: right;
}

.no-events {
  padding: 20px;
  color: #6c757d;
}

/* Calendar navigation buttons */
#prevBtn, #nextBtn {
  width: 40px;
}

/* Day View */
.day-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 600px;
}

.time-slot {
  display: flex;
  border-bottom: 1px solid #dee2e6;
  padding: 10px 0;
}

.time-label {
  width: 100px;
  text-align: right;
  padding-right: 15px;
  font-weight: bold;
  color: #6c757d;
}

.time-events {
  flex-grow: 1;
  padding-left: 15px;
  border-left: 1px solid #dee2e6;
}

/* Task list styling */
#taskList {
  max-height: 500px;
  overflow-y: auto;
}

.completed-task {
  text-decoration: line-through;
  opacity: 0.7;
}

.task-checkbox {
  cursor: pointer;
  width: 1.2rem;
  height: 1.2rem;
}

.task-checkbox:checked ~ .form-check-label {
  text-decoration: line-through;
  opacity: 0.7;
}

/* Task table styles */
#taskTable {
  font-size: 0.9rem;
}

#taskTable .editable-content {
  cursor: pointer;
  min-height: 1.5rem;
  padding: 0.25rem 0;
  border-radius: 3px;
  transition: background-color 0.2s;
}

#taskTable .editable-content:hover {
  background-color: #f8f9fa;
}

#taskTable .edit-input {
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid #007bff;
}

#taskTable .edit-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.table-action-buttons {
  white-space: nowrap;
}

.table-action-buttons .btn {
  padding: 0.25rem 0.5rem;
  margin: 0 1px;
}

/* Row editing state */
#taskTable tr.editing {
  background-color: #fff3cd;
}

/* Bulk selection */
#selectAllTasks {
  cursor: pointer;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
  #taskTable {
    font-size: 0.8rem;
  }
  
  .table-action-buttons .btn {
    padding: 0.2rem 0.4rem;
  }
}

/* Task table priority indicators */
#taskTable .priority-high {
  border-left: 3px solid #dc3545;
}

#taskTable .priority-medium {
  border-left: 3px solid #ffc107;
}

#taskTable .priority-low {
  border-left: 3px solid #0d6efd;
}

/* Completed task styling in table */
#taskTable .completed-task {
  opacity: 0.7;
}

#taskTable .completed-task .editable-content {
  text-decoration: line-through;
}

/* Calendar navigation header styling */
.calendar-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.calendar-nav-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.calendar-nav-btn {
  border: 1px solid #ced4da;
  background-color: white;
  color: #495057;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.calendar-nav-btn:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.calendar-nav-btn.today {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: white;
}

.calendar-nav-title {
  margin: 0;
  font-weight: 600;
  color: #495057;
  text-align: center;
  flex-grow: 1;
}

.quick-date-select {
  margin-left: 0.5rem;
}

.quick-date-input {
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.view-period-indicator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: #6c757d;
  margin-left: 0.5rem;
}

.view-period-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #0d6efd;
}

/* Task Calendar Styles */
.task-calendar-day {
  min-height: 120px;
}

/* Responsive calendar navigation */
@media (max-width: 768px) {
  .calendar-nav-header {
    flex-direction: column;
    text-align: center;
  }
  
  .calendar-nav-title {
    order: -1;
    margin-bottom: 0.5rem;
  }
  
  .quick-date-select,
  .view-period-indicator {
    margin-left: 0;
    margin-top: 0.25rem;
  }
  
  .calendar-nav-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }
}

.task-indicator {
  margin-bottom: 2px;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  background-color: rgba(0, 123, 255, 0.1);
  border-left: 2px solid #007bff;
}

.task-indicator:hover {
  background-color: rgba(0, 123, 255, 0.2);
}

.task-indicator.priority-high {
  border-left-color: #dc3545;
  background-color: rgba(220, 53, 69, 0.1);
}

.task-indicator.priority-medium {
  border-left-color: #ffc107;
  background-color: rgba(255, 193, 7, 0.1);
}

.task-indicator.priority-low {
  border-left-color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.1);
}

.task-indicator.completed-task {
  opacity: 0.6;
  text-decoration: line-through;
}

.more-tasks {
  text-align: center;
  color: #6c757d;
  margin-top: 5px;
  font-size: 0.75rem;
}

/* Task Week View */
.task-card {
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 4px;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-left: 3px solid #007bff;
}

.task-card.priority-high {
  border-left-color: #dc3545;
}

.task-card.priority-medium {
  border-left-color: #ffc107;
}

.task-card.priority-low {
  border-left-color: #0d6efd;
}

.task-card.completed-task {
  opacity: 0.7;
}

.task-card.completed-task .task-title {
  text-decoration: line-through;
}

.task-priority {
  margin-bottom: 5px;
}

.task-title {
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 3px;
}

.task-assignee {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 5px;
}

.task-status {
  margin-bottom: 5px;
}

.task-actions {
  text-align: right;
}

.no-tasks {
  padding: 20px;
  color: #6c757d;
  font-size: 0.9rem;
}

/* Task Day View */
.day-view-tasks {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 400px;
}

.task-day-card {
  padding: 15px;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-left: 4px solid #007bff;
}

.task-day-card.priority-high {
  border-left-color: #dc3545;
}

.task-day-card.priority-medium {
  border-left-color: #ffc107;
}

.task-day-card.priority-low {
  border-left-color: #0d6efd;
}

.task-day-card.completed-task {
  opacity: 0.8;
}

.task-day-card.completed-task .task-day-title h5 {
  text-decoration: line-through;
}

.task-day-title h5 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.task-day-badges .badge {
  font-size: 0.75rem;
}

.task-day-info {
  flex-grow: 1;
}

.task-day-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-day-actions .form-check {
  margin-bottom: 0;
}

.task-day-actions .task-checkbox {
  width: 1.2rem;
  height: 1.2rem;
}

/* Calendar navigation for tasks */
#taskCalendarControls .btn-group {
  display: flex;
}

#taskCalendarControls .btn {
  flex: 1;
}

/* Calendar list view styles */
#calendarEventList {
  max-height: 500px;
  overflow-y: auto;
}

.event-item {
  transition: all 0.2s ease;
}

.event-item:hover {
  background-color: #f8f9fa;
}

.event-details h5 {
  margin-bottom: 0.5rem;
}

.event-details p {
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.event-actions {
  display: flex;
  gap: 5px;
}

/* Calendar table styles */
#calendarEventsTable {
  font-size: 0.9rem;
}

#calendarEventsTable .editable-content {
  cursor: pointer;
  min-height: 1.5rem;
  padding: 0.25rem 0;
  border-radius: 3px;
  transition: background-color 0.2s;
}

#calendarEventsTable .editable-content:hover {
  background-color: #f8f9fa;
}

#calendarEventsTable .edit-input {
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid #007bff;
}

#calendarEventsTable .edit-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.event-row {
  transition: background-color 0.2s;
}

.event-row:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

/* Event row family member colors */
.event-row.mom-item {
  border-left: 3px solid #ff6b6b;
}

.event-row.dad-item {
  border-left: 3px solid #4ecdc4;
}

.event-row.nanny-item {
  border-left: 3px solid #ffbe0b;
}

.event-row.housekeeper-item {
  border-left: 3px solid #8a2be2;
}

.event-row.family-item {
  border-left: 3px solid #3a86ff;
}

/* Calendar view controls */
#calendarViewControls .btn-group {
  display: flex;
}

#calendarViewControls .btn {
  flex: 1;
}

/* Select all events */
#selectAllEvents {
  cursor: pointer;
}

/* Responsive adjustments for calendar table */
@media (max-width: 768px) {
  #calendarEventsTable {
    font-size: 0.8rem;
  }
  
  .table-action-buttons .btn {
    padding: 0.2rem 0.4rem;
  }
  
  /* Stack controls on mobile */
  .calendar-controls-bar .row,
  .task-controls-bar .row {
    flex-direction: column;
  }
  
  .calendar-controls-bar .col-lg-3,
  .calendar-controls-bar .col-lg-6,
  .calendar-controls-bar .col-md-4,
  .task-controls-bar .col-lg-3,
  .task-controls-bar .col-lg-6,
  .task-controls-bar .col-md-4 {
    margin-bottom: 0.5rem;
  }
  
  /* Make buttons smaller on mobile */
  .calendar-controls-bar .btn-sm,
  .task-controls-bar .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

/* Table filter row styling */
.table-filter-row {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.table-filter-row th {
  padding: 0.5rem 0.25rem;
  vertical-align: middle;
}

.table-filter {
  font-size: 0.8rem;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
}

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

/* Clear filters button */
#clearTaskFilters {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

#clearTaskFilters:hover {
  background-color: #6c757d;
  border-color: #6c757d;
  color: white;
}

/* Table filter status */
#tableFilterStatus {
  margin-top: 0.5rem;
  font-style: italic;
}

/* Responsive table filter adjustments */
@media (max-width: 768px) {
  .table-filter {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
  
  .table-filter-row th {
    padding: 0.3rem 0.15rem;
  }
  
  #clearTaskFilters {
    font-size: 0.7rem;
    padding: 0.2rem 0.3rem;
  }
}

/* Show/hide filter row based on task view */
#taskTableContainer.d-none #taskTableFilterRow {
  display: none;
}

#taskTableContainer:not(.d-none) #taskTableFilterRow {
  display: table-row;
}

/* Location Management Styles */
.location-item {
  transition: background-color 0.2s;
}

.location-item:hover {
  background-color: #f8f9fa;
}

.location-edit-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.location-name {
  display: inline-block;
  min-width: 100px;
  transition: all 0.2s ease;
}

.editable-location {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  border: 2px dashed transparent;
  background-color: #f8f9fa;
  position: relative;
}

.editable-location:hover {
  background-color: #e9ecef;
  border-color: #ced4da;
}

.editable-location.editing {
  background-color: #fff;
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  cursor: text;
}

.editable-location.editing:focus {
  outline: none;
}

.location-edit-hint {
  font-size: 0.75rem;
  color: #6c757d;
  font-style: italic;
  margin-left: 8px;
}

.location-edit-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.location-edit-actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  line-height: 1;
}

.location-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

.location-actions .btn {
  padding: 0.25rem 0.5rem;
}

/* Add visual indicators for editable state */
.editable-location::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background-color: #0d6efd;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
}

.editable-location:hover::before {
  opacity: 0.7;
}

.editable-location.editing::before {
  opacity: 1;
}

/* Responsive adjustments for location management */
@media (max-width: 768px) {
  .location-item .d-flex {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .location-actions {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: flex-end;
  }
  
  .location-info {
    width: 100%;
  }
  
  .location-edit-container {
    width: 100%;
    justify-content: space-between;
  }
  
  .location-edit-actions {
    flex-shrink: 0;
  }
}

/* Smooth transitions for edit mode */
.location-edit-actions {
  transition: all 0.3s ease;
}

.location-edit-actions.d-none {
  opacity: 0;
  transform: scale(0.8);
}

.location-edit-actions:not(.d-none) {
  opacity: 1;
  transform: scale(1);
}

/* Gear icon button styling */
.input-group .btn {
  border-left: 0;
}

.input-group .form-select:focus + .btn {
  border-color: #86b7fe;
}

/* Manage locations button styling */
#manageLocationsBtn,
#manageLocationsFromModalBtn {
  white-space: nowrap;
}

/* Location management modal styling */
#locationsModal .list-group-item {
  border-left: 3px solid transparent;
}

#locationsModal .list-group-item:hover {
  border-left-color: #0d6efd;
}

/* Family Member Styles */
.family-member-card {
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #dee2e6;
  height: 100%;
}

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

.family-member-card .card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100px;
}

.family-member-icon {
  margin-bottom: 0.25rem;
}

.family-member-card .card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  text-align: center;
}

.family-member-card .card-text {
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  text-align: center;
  line-height: 1.2;
}

.family-member-card .card-text:last-child {
  margin-bottom: 0;
}

/* Responsive grid for family member cards */
@media (min-width: 1200px) {
  .family-member-card .bi {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 1199px) {
  .family-member-card .bi {
    font-size: 1.25rem !important;
  }
}

@media (max-width: 991px) {
  .family-member-card .card-body {
    padding: 0.5rem;
    min-height: 90px;
  }
  
  .family-member-card .card-title {
    font-size: 0.8rem;
  }
  
  .family-member-card .card-text {
    font-size: 0.7rem;
  }
  
  .family-member-card .bi {
    font-size: 1rem !important;
  }
}

@media (max-width: 575px) {
  .family-member-card .card-body {
    padding: 0.4rem;
    min-height: 80px;
  }
  
  .family-member-card .card-title {
    font-size: 0.75rem;
  }
  
  .family-member-card .card-text {
    font-size: 0.65rem;
  }
  
  .family-member-card .bi {
    font-size: 0.9rem !important;
  }
}

.family-member-item {
  background-color: #f8f9fa;
  transition: all 0.2s ease;
}

.family-member-item:hover {
  background-color: #e9ecef;
}

.family-member-info h6 {
  color: #495057;
  font-weight: 600;
}

.family-member-actions {
  display: flex;
  gap: 5px;
}

.family-member-actions .btn {
  padding: 0.25rem 0.5rem;
}

/* Recommendation Filter Styles */
#activeFiltersDisplay .alert {
  margin-bottom: 0;
  padding: 0.75rem;
}

.recommendation-card {
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #dee2e6;
}

.recommendation-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.recommendation-card .card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #495057;
}

.recommendation-card .card-text {
  color: #6c757d;
  line-height: 1.4;
}

.recommendation-card .list-group-item {
  background-color: transparent;
  border: none;
  border-bottom: 1px solid #f8f9fa;
  padding: 0.5rem 0;
}

.recommendation-card .list-group-item:last-child {
  border-bottom: none;
}

/* Category-specific styling for recommendation cards */
.recommendation-card.border-info {
  border-left: 4px solid #0dcaf0;
}

.recommendation-card.border-success {
  border-left: 4px solid #198754;
}

.recommendation-card.border-warning {
  border-left: 4px solid #ffc107;
}

.recommendation-card.border-primary {
  border-left: 4px solid #0d6efd;
}

.recommendation-card.border-secondary {
  border-left: 4px solid #6c757d;
}

.recommendation-card.border-danger {
  border-left: 4px solid #dc3545;
}

/* Responsive adjustments for family members */
@media (max-width: 768px) {
  .family-member-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .family-member-actions {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: flex-end;
  }
  
  .recommendation-card .card-title {
    font-size: 0.9rem;
  }
  
  .recommendation-card .card-text {
    font-size: 0.85rem;
  }
}

/* Responsive adjustments for location management */
@media (max-width: 768px) {
  .location-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .location-actions {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: flex-end;
  }
  
  .location-info {
    width: 100%;
  }
}
