@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap");

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
  height: 100vh;
  margin: 0;
  padding: 0;
  font-family: "Montserrat", sans-serif;
  background-color: #2b2727; 
  color: #e0e0e0; 
  line-height: 1.6;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  margin: 0;
  padding: 0; 
  box-sizing: border-box;
}

.project-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #222;
  border: 1px solid #444;
  padding: 1em;
  margin: 0.5em 0;
  border-radius: 6px;
  color: #fff;
}

.rich-text-input {
  border: 1px solid #ccc;
  padding: 10px;
  min-height: 20px;
  max-height: 600px;
  overflow-y: auto;
}

.container {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%; 
}

.sections-container {
  flex: 1 1 auto;
  display: flex;
  gap: 15px;
  width: 100%;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 0 10px;
  min-height: 0;
  overflow: hidden;
  height: 100%; 
}

.section-column {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%; 
  border: 1px solid transparent;
  overflow: hidden; 
}

.section-header {
    font-size: 1.5rem;
    color: #8ab4f8; 
    margin-bottom: 5px;
    text-align: center;
    font-weight: 600;
}

.works-list {
  overflow-y: auto; 
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px;
  background: #1e1e1e;
  border-radius: 12px;
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.1);
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #4f46e5 #2a2a2a;
}

.works-list::-webkit-scrollbar {
  width: 8px;
}
.works-list::-webkit-scrollbar-thumb {
  background-color: #4f46e5;
  border-radius: 12px;
}
.works-list::-webkit-scrollbar-track {
  background-color: #2a2a2a;
}

.works-grid-column {
  flex: 1 1 0;      
  min-width: 0;     
  display: flex;
  flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 10px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #8ab4f8; 
    margin-top: 5px;
}

.header p {
    font-size: 1.1rem;
    color: #b0b0b0;
}

.controls {
    background-color: #222222;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.7);
    padding: 8px;
    margin-bottom: 30px;
}

.controls-container {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.add-btn {
    background-color: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.toolbar button {
  font-weight: bold;
  margin-right: 5px;
  background-color: #4f46e5;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Times New Roman', Times, serif;
}

.toolbar button:hover {
  background-color: #3c3aba;
}

.custom-color-btn {
  background: #444;
  color: white;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  user-select: none;
}

#colorPicker {
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
  cursor: pointer;
  user-select: none;
  display: inline;
}

.custom-color-btn:hover {
  background-color: #666;
}

.add-btn:hover {
    background-color: #3c3aba;
}

.edit-btn {
    color: #8ab4f8;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s;
}

.edit-btn:hover {
    color: #5a6edb;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    html, body {
      height: 100%;
      overflow-y: auto; 
    }

    .works-list {
      overflow-y: hidden;
    }

}

@media (min-width: 1024px) {
    .works-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .works-list {
      overflow-y: auto;
    }

}

.work-card {
  background-color: #2a2a2a;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.7);
  overflow-x: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  width: 100%;
  user-select: none;
  cursor: grab; 
}

.work-card ul {
  list-style-type: disc;
  margin-left: .5rem; 
  padding-left: 1rem;
}

.work-card li {
  margin-bottom: 0.4rem;
}


.work-card:active {
    cursor: grabbing;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.7);
}

.work-content {
    padding: 20px;
}

#workContent ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

#workContent li {
  margin-bottom: 0.3rem;
}


.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.work-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #e0e0e0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80%;
}

.work-actions {
  display: flex;
  gap: 10px;
}

.work-text {
  white-space: pre-line;
  overflow-wrap: break-word;
  max-height: 150px;
  overflow-y: auto;
}

.work-text li {
  line-height: 1.4;
}

.work-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  position: absolute;
  bottom: 10px;
}

.work-date {
  background-color: #e0f7fa; 
  color: #006064;           
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8em;
  display: inline-block;
  margin-top: 8px;
  user-select: none;
}


.delete-project-btn {
  background-color: #ff4d4d;
  border: none;
  color: white;
  padding: 10px 20px;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  transition: background-color 0.2s;
}

.delete-project-btn:hover {
  background-color: #cc0000;
}


.delete-btn {
    color: #999;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s;
}

.delete-btn:hover {
    color: #ef4444;
}

.delete-confirmation {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #ff4d4d;
  background-color: #ffe6e6;
  border-radius: 5px;
  font-size: 0.9rem;
  color: #b30000;
}

.delete-confirmation p {
  margin: 0 0 10px 0;
}

.confirmation-buttons-inline {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.confirmation-text {
    padding: 10px;
}

.confirm-btn {
  background-color: #ff4d4d;
  border: none;
  color: white;
  padding: 5px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.confirm-btn:hover {
  background-color: #cc0000;
}

.cancel-btn {
  background-color: #999999;
  border: none;
  color: white;
  padding: 5px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cancel-btn:hover {
  background-color: #666666;
}






.empty-state {
    text-align: center;
    padding: 60px 20px;
    opacity: 0.6;
    display: none;
}

.empty-state i {
    font-size: 4rem;
    color: #555;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #999;
    margin-bottom: 10px;
}

.empty-state p {
    color: #777;
    margin-bottom: 20px;
}







.model-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(18, 18, 18, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.model-overlay.active {
  opacity: 1;
  visibility: visible;
}

.model {
    background-color: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
    width: 100%;
    max-width: 500px;
    margin: 20px;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.model-overlay.active .model {
    transform: translateY(0);
}

.model-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #333;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.model-close {
  background: transparent;  
  border: none;             
  color: white;             
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 0.3s;
  padding: 0;            
  line-height: 1;           
}

.model-close:hover {
  color: #ddd;  
}

.modal-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
}

.form-group label {
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 1rem;
  font-weight: 600;
}


.form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  color: white;
  background-color: #4f46e5;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background-color: #4f46e5;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.submit-btn:hover {
  background-color: #4338ca;
}

.cancel-btn {
      background-color: #e5e7eb;
      color: #333;
      border: none;
}

.cancel-btn:hover {
  background-color: #d1d5db;
}


.confirmation-text {
  font-size: 1.1rem;
  margin-bottom: 25px;
}

.confirmation-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.confirmation-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.confirm-btn {
  background-color: #ef4444;
  color: white;
}

.confirm-btn:hover {
  background-color: #dc2626;
}

.cancel-btn {
  background-color: #555;
  color: #e0e0e0;
}

.cancel-btn:hover {
  background-color: #444;
}

.placeholder-card {
  background: #333;
  border: 2px dashed #666;
  min-height: 100px;
  margin-bottom: 20px;
}
.drag-over {
  background: #444;
}

.status-badge {
  background-color: #555;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  display: inline-block;
  min-width: 70px;
  text-align: center;
  user-select: none;
}

.due-date-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  background-color: #4f46e5; 
  color: white;
  user-select: none;
  text-transform: none;
}
.work-footer .created-date {
  font-style: italic;
  font-size: 0.75rem;
  color: #666;
}

.project-button {
  flex-grow: 1;
  padding: 14px 20px;
  font-size: 16px;
  background-color: #1e88e5;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.project-button:hover {
  background-color: #1565c0;
}

.project-card .project-actions button {
  background-color: #0e0e2c;
  color: #008cff;
  padding: 12px 20px;
  border: 2px solid;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
}

.project-actions {
  display: flex;
  gap: 8px;
}

.project-actions button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #888; /* neutral gray */
  transition: color 0.2s ease;
}

.project-actions button:hover {
  color: #000;
}

.project-actions .delete-btn:hover {
  color: #e53935; /* red on hover */
}


.status-not-started { background: #dc2626; } /* red */
.status-in-progress { background: #fbbf24; } /* yellow */
.status-completed   { background: #16a34a; } /* green */

@keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}