@import url("https://fonts.googleapis.com/css2?family=Libre+Franklin:ital,wght@0,100..900;1,100..900&display=swap");
* {
  margin: 0;
  font-family: "Libre Franklin", sans-serif;
  font-size: 14px;
}
body {
  background-color: #f3f3f3;
}
.bg-jc {
  background-color: #00263e;
}
.btn-jc {
  background-color: #00263e !important;
  color: white !important;
}
.btn-delete {
  color: white !important;
}
.btn-add i,
.btn-edit i {
  font-size: 18px;
}
#main {
  margin-top: 8vh;
}
/* css header  */
header {
  color: white;
  position: fixed;
  width: 100%;
  z-index: 1000;
  height: 8vh;
}
header .navbar-brand {
  margin: 0 auto;
}
header .navbar-nav {
  margin: 0 auto;
}
header .navbar-nav .nav-item .login {
  border: 1px solid;
  border-radius: 5px;
  background: #00263e;
  color: white !important;
  font-weight: 500;
  padding: 8px 20px;
}
header .navbar-brand img {
  max-width: 400px;
}
header .navbar-nav .nav-item .nav-link,
header .navbar-text .nav-link {
  text-transform: uppercase;
  font-weight: 600;
  color: #00263e;
}

/* end header  */
/* CSS filter  */
.chart-filter {
  /* width: 40%; */
  padding: 12px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-family: "Montserrat", sans-serif;
}
.chart-filter input[type="checkbox"],
.chart-filter input[type="radio"] {
  display: none; /* Ẩn input gốc */
}

.chart-filter label {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 5px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chart-filter input[type="radio"]:checked + label,
.chart-filter input[type="checkbox"]:checked + label {
  background: #00263e;
  color: #fff;
  border-color: #000;
  box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.chart-filter label:hover {
  background: #f0f0f0;
  border-color: #aaa;
}

.filter-checkbox {
  margin-top: 10px;
}


/* End filter  */

h1 {
  font-size: 1.5rem;
}

fieldset {
  border: none;
  padding: 0.5rem;
}

fieldset label {
  margin-right: 10px;
}

form button {
  width: 70px;
  height: 50px;
}

select {
  font-size: 1.2rem;
  padding: 0.2rem 0.2rem;
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.05);
}

input {
  padding: 10px 5px;
  border: 1px solid #ededed;
  border-radius: 5px;
  transition: 0.2s ease-out;
}

input:focus {
  outline-color: #0095e4;
}

button:hover {
  cursor: pointer;
}

.title {
  text-align: center;
  margin-bottom: 20px;
}


#gantt-grid-container {
  display: grid;
  grid-template-columns: 150px 60px 1fr;
  background-color: white;
}

#gantt-grid-container,
#settings > fieldset,
#add-department,
#add-task,
#add-task-duration {
  border-radius: 5px;
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.05);
}

#settings fieldset {
  padding: 5px 20px ;
}
@media (max-width: 991.98px) { 
  #settings fieldset {
    margin-top: 8px;
    width: 50%;
    text-align: center;
  }
}
@media (max-width: 767.98px) {
  #settings fieldset {
    padding: 5px 10px ;
  }
}

#gantt-grid-container__time {
  display: grid;
  overflow-x: auto;
}
.gantt-task-department {
  background: #f5efe7;
}

.gantt-task-row {
  text-align: center;
  grid-column: 1/-1;
  width: 100%;
  border: none;
  align-content: center;
}

.gantt-task-row button {
  border: none;
}

.gantt-task-row input {
  width: 100px;
  border: none;
  outline: none;
  background: none;
  padding: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#gantt-grid-container__tasks button {
  color: #2a2a2a;
  background: none;
  border-radius: 5px;
  height: 20px;
  transition: all 0.2s ease;
}

#gantt-grid-container__tasks button:focus {
  outline: none;
  transform: scale(1.3);
}

#gantt-grid-container__tasks .gantt-task-row {
  padding: 2px 0;
}

.gantt-time-period {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(30px, 1fr);
  text-align: center;
}

.gantt-time-period span {
  margin: auto;
}

.gantt-time-period-cell-container {
  grid-column: 1/-1;
  display: grid;
}

.gantt-time-period-cell {
  position: relative;
}
.day-cell {
  border-left: none;
  border-right: 1px solid #f1f1f1;
  outline: none !important;
}
.day-cell:first-child {
  border-left: 1px solid #f1f1f1;
}
.day-cell:last-child {
  border-right: 1px solid #f1f1f1;
}

.day {
  color: #bbb;
}

#settings {
  display: flex;
  align-items: center;
  font-size: 14px;
  padding-bottom: 0.5rem;
  /* float: right; */
}

.taskDuration {
  position: absolute;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(158, 221, 255, 1) 0%,
    rgba(0, 149, 228, 1) 100%
  );
  /*border-radius: 5px;*/
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.05);
  cursor: move;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskDuration:focus {
  outline: 1px solid black;
  z-index: 2;
}
.taskDuration:hover {
  z-index: 2;
}

.dragging {
  opacity: 0.5;
}

#add-forms-container {
  display: flex;
  flex-wrap: wrap;
  padding: 1rem 0;
  justify-content: space-between;
}

#add-forms-container form {
  padding: 1rem;
}

#add-task-duration .inner-form-duration-container div {
  margin-bottom: 10px;
}

#add-department,
#add-task,
#add-task-duration {
  margin-right: 10px;
  margin-bottom: 10px;
}

#add-forms-container button:hover,
#add-forms-container button:focus {
  opacity: 0.85;
}

input[type="text"],
select {
  padding: 5px 7px;
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  /* font-family: 'Montserrat', sans-serif; */
  font-size: 13px;
}

#add-forms-container button {
  color: white;
  background: #2ade3c;
  font-size: 1.1rem;
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.05);
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 5px;
  transition: all 0.3s ease;
  /* font-family: 'Montserrat', sans-serif; */
  font-size: 13px;
}

.inner-form-container {
  display: flex;
  flex-direction: row;
}

.inner-form-container h1 {
  margin-bottom: 0.5rem;
}

.bottom-border {
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.05);
}

/* Form add project & add task  */
/* Container styles */
#add-forms-container {
  padding: 2rem;
  background-color: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* Form styles chung cho tất cả các form */
#add-forms-container form,
.modal-dialog form {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

/* Form heading styles */
#add-forms-container form h1,
.modal-dialog form h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #343a40;
  font-weight: bold;
  text-align: center;
}

/* Input và select styles chung */
#add-forms-container form input[type="text"],
#add-forms-container form input[type="date"],
#add-forms-container form input[type="color"],
#add-forms-container form input,
.modal-dialog form input[type="text"],
.modal-dialog form input[type="date"],
.modal-dialog form select,
.modal-dialog form input[type="color"]
{
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ced4da;
  border-radius: 5px;
  font-size: 1rem;
  background-color: #f8f9fa;
}

#duration-modal-task-show ,
#modal-task-show {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ced4da;
  border-radius: 5px;
  font-size: 1rem;
  background-color: #dbdbdb;
  color: black;
  font-weight: 500;
}

.modal_task {
  max-width: 800px;
}

/* Label styles */
.modal .update-task,
.modal .add-task {
  max-width: 50%;
}
@media (max-width: 1199.98px) {
  .modal .update-task,
  .modal .add-task {
    max-width: 80%;
  }
}

@media (max-width: 575.98px) {
  .modal .update-task,
  .modal .add-task {
    max-width: 90%;
    margin: 0 auto;;
  }
}


#add-forms-container form label,
.modal-dialog form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #495057;
}

/* Button styles */
#add-forms-container form button,
.modal-dialog form button {
  width: 100%;
  padding: 0.75rem;
  /* background-color: #007bff; */
  color: #ffffff;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.modal-dialog form .btn-save{
  background-color: #0d720f;
}

.modal-dialog form .btn-delete{
  background-color: #970000;
}


#add-forms-container form button:hover {
  background-color: #0056b3;
}

/* Inner duration container */
#add-forms-container .inner-form-duration-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

#add-forms-container .inner-form-duration-container div {
  flex: 1;
  min-width: 200px;
}

/* Responsive */
@media (max-width: 768px) {
  #add-forms-container .inner-form-duration-container {
    flex-direction: column;
  }

  #add-forms-container form {
    padding: 1rem;
  }

  #add-forms-container form h1 {
    font-size: 1.25rem;
  }

  #add-forms-container form button {
    font-size: 0.9rem;
  }
}

/* END form add project & add task  */

/* tooltip  */
/* Tooltip */
.custom-tooltip {
  position: fixed;
  display: none;
  background: white;
  color: #333;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 15px;
  z-index: 1000;
  width: 300px;
  transform: translateX(10px); /* Offset sang phải */
}

.custom-tooltip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -8px;
  transform: translateY(-50%) rotate(45deg);
  width: 16px;
  height: 16px;
  background: white;
  box-shadow: -2px -2px 2px rgba(0, 0, 0, 0.1);
}

.tooltip-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.tooltip-date {
  color: #666;
  font-size: 14px;
  margin-bottom: 10px;
}

.tooltip-user {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.tooltip-user img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 10px;
}

.tooltip-user-name {
  font-size: 14px;
}

.tooltip-status {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.tooltip-status-icon {
  width: 12px;
  height: 12px;
  background: yellow;
  border-radius: 50%;
  margin-right: 5px;
}
