:root {
  --bg: #0d0f12;
  --card: #16191f;
  --column: #1c1f26;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --radius: 8px;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: system-ui, sans-serif;
  color: var(--text);
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--card);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}

.topbar .title {
  font-size: 1.3rem;
  font-weight: 600;
}

.topbar .user {
  font-size: .9rem;
  color: var(--text-muted);
}

.topbar a.logout {
  margin-left: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.topbar a.logout:hover {
  color: var(--accent-hover);
}

.board {
  flex: 1;
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.column {
  background: var(--column);
  padding: 1rem;
  border-radius: var(--radius);
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
}

/* Minimal dragging visuals: hide the original column while dragging and show a placeholder */
.column.dragging {
  display: none;
}

.column-placeholder {
  width: 300px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  min-height: 120px;
  border: 2px dashed rgba(255,255,255,0.03);
}

.column h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  font-weight: 600;
} 

.task-list {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  margin-bottom: 1rem;
}

.task {
  position: relative;
  background: var(--card);
  padding: .75rem;
  border-radius: var(--radius);
  margin-bottom: .75rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, .3);
  transition: transform .1s ease;
  overflow: hidden;
  max-width: 100%;
  word-wrap: break-word;
  flex-shrink: 0;
  text-overflow: ellipsis;
}

.task:hover {
  transform: scale(1.02);
}

.task-title {
  white-space: normal;
  word-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.priority-dot,
.task-notification {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.priority-dot {
  bottom: 6px;
  right: 6px;
}

.priority-low {
  background: #4ade80;
}

.priority-medium {
  background: #facc15;
}

.priority-high {
  background: #f87171;
}

.task-notification {
  top: 6px;
  right: 6px;
  background: #ff5722;
}

.add-task {
  flex-shrink: 0;
  padding: .5rem;
  background: var(--accent);
  border-radius: var(--radius);
  text-align: center;
  color: #fff;
  cursor: pointer;
  transition: background .15s ease;
}

.add-task:hover {
  background: var(--accent-hover);
}

.task-list::-webkit-scrollbar,
.board::-webkit-scrollbar,
.comment-thread::-webkit-scrollbar {
  display: none;
}

.task-list,
.board,
.comment-thread {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.task.dragging {
  opacity: 0;
}

.drag-preview {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 10px rgba(0, 0, 0, .5);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  width: 750px;
  max-height: 80vh;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  overflow: hidden;
}

.modal-content input,
.modal-content textarea,
.modal-content select {
  background: #1a1d23;
  border: 1px solid #2a2d34;
  color: var(--text);
  padding: .6rem .75rem;
  border-radius: var(--radius);
  font-size: .95rem;
  outline: none;
  transition: border .15s ease, background .15s ease;
  width: 100%;
  resize: none;
}

.modal-content input:hover,
.modal-content textarea:hover,
.modal-content select:hover {
  border-color: #3b4250;
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
  border-color: var(--accent);
  background: #1f232b;
}

.modal-content textarea {
  min-height: 90px;
  line-height: 1.4;
}

.modal-content select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23e5e7eb' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5.516 7.548a.625.625 0 0 1 .884 0L10 11.148l3.6-3.6a.625.625 0 1 1 .884.884l-4.042 4.042a.625.625 0 0 1-.884 0L5.516 8.432a.625.625 0 0 1 0-.884z'/></svg>");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 14px;
  padding-right: 2rem;
}

.modal-content label {
  margin: 1rem 0 .4rem;
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.modal-content button {
  background: var(--accent);
  border: none;
  padding: .6rem 1rem;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  margin-top: .5rem;
  transition: background .15s ease;
}

.modal-content button:hover {
  background: var(--accent-hover);
}

#modal-close {
  background: #2a2d34;
  color: var(--text-muted);
}

#modal-close:hover {
  background: #353944;
  color: var(--text);
}

.modal-left {
  display: flex;
  flex-direction: column;
  padding-right: .5rem;
}

.modal-left input,
.modal-left textarea,
.modal-left select {
  margin-bottom: 1rem;
}

.modal-right {
  display: flex;
  flex-direction: column;
  border-left: 1px solid #2a2d34;
  padding-left: 1rem;
  max-width: 360px;
  overflow: hidden;
}

.comment-thread {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: .25rem;
  margin-bottom: 1rem;
  max-height: 307px;
}

.comment {
  background: #1f232b;
  padding: .75rem;
  border-radius: var(--radius);
  margin-bottom: .75rem;
}

.comment strong {
  color: var(--accent);
  display: block;
  margin-bottom: .25rem;
}

#modal-new-comment {
  width: 275px;
  max-width: 275px;
  margin-bottom: .5rem;
  resize: none;
}

#modal-title,
#modal-description {
  width: 366px;
  max-width: 366px;
}

.modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.saved-indicator {
  display: none;
  opacity: 0;
  color: var(--accent);
  font-size: 1rem;
  transition: opacity .3s ease;
}

.comment-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: .85rem;
  margin-bottom: .15rem;
}

.comment-time {
  font-size: .75rem;
  opacity: .7;
}

.modal-footer-row {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.danger-btn {
  background: #d9534f !important;
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.danger-btn:hover {
  background: #c9302c !important;
}

.column-drag-ghost {
  position: fixed;
  pointer-events: none;
  opacity: 1;
  z-index: 9999;
  transform: scale(0.91);
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.column-delete {
  background: transparent;
  border: none;
  color: #d9534f;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px 4px;
}

.column-delete:hover {
  color: #c9302c;
}

.add-list-button {
  width: 280px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  color: #aaa;
  margin-left: 10px;
}

.add-list-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Make the small modal a clean vertical stack */
.small-modal {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

/* Ensure labels and inputs align vertically */
.small-modal label {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.small-modal input {
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #1e1e1e;
  color: white;
}

/* Buttons stacked vertically */
.small-modal button {
  width: 100%;
  padding: 10px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

/* Primary button */
#list-save {
  background: #4a90e2;
  color: white;
}

#list-save:hover {
  background: #3b78c2;
}

/* Secondary button */
#list-close {
  background: #333;
  color: #ccc;
}

#list-close:hover {
  background: #444;
}