@import url("./infoboard.css");
@import url("./responsive.css");

.tasks {
  flex: 1;
  padding: 34px;
  overflow-y: auto;
}

.tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 34px;
}

.tasks-header h1 {
  font-size: 34px;
  margin-bottom: 8px;
}

.tasks-header p {
  color: #6b7280;
}

.date-panel {
  background: white;
  padding: 22px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.date-panel label {
  font-weight: 700;
  color: #334155;
}

.date-panel input {
  padding: 13px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #f8fafc;
  font: inherit;
}

.tasks-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.panel {
  background: white;
  padding: 26px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.panel-header h2 {
  font-size: 22px;
}

.admin-edit-btn {
  padding: 10px 14px;
  border-radius: 10px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
}

.admin-edit-btn:hover {
  background: #fecaca;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  background: #f8fafc;
  border-left: 4px solid #2563eb;
  border-radius: 12px;
  cursor: pointer;
}

.check-item input {
  width: 20px;
  height: 20px;
  accent-color: #2563eb;
}

.check-item span {
  font-weight: 600;
  color: #334155;
}

.comment-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.comment-box textarea {
  min-height: 110px;
  resize: vertical;
  padding: 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #f8fafc;
  font: inherit;
}

.comment-box textarea:focus,
.date-panel input:focus {
  outline: none;
  border-color: #2563eb;
  background: white;
}

.save-panel {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
}

.save-btn {
  padding: 15px 22px;
  border-radius: 12px;
  background: #2563eb;
  color: white;
  font-weight: 800;
}

.save-btn:hover {
  background: #1d4ed8;
}

.task-header-info {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  flex-wrap: wrap;

  margin-bottom: 28px;
}

.date-box,
.employee-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.date-box label,
.employee-box label {
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
}

.employee-name {
  min-width: 240px;

  padding: 13px 16px;

  border-radius: 12px;

  background: #f8fafc;
  border: 1px solid #dbeafe;

  color: #0f172a;
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);

  display: none;
  align-items: center;
  justify-content: center;

  padding: 24px;
  z-index: 9999;
}

.modal.show {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;

  background: white;
  padding: 26px;
  border-radius: 20px;

  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 22px;
}

.modal-header h2 {
  font-size: 22px;
}

#close-task-edit-modal {
  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background: #f1f5f9;
  color: #0f172a;

  font-size: 24px;
  font-weight: 900;
}

#close-task-edit-modal:hover {
  background: #e2e8f0;
}

.task-edit-list {
  display: flex;
  flex-direction: column;
  gap: 10px;

  margin-bottom: 18px;
}

.task-edit-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;

  padding: 12px;

  background: #f8fafc;
  border-radius: 12px;
}

.task-edit-item input {
  width: 100%;

  padding: 11px 12px;

  border: 1px solid #d1d5db;
  border-radius: 10px;

  background: white;
  font: inherit;
}

.remove-task-btn {
  padding: 10px 12px;
  border-radius: 10px;

  background: #ef4444;
  color: white;

  font-weight: 800;
}

.remove-task-btn:hover {
  background: #dc2626;
}

.task-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;

  margin-bottom: 18px;
}

.task-add-row input {
  padding: 12px;

  border: 1px solid #d1d5db;
  border-radius: 10px;

  background: #f8fafc;
  font: inherit;
}

#add-task-btn,
#save-task-template-btn {
  padding: 12px 16px;
  border-radius: 10px;

  background: #2563eb;
  color: white;

  font-weight: 800;
}

#add-task-btn:hover,
#save-task-template-btn:hover {
  background: #1d4ed8;
}

#save-task-template-btn {
  width: 100%;
}

@media (max-width: 1000px) {
  .tasks-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .tasks {
    padding: 22px;
  }

  .tasks-header,
  .date-panel,
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .save-panel {
    justify-content: stretch;
  }

  .save-btn {
    width: 100%;
  }
}
