/* === Reset & Base === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: #f4faff;
    color: #2b2b2b;
    padding: 20px;
}

body.dark {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark #datetime {
    color: white;
}

body.dark .task {
    background-color: #1e1e1e;
    /* border-color: #333; */
}

body.dark .task p {
    color: white;
}

body.dark #completedTasks .task {
    background: #2a2a2a;
}

body.dark .task h3 {
    color: white;
}

body.dark .task-menu {
    background: #2a2a2a;
}

body.dark .deadline {
    color: #ff8a80;
}

body.dark .completed-at {
    color: #bbb;
}

body.dark .overdue {
    background-color: #2a1212;
    border-color: #ff4d4d;
}

body.dark .tag {
    background: #3399ff;
}

body.dark .form-section,
body.dark .dashboard,
body.dark .filters,
body.dark .cloud {
    background-color: #1e1e1e;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.05);
}

body.dark .filters button,
body.dark #toggleFilters,
body.dark #toggleDashboard {
    background-color: #333;
    color: #fff;
}

body.dark .filters button:hover,
body.dark #toggleFilters:hover,
body.dark #toggleDashboard:hover {
    background-color: #555;
}

body.dark input,
body.dark select,
body.dark textarea {
    background-color: #2a2a2a;
    color: #fff;
    border-color: #444;
}

body.dark input::placeholder,
body.dark textarea::placeholder {
    color: #aaa;
}

body.dark .cloud {
    background-color: #1a1a1a;
    border: 1px solid #333;
}

body.dark .menu-toggle {
    color: white;
}

body.dark .menu-options {
    background-color: #2c2c2c;
    border: 1px solid #444;
}

body.dark .menu-options button:hover {
    background-color: #3a3a3a;
}

body.dark .share-task {
    background-color: #1e1e1e;
    border-color: #66ccff;
    color: #66ccff;
}

body.dark .share-task:hover {
    background-color: #66ccff;
    color: #000;
}

body.dark .filtersblock label {
  background-color: #2b2b2b;
  border-color: #444;
  color: #f0f0f0;
}

body.dark .filtersblock label:hover {
  background-color: #3a3a3a;
}

body.dark input[type="datetime-local"] {
    background-color: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
}

body.dark ::-webkit-scrollbar {
    width: 8px;
}

body.dark ::-webkit-scrollbar-track {
    background: #1e1e1e;
}

body.dark ::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 10px;
}

body.dark .login-content {
  background: #1e1e1e;
  color: #e0e0e0;
}
body.dark input, body.dark select {
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #555;
}

body.dark #logoutBtn {
  background: #d32f2f;
}

body.dark .progress_bar {
  background: #1e1e1e;
}

body.dark .task-progress-text {
  color: white;
}

body.dark .modal-content {
  background: #2a2a2a;
  color: #fff;
}

body.dark .developer-details {
  background: #2a2a2a;
  border-color: #444;
  color: #eee;
}

body.dark #modalDeveloperDetails {
  color: #eee;
}

body.dark #modalDeveloperDetails b {
  color: #66ccff;
}

body.dark #modalDeveloperDetails h3,
body.dark #modalDeveloperDetails h4 {
  color: #fff;
}

body.dark-mode .modal-close {
  color: #aaa;
}

body.dark-mode .modal-close:hover {
  color: #fff;
}

body.dark-mode .add-comment textarea {
  background-color: #2b2b2b;
  color: #eee;
  border: 1px solid #555;
}

body.dark .comment-count {
  color: #ccc;
}

body.dark .icon-comment {
  opacity: 0.85;
}

body.dark .mention {
  color: #90caf9;
}

#taskModal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}


/* Контейнер модального вмісту */
.modal-content-card {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  max-height: 90%;
  overflow-y: auto;
  position: relative;
}

body.dark-mode .modal-content-card {
  background-color: #1e1e1e;
  color: #ddd;
}

/* Коментарі */
/* .comment {
  border: 1px solid #ddd;
  margin: 5px 0;
  padding: 8px;
  border-radius: 5px;
} */

body.dark-mode .comment {
  background: #2a2a2a;
  border-color: #0d6efd;
}

.comment strong {
  display: block;
  margin-bottom: 5px;
  color: #222;
}

body.dark-mode .comment strong {
  color: #ddd;
}

.comment small {
  color: #666;
  font-size: 12px;
}

body.dark-mode .comment small {
  color: #aaa;
}

/* Блок додавання коментаря */
.add-comment {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
}

.task-meta-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.comment-badge-container,
.like-section {
  position: relative; /* додати */
  display: flex;
  align-items: center;
  gap: 4px;
}


.icon-comment {
  width: 32px;
  height: 32px;
}

.comment-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  background-color: red;
  color: white;
  font-size: 10px;
  font-weight: bold;
  border-radius: 50%;
  padding: 2px 5px;
  line-height: 1;
  min-width: 14px;
  text-align: center;
}

body.dark .comment-badge {
  background-color: #ffcc00;
  color: #000;
}

.add-comment textarea {
  resize: vertical;
  padding: 8px;
  min-height: 60px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
}

.add-comment button {
  margin-top: 10px;
  align-self: flex-end;
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.add-comment button:hover {
  background-color: #0056b3;
}

.comment-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.comment-count {
  font-size: 13px;
  font-weight: 500;
  color: #444;
}

.comment-card {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  background-color: var(--comment-bg, #f4f4f4);
  border-radius: 6px;
  padding: 10px;
  animation: fadeIn 0.3s ease-in-out;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: bold;
  color: white;
  background: #007acc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}

.comment-text {
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.mention {
  color: #007bff;
  font-weight: bold;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.comment-text em {
  color: #999;
  font-style: italic;
}


/* Темна тема */
body.dark .comment-card {
  background-color: #222;
  color: #eee;
}

.comment-badge.new-comment {
  background-color: #ff5252;
  color: white;
  animation: comment-pulse 1.2s ease-in-out infinite;
  border-radius: 50%;
  padding: 2px 6px;
  font-weight: bold;
}

@keyframes comment-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 82, 82, 0.7);
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(255, 82, 82, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 82, 82, 0);
  }
}

.new-comment-highlight {
  background-color: #e6f7ff;
  border-left: 4px solid #1890ff;
  animation: fadeInHighlight 0.5s ease-in-out;
}

@keyframes fadeInHighlight {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}


.comments-section {
  border-top: 1px solid #ccc;
  margin-top: 15px;
  padding-top: 10px;
}

.comment {
  margin-bottom: 10px;
  padding: 5px;
  border-left: 2px solid #ddd;
}

/* .comment-meta {
  font-size: 12px;
  color: #666;
} */

/* .comment-body {
  font-size: 14px;
} */

.add-comment textarea {
  width: 100%;
  margin-top: 5px;
}

.add-comment button {
  margin-top: 5px;
}

.comment-files {
  margin-top: 5px;
  font-size: 13px;
  color: #555;
}

.comment-files img {
  max-width: 150px;
  max-height: 100px;
  margin-right: 5px;
  border-radius: 4px;
  cursor: pointer;
}

.comment-files .comment-file-link {
  display: inline-block;
  margin-right: 5px;
  font-size: 13px;
  color: #1890ff;
  text-decoration: none;
}

.comment-files .comment-file-link:hover {
  text-decoration: underline;
}

.comment-image {
  max-width: 100px;
  max-height: 100px;
  margin-top: 5px;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.comment-image:hover {
  transform: scale(1.05);
}

.comment-image.fullsize {
  max-width: 100%;
  max-height: unset;
}

.preview-modal {
  max-width: 800px;
  max-height: 80vh;
  overflow: auto;
  background: #1e1e1e;
  color: #f8f8f2;
  border-radius: 10px;
  padding: 20px;
  position: relative;
}

.code-block {
  background: #1e1e1e;
  color: #dcdcdc;
  padding: 10px;
  border-radius: 5px;
  font-family: monospace;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
  max-height: 60vh;
}

.file-header {
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 5px;
}

#filePreviewModal {
  flex-direction: row;
    justify-content: center;
    align-items: center;
  z-index: 10010; /* вище ніж #taskModal */
}

.task-header-block {
  padding: 15px 20px;
  background: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 8px 8px 0 0;
}

.task-title {
  font-size: 1.5em;
  margin: 0;
  color: #333;
}

.task-desc {
  font-size: 1em;
  margin: 6px 0 12px;
  color: #555;
  white-space: pre-line;
}

.task-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.task-info-list li {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
  color: #444;
}

.task-info-list li span {
  font-weight: 600;
  min-width: 90px;
  display: inline-block;
  color: #222;
}

#taskModal {
  z-index: 1000;
}

.task-done {
  color: #28a745;
  font-weight: bold;
}

.task-work {
  color: #ffc107;
  font-weight: bold;
}

.task-fail {
  color: #dc3545;
  font-weight: bold;
}

.task-link {
  text-decoration: none;
  color: #007acc;
  transition: color 0.2s;
}

.task-link:hover {
  text-decoration: underline;
  color: #005b9e;
}

.task-lost {
  color: red;
  font-weight: bold;
}

.task-highlight {
  outline: 3px solid #007acc;
  animation: pulse 0.4s ease-in-out 3;
}
@keyframes pulse {
  0% { outline-offset: 0px; }
  100% { outline-offset: 5px; }
}

/* .task-highlight {
  box-shadow: 0 0 0 3px #007acc;
  animation: highlightFade 3s ease-in-out;
} */

/* @keyframes highlightFade {
  0% { box-shadow: 0 0 0 3px #007acc; }
  100% { box-shadow: none; }
} */

.task-work-gray {
  color: #999;
  font-weight: 500;
}

.task-deleted {
  color: #e74c3c;
  font-weight: bold;
}

.task-deleted-only {
  color: #e74c3c;
  font-weight: bold;
}


.developer-details {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 6px;
  font-size: 14px;
}

/* Like */

.like-tooltip {
  position: absolute;
  background: #fff;
  border: 1px solid #ddd;
  padding: 8px 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
  z-index: 999;
  font-size: 14px;
  top: 28px;
  left: 0;
  min-width: 180px;
  white-space: nowrap;
  animation: fadeIn 0.15s ease-in-out;
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-4px);}
  to {opacity: 1; transform: translateY(0);}
}

.tooltip-user {
  display: flex;
  align-items: center;
  padding: 4px 0;
  gap: 8px;
  cursor: pointer;
}

.tooltip-user:hover {
  background-color: #f9f9f9;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-role {
  font-size: 12px;
  color: #888;
}

.like-btn.liked .icon-like {
  filter: hue-rotate(-30deg) saturate(4) brightness(1.2); /* ефект активного лайку */
}

.modal {
  display: none; /* приховано за замовчуванням */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.modal-close:hover {
  color: red;
}


#modalDeveloperDetails {
  padding: 20px;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

#modalDeveloperDetails h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#modalDeveloperDetails p {
  margin: 6px 0;
}

#modalDeveloperDetails .badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 8px;
}

#modalDeveloperDetails h4 {
  margin-top: 15px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

#modalDeveloperDetails ul {
  margin-top: 8px;
  padding-left: 18px;
}

#modalDeveloperDetails li {
  margin-bottom: 4px;
}

#modalDeveloperDetails li b {
  color: #007acc;
}

#userProfileContent {
  font-family: 'Segoe UI', sans-serif;
  color: #222;
  padding: 20px;
  line-height: 1.5;
  font-size: 15px;
}

#userProfileContent h3 {
  margin-top: 0;
  font-size: 20px;
  color: #111;
}

#userProfileContent p {
  margin: 4px 0;
}

#userProfileContent strong {
  color: #000;
}

#userProfileContent hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 15px 0;
}

#userProfileContent h4 {
  margin: 10px 0 6px;
  font-size: 16px;
  color: #333;
}

#userProfileContent ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#userProfileContent ul li {
  margin-bottom: 6px;
  padding-left: 16px;
  position: relative;
}

#userProfileContent ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #555;
}

#userProfileContent .task-link {
  color: #1d71b8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

#userProfileContent .task-link:hover {
  text-decoration: underline;
  color: #105a99;
}

#userProfileContent em {
  color: #666;
  font-style: italic;
  font-size: 13px;
  margin-left: 4px;
}

.task-status {
  font-style: normal;
  font-weight: 500;
  margin-left: 6px;
}

.task-status.active {
  color: #007bff; /* синій */
}

.task-status.in-progress {
  color: #ff9800; /* оранжевий */
  font-style: italic;
}

.task-status.completed {
  color: #4caf50; /* зелений */
  font-weight: bold;
}


.badge {
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: bold;
  font-size: 0.9em;
  display: inline-block;
}

.badge-success {
  background-color: #28a745;
  color: white;
}

.badge-warning {
  background-color: #ffc107;
  color: black;
}

.badge-secondary {
  background-color: #ccc;
  color: black;
}

.developer-rating {
  margin-top: 40px;
  padding: 20px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.developer-rating table {
  width: 100%;
  border-collapse: collapse;
}

.developer-rating th,
.developer-rating td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: center;
}

.developer-rating th {
  background-color: #e3f2fd;
}

.progress_bar {
  display: flex;
  justify-content: center;
  width: 100%;
  background-color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  margin-bottom: 35px;
}

.task-progress-wrapper {
  margin: 15px 0;
  width: 100%;
  max-width: 500px;
}

.task-progress-text {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 5px;
  color: var(--text-color, #222);
}

.task-progress-bg {
  width: 100%;
  height: 15px;
  background-color: var(--bar-bg, #e0f7fa);
  border-radius: 20px;
  overflow: hidden;
}

.task-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 20px;
  background: linear-gradient(90deg, #4caf50, #00bcd4);
  transition: width 0.8s ease-in-out;
}

#logoutBtn {
  display: none;
  margin-left: auto;
  background: #f44336;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
  }
  
  .switch #input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2196f3;
    -webkit-transition: 0.4s;
    transition: 0.4s;
    z-index: 0;
    overflow: hidden;
  }
  
  .sun-moon {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: yellow;
    -webkit-transition: 0.4s;
    transition: 0.4s;
  }
  
  #input:checked + .slider {
    background-color: black;
  }
  
  #input:focus + .slider {
    box-shadow: 0 0 1px #2196f3;
  }
  
  #input:checked + .slider .sun-moon {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
    background-color: white;
    -webkit-animation: rotate-center 0.6s ease-in-out both;
    animation: rotate-center 0.6s ease-in-out both;
  }
  
  .moon-dot {
    opacity: 0;
    transition: 0.4s;
    fill: gray;
  }
  
  #input:checked + .slider .sun-moon .moon-dot {
    opacity: 1;
  }
  
  .slider.round {
    border-radius: 34px;
  }
  
  .slider.round .sun-moon {
    border-radius: 50%;
  }
  
  #moon-dot-1 {
    left: 10px;
    top: 3px;
    position: absolute;
    width: 6px;
    height: 6px;
    z-index: 4;
  }
  
  #moon-dot-2 {
    left: 2px;
    top: 10px;
    position: absolute;
    width: 10px;
    height: 10px;
    z-index: 4;
  }
  
  #moon-dot-3 {
    left: 16px;
    top: 18px;
    position: absolute;
    width: 3px;
    height: 3px;
    z-index: 4;
  }
  
  #light-ray-1 {
    left: -8px;
    top: -8px;
    position: absolute;
    width: 43px;
    height: 43px;
    z-index: -1;
    fill: white;
    opacity: 10%;
  }
  
  #light-ray-2 {
    left: -50%;
    top: -50%;
    position: absolute;
    width: 55px;
    height: 55px;
    z-index: -1;
    fill: white;
    opacity: 10%;
  }
  
  #light-ray-3 {
    left: -18px;
    top: -18px;
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: -1;
    fill: white;
    opacity: 10%;
  }
  
  .cloud-light {
    position: absolute;
    fill: #eee;
    animation-name: cloud-move;
    animation-duration: 6s;
    animation-iteration-count: infinite;
  }
  
  .cloud-dark {
    position: absolute;
    fill: #ccc;
    animation-name: cloud-move;
    animation-duration: 6s;
    animation-iteration-count: infinite;
    animation-delay: 1s;
  }
  
  #cloud-1 {
    left: 30px;
    top: 15px;
    width: 40px;
  }
  
  #cloud-2 {
    left: 44px;
    top: 10px;
    width: 20px;
  }
  
  #cloud-3 {
    left: 18px;
    top: 24px;
    width: 30px;
  }
  
  #cloud-4 {
    left: 36px;
    top: 18px;
    width: 40px;
  }
  
  #cloud-5 {
    left: 48px;
    top: 14px;
    width: 20px;
  }
  
  #cloud-6 {
    left: 22px;
    top: 26px;
    width: 30px;
  }
  
  @keyframes cloud-move {
    0% {
      transform: translateX(0px);
    }
  
    40% {
      transform: translateX(4px);
    }
  
    80% {
      transform: translateX(-4px);
    }
  
    100% {
      transform: translateX(0px);
    }
  }
  
  .stars {
    transform: translateY(-32px);
    opacity: 0;
    transition: 0.4s;
  }
  
  .star {
    fill: white;
    position: absolute;
    -webkit-transition: 0.4s;
    transition: 0.4s;
    animation-name: star-twinkle;
    animation-duration: 2s;
    animation-iteration-count: infinite;
  }
  
  #input:checked + .slider .stars {
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
    opacity: 1;
  }
  
  #star-1 {
    width: 20px;
    top: 2px;
    left: 3px;
    animation-delay: 0.3s;
  }
  
  #star-2 {
    width: 6px;
    top: 16px;
    left: 3px;
  }
  
  #star-3 {
    width: 12px;
    top: 20px;
    left: 10px;
    animation-delay: 0.6s;
  }
  
  #star-4 {
    width: 18px;
    top: 0px;
    left: 18px;
    animation-delay: 1.3s;
  }
  
  @keyframes star-twinkle {
    0% {
      transform: scale(1);
    }
  
    40% {
      transform: scale(1.2);
    }
  
    80% {
      transform: scale(0.8);
    }
  
    100% {
      transform: scale(1);
    }
  }
  

/* === Container & Header === */
.container {
    max-width: 1200px;
    margin: 0 auto;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
header h1 {
    font-size: 2rem;
    color: #007acc;
}
#datetime {
    font-size: 1rem;
    color: #555;
}

/* === Form Section === */
.form-section {
    margin-bottom: 30px;
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
#taskForm {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
#taskForm input,
#taskForm textarea,
#taskForm select,
#taskForm button {
    font-size: 1rem;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #ccc;
}
#taskForm input,
#taskForm select {
    flex: 1 1 200px;
}
#taskForm textarea {
    flex: 1 1 100%;
    min-height: 60px;
}
#taskForm button {
    background-color: #007acc;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#taskForm button:hover {
    background-color: #005f9e;
}
.filtersblock {
    display: flex;
}
.filters {
    display: flex;
    width: 80%;
    gap: 10px;
    padding: 10px 20px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.filters input,
.filters select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
}
.filters button {
    padding: 6px 12px;
    border-radius: 8px;
    background: #f44336;
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.filters button:hover {
    background: #d32f2f;
}
#toggleFilters {
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #2196f3;
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

#toggleFilters:hover {
    background: #1976d2;
}
.toggleFiltersbuttons {
    width: 20%;
}

.filters.collapsed {
    display: none;
}
.dashboard {
    background: #fff;
    margin: 20px;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.dashboard .summary > div {
    margin-bottom: 6px;
    font-weight: 500;
}
#toggleDashboard {
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #4caf50;
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

#toggleDashboard:hover {
    background: #388e3c;
}

.hidden {
    display: none !important;
}

.developers {
    font-size: 0.95rem;
    line-height: 1.5;
}

.developers strong {
    color: #007acc;
}
/* === Clouds (Task Sections) === */
.clouds {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
@media (min-width: 768px) {
    .clouds {
        flex-direction: row;
    }
}
.cloud {
    flex: 1;
    background: #eaf6ff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    height: 100%;
}
.cloud h2 {
    margin-bottom: 15px;
    color: #007acc;
}

.cloud.sticky-column {
  position: sticky;
  top: 20px;
  align-self: flex-start;
  height: fit-content !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  flex-basis: auto !important;
  min-width: 343.44px;
  max-width: 383px;
  z-index: 3;
}

/* === Tasks === */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 120px; /* 🧱 Зона доступна навіть при 0 задач */
    padding: 10px 0;   /* Простір зверху та знизу */
    transition: background-color 0.2s ease;
}
.task-list.drag-over {
    background-color: #d6ecff;
    border: 2px dashed #007acc;
    border-radius: 12px;
}
.task-list:empty::before {
    content: "🡇 Перетягни сюди задачу 🡇";
    color: #aaa;
    text-align: center;
    display: block;
    padding: 30px 0;
    font-style: italic;
    font-size: 0.95rem;
}
.placeholder {
    height: 60px;
    border: 2px dashed #007acc;
    background-color: #d6ecff;
    border-radius: 12px;
    margin: 10px 0;
    animation: fadeIn 0.2s ease-in-out;
}

.task.drag-placeholder {
  box-shadow: 0 0 0 2px #42a5f5 inset;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
.empty-drop-hint {
    text-align: center;
    color: #999;
    padding: 25px 10px;
    font-size: 0.95rem;
    font-style: italic;
    pointer-events: none;
    user-select: none;
}
.task {
    position: relative;
    z-index: 10;
    padding: 15px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: grab;
    transition: transform 0.2s;
}
.task-content {
    position: static;
}

.task-column {
  overflow-y: auto;
  max-height: calc(100vh - 120px); /* або скільки треба */
}

.comment-reactions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

emoji-picker {
  position: absolute;
  z-index: 9999;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  
}

.reaction-btn {
  background-color: #f0f0f0;
  border: none;
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reaction-btn:hover {
  background-color: #e2e2e2;
}

body.dark .reaction-btn {
  background-color: #333;
  color: #fff;
}

body.dark .reaction-btn:hover {
  background-color: #444;
}

#tasksInProgress {
    min-height: 120px;
}
.task:hover {
    transform: translateY(-2px);
    z-index: 1;
}
.task .developer {
    position: absolute;
    top: 5px;
    right: 30px;
    font-size: 0.85rem;
    font-style: italic;
    color: #007acc;
}
.dots {
    display: inline-flex;
    gap: 3px;
    margin-top: 8px;
}
.dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0.2;
    animation: blink 1.5s infinite;
}
.priority-select {
    border: none;
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: none;
}
/* Високий пріоритет — червоні крапки */
.priority-high .dots span {
    background-color: #e53935;
}
.priority-high .dots span:nth-child(1) { animation-delay: 0s; }
.priority-high .dots span:nth-child(2) { animation-delay: 0.3s; }
.priority-high .dots span:nth-child(3) { animation-delay: 0.6s; }

/* Середній — жовті */
.priority-medium .dots span {
    background-color: #fbc02d;
}
.priority-medium .dots span:nth-child(1) { animation-delay: 0s; }
.priority-medium .dots span:nth-child(2) { animation-delay: 0.3s; }
.priority-medium .dots span:nth-child(3) { animation-delay: 0.6s; }

/* Низький — зелені */
.priority-low .dots span {
    background-color: #43a047;
}
.priority-low .dots span:nth-child(1) { animation-delay: 0s; }
.priority-low .dots span:nth-child(2) { animation-delay: 0.3s; }
.priority-low .dots span:nth-child(3) { animation-delay: 0.6s; }

.dots span:nth-child(1) {
    animation-delay: 0s;
}
.dots span:nth-child(2) {
    animation-delay: 0.3s;
}
.dots span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes blink {
    0%, 80%, 100% { opacity: 0.2; }
    40% { opacity: 1; }
}
.task h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}
.task p {
    color: #555;
    font-size: 0.95rem;
    white-space: pre-line;
}
.task-menu {
    position: absolute;
    top: 6px;
    right: 8px;
}

.task.deleted {
  opacity: 0.6;
  background-color: #fce4e4;
  border-left: 4px solid red;
  position: relative;
}

.task .deleted-timer {
  font-size: 13px;
  color: #b33;
  margin-top: 6px;
}

.task .deleted-timer button {
  margin-top: 6px;
  background-color: #4caf50;
  color: white;
  padding: 4px 8px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.menu-options {
    position: absolute;
    top: 30px;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    z-index: 999;
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.menu-options.hidden {
    display: none;
}

.menu-options button {
    padding: 10px;
    background: none;
    border: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
    font-size: 0.95rem;
}

.menu-options button:hover {
    background-color: #f1f1f1;
}

@media (max-width: 576px) {
    .menu-options {
      right: auto;
      left: 0;
      top: 35px;
    }
    .menu-options button {
      font-size: 0.85rem;
      padding: 8px;
    }
  }
/* === Priority Colors === */
.priority-high {
    border-left: 6px solid #ff4d4d;
    z-index: auto;
}
.priority-medium {
    border-left: 6px solid #ffc107;
    z-index: auto;
}
.priority-low {
    border-left: 6px solid #28a745;
    z-index: auto;
}

/* === Completed Task Styling === */
#completedTasks .task {
    background: #f0f0f0;
    color: #777;
    position: relative;
}
#completedTasks .checkmark {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 1.2rem;
    color: #28a745;
}

[contenteditable="true"] {
    outline: 2px dashed #007acc;
    background-color: #f9fcff;
}

#inProgressTasks .task::before {
    content: "⏳";
    position: absolute;
    left: -24px;
    font-size: 1.1rem;
    color: #007acc;
}

.dragging-touch {
    width: 90%;
    max-width: 300px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    border-radius: 12px;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.touch-drag {
    transition: transform 0.1s ease;
    pointer-events: none;
    opacity: 0.9;
    z-index: 9999;
    position: fixed;
    top: 0;
    left: 0;
    width: 90%;
    max-width: 300px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}
.task-list.touch-over {
    border: 3px dashed #00aaff;
    background-color: #e0f7ff;
    transition: border 0.2s, background-color 0.2s;
}

.deadline {
    font-size: 0.9em;
    color: #d9534f;
    margin-top: 5px;
}

.completed-at {
    color: #999;
    font-size: 0.85rem;
    margin-top: 6px;
}

.overdue {
    border-left: 6px solid #ff4d4d !important;
    background-color: #fff2f2;
}

.task .deadline::before {
    content: "⏰ ";
}

.task.due-today {
    border-left: 6px solid #ffa500 !important;
}

.task-tags {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag {
    background: #007acc;
    color: #fff;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.75rem;
}

#tagFilter {
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

#clearTagFilter {
    margin-left: 5px;
    padding: 5px 10px;
    font-size: 14px;
}

.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    padding: 12px 18px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    min-width: 200px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.3s ease forwards;
}

.notification.success { background-color: #4caf50; }
.notification.error   { background-color: #f44336; }
.notification.info    { background-color: #2196f3; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-task {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    padding: 5px 10px;
    border: 1px solid #007acc;
    border-radius: 8px;
    background-color: #f0f8ff;
    color: #007acc;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 5px;
}

.share-task:hover {
    background-color: #007acc;
    color: #fff;
}

.chart-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 100%; /* або 560px, якщо хочеш обмежити */
    margin: 0 auto;
    padding: 20px;
  }
  
  canvas {
    width: 300px !important;   /* Явно обмежуємо ширину */
    height: 300px !important;  /* І висоту */
    max-width: 100%;
    box-sizing: border-box;
  }

#taskChart {
    width: 560px;
    height: 560px;
}
#progressChart {
    width: 560px;
    height: 560px;
}

.filtersblock label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-right: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.filtersblock label:hover {
  background-color: #eaeaea;
}

.filtersblock label input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
}

.filter-bar {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
    align-items: center;
  }
  
  .filter-bar label {
    font-weight: bold;
    color: var(--text-color);
  }
  
  .filter-bar select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-light);
    color: var(--text-color);
  }

  .public-task {
    border: 2px dashed #007bff;
    position: relative;
  }
  .public-task::after {
    content: "🔗 Публічна задача";
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.8em;
    color: #007bff;
  }

  .shared-task {
     border: 2px dashed #ffa000; 
    }

  .hidden {
    display: none !important;
}

.login-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-content {
  background: #fff;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
}

.login-content input,
.login-content select {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
}

@media (max-width: 768px) {
    body {
      padding: 10px;
    }
  
    .container {
      padding: 0;
    }
  
    .dashboard {
      flex-direction: column;
      gap: 20px;
    }
  
    .filters {
      flex-direction: column;
      gap: 10px;
    }
  
    .filters input,
    .filters select,
    .filters button {
      width: 100%;
    }
  
    .clouds {
      flex-direction: column;
      gap: 20px;
    }
  
    .cloud {
      width: 100%;
      min-width: unset;
    }
  
    .task {
      font-size: 0.95rem;
      padding: 12px;
    }
  
    .task-menu .menu-toggle {
      font-size: 1.1rem;
      padding: 4px 6px;
    }
  
    .task .priority-select {
      width: 100%;
      margin-top: 8px;
    }
  
    .dots {
      margin-top: 6px;
    }
  }

  .start-at-badge {
    background-color: #007acc;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 6px;
    opacity: 0;
    transform: translateY(-5px);
    animation: fadeInBadge 0.5s forwards;
  }
  
  @keyframes fadeInBadge {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }



  .view-toggle {
    display: flex;
    gap: 10px;
    margin: 20px auto 10px;
    justify-content: center;
  }
  
  .view-btn {
    padding: 6px 14px;
    border-radius: 6px;
    background: #f1f1f1;
    border: 1px solid #ccc;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s ease;
  }
  
  .view-btn:hover {
    background-color: #e0e0e0;
  }
  
  .view-btn.active {
    background-color: #007acc;
    color: white;
    border-color: #007acc;
  }

  .subtask-wrapper {
    margin-top: 10px;
  }
  
  .subtask-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
  }
  
  .subtask-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
  }
  
  .subtask-add {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
  }
  
  .subtask-add input[type="text"] {
    flex: 1;
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  
  .subtask-add button {
    padding: 6px 10px;
    font-size: 14px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .subtask-add button:hover {
    background-color: #2980b9;
  }

  #archiveDropZone {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 140px;
    background-color: #f5f5f5;
    border: 2px dashed #888;
    color: #333;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    z-index: 9999;
    border-radius: 0 12px 12px 0;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  #archiveDropZone.visible {
    opacity: 1;
  }
  
  #archiveDropZone.hover {
    background-color: #ffe2e2;
    border-color: #ff5555;
    color: #c00;
  }

  .task.archived {
    background-color: #f9f9f9;
    border-left: 4px solid #6c757d;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
  }
  
  .task.archived.deleted {
    background-color: #ffe2e2;
    border-left-color: #ff5555;
  }
  
  .task-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
  }

  .modal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
  }

  .restore-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .restore-btn:hover {
    background-color: #0069d9;
  }
  
  .delete-btn:hover {
    background-color: #c82333;
  }

  #openArchiveBtn {
    background-color: #6c757d;
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
  }
  
  #openArchiveBtn:hover {
    background-color: #5a6268;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }

  