/* =====================================================================
   Sprint + Notes styles — gebruikt dezelfde CSS-variabelen als style.css
   zodat licht en donker thema overal hetzelfde voelen.
   ===================================================================== */

body { background: var(--bg); color: var(--text); min-height: 100vh; }

/* === Login === komt uit style.css === */

/* === Header === */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; background: var(--bg2); border-bottom: 1px solid var(--border);
}
.header-title { font-size: 18px; font-weight: 700; white-space: nowrap; color: var(--text); }
.header-nav { display: flex; align-items: center; gap: 12px; }

.week-nav { display: flex; align-items: center; gap: 8px; }
.week-nav-label { font-size: 13px; color: var(--text3); min-width: 100px; text-align: center; white-space: nowrap; font-weight: 600; }

.nav-btn {
  padding: 6px 14px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 13px; cursor: pointer; transition: background .15s;
}
.nav-btn:hover { background: var(--bg4); }

.assignee-filter {
  padding: 6px 12px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 13px; cursor: pointer; appearance: auto;
  width: auto;
}
.assignee-filter:focus { outline: none; border-color: var(--accent); }

.header-user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text); }

.btn-logout {
  padding: 6px 14px; background: transparent; border: 1px solid var(--border);
  border-radius: 6px; color: var(--text3); font-size: 13px; cursor: pointer;
}
.btn-logout:hover { color: var(--danger); border-color: var(--danger); }

/* === Board Tabs === */
.board-tabs {
  display: flex; gap: 4px; padding: 8px 24px;
  background: var(--bg2); border-bottom: 1px solid var(--border);
}
.board-tab {
  padding: 8px 20px; background: transparent; border: none; border-radius: 8px 8px 0 0;
  color: var(--text3); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s; font-family: inherit;
}
.board-tab:hover { color: var(--text); background: var(--bg4); }
.board-tab.active { color: var(--text); background: var(--bg); }

/* === Board === */
.board {
  display: flex; gap: 16px; padding: 20px; overflow-x: auto;
  min-height: calc(100vh - 105px); align-items: flex-start;
}

.board-column {
  flex: 1 1 280px; min-width: 260px; max-width: 360px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  display: flex; flex-direction: column; max-height: calc(100vh - 140px);
}
.board-column.is-current .column-header { border-top: 2px solid var(--accent); border-radius: 12px 12px 0 0; }
.board-column.is-backlog { border: 1px dashed var(--border-strong); }

.column-header {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text3); padding: 14px 16px 10px; display: flex; justify-content: space-between; align-items: center;
}
.column-header .task-count {
  background: var(--bg4); padding: 2px 8px; border-radius: 10px; font-size: 11px; color: var(--text2);
}
.column-header-date { font-size: 11px; font-weight: 400; color: var(--text3); opacity: 0.7; }

.card-list { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 8px 12px; min-height: 60px; overflow-y: auto; }
.card-list .sortable-ghost { opacity: 0.4; }

.task-card {
  background: var(--bg3); border-radius: 8px; border: 1px solid var(--border);
  cursor: pointer; transition: all .15s; flex-shrink: 0; position: relative; color: var(--text);
}
.task-card:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-card); }

.card-complete-btn {
  position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border-strong); background: transparent; color: transparent;
  font-size: 11px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s, border-color .15s, background .15s, color .15s; z-index: 2; padding: 0;
}
.task-card:hover .card-complete-btn { opacity: 1; }
.card-complete-btn:hover { border-color: var(--priority-low); background: rgba(16,185,129,0.12); color: var(--priority-low); }
.card-complete-btn.is-done { opacity: 1; border-color: var(--priority-low); background: var(--priority-low); color: white; }

.task-card.is-completed .card-title { color: var(--text3); text-decoration: line-through; }
.task-card.is-completed .card-meta { opacity: 0.5; }
.task-card.is-completed .priority-bar { opacity: 0.35; }

.task-card .priority-bar { display: block; height: 6px; width: 60px; border-radius: 99px; margin-bottom: 8px; }
.task-card.priority-low .priority-bar { background: var(--priority-low); }
.task-card.priority-medium .priority-bar { background: var(--priority-medium); }
.task-card.priority-high .priority-bar { background: var(--priority-high); }

.card-body { padding: 10px 12px; }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; line-height: 1.3; word-wrap: break-word; }
.card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text3); }

.card-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: white;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase;
}
.card-avatar.unassigned { background: var(--bg4); color: var(--text3); }
.card-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.card-status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2px; color: white; white-space: nowrap;
}
.card-status-pill.status-in_progress { background: var(--status-in-progress); }
.card-status-pill.status-on_hold { background: var(--status-on-hold); }
.card-status-pill.status-waiting_3e { background: var(--status-waiting-3e); }
.card-status-pill.status-live_onderhoud { background: var(--status-live); }

.status-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.status-in_progress { background: var(--status-in-progress); color: white; }
.status-on_hold { background: var(--status-on-hold); color: white; }
.status-waiting_3e { background: var(--status-waiting-3e); color: white; }
.status-live_onderhoud { background: var(--status-live); color: white; }

.btn-add-task {
  margin: 8px 12px 12px; padding: 8px; background: transparent;
  border: 1px dashed var(--border); border-radius: 8px;
  color: var(--text3); font-size: 13px; cursor: pointer; text-align: center; transition: all .15s; font-family: inherit;
}
.btn-add-task:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-ring); }

.btn-add-column {
  flex: 0 0 280px; min-width: 280px; height: 60px;
  background: var(--bg2); border: 2px dashed var(--border); border-radius: 12px;
  color: var(--text3); font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: all .15s; align-self: flex-start;
}
.btn-add-column:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-ring); }

.done-divider {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.3px;
  padding: 6px 0; margin: 4px 0; opacity: 0.6;
}
.done-divider::before, .done-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* === Modal (Sprint/Notes task modal) === */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal-overlay .modal {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  width: 900px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column;
  padding: 0;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 16px; }
.modal-close { background: none; border: none; color: var(--text3); font-size: 24px; cursor: pointer; line-height: 1; padding: 0; width: auto; }
.modal-close:hover { color: var(--text); }

.modal-columns { display: flex; flex: 1; overflow: hidden; }
.modal-left { flex: 0 0 60%; padding: 20px; overflow-y: auto; border-right: 1px solid var(--border); }
.modal-right { flex: 0 0 40%; display: flex; flex-direction: column; overflow: hidden; }
.modal-right .feed-title {
  font-size: 12px; padding: 14px 16px 10px; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.3px; font-weight: 700;
}

.modal-footer { display: flex; justify-content: space-between; padding: 16px 0 0; border-top: 1px solid var(--border); margin-top: 14px; }
.form-group { margin-bottom: 14px; flex: 1; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 8px 12px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 14px; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-row { display: flex; gap: 12px; }

.assignee-picker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.assignee-list { display: flex; gap: 4px; flex-wrap: wrap; }
.assignee-chip {
  display: flex; align-items: center; gap: 4px;
  background: var(--accent-ring); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 8px 3px 3px; font-size: 12px; color: var(--text);
}
.assignee-chip .chip-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: white; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase; overflow: hidden;
}
.assignee-chip .chip-avatar img { width: 100%; height: 100%; object-fit: cover; }
.assignee-chip .chip-remove { background: none; border: none; color: var(--text3); font-size: 14px; cursor: pointer; padding: 0 2px; line-height: 1; width: auto; }
.assignee-chip .chip-remove:hover { color: var(--danger); }

.assignee-add-wrap { position: relative; }
.assignee-add-btn {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px dashed var(--border-strong); background: transparent; color: var(--text3);
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; padding: 0;
}
.assignee-add-btn:hover { border-color: var(--accent); color: var(--accent); }

.assignee-dropdown {
  position: absolute; top: 100%; left: 0; margin-top: 4px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  min-width: 180px; z-index: 200; box-shadow: var(--shadow-card); max-height: 200px; overflow-y: auto;
}
.assignee-dropdown-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px; color: var(--text); transition: background .1s; }
.assignee-dropdown-item:hover { background: var(--bg4); }
.assignee-dropdown-item .dropdown-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: white; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase; overflow: hidden; flex-shrink: 0;
}
.assignee-dropdown-item .dropdown-avatar img { width: 100%; height: 100%; object-fit: cover; }

.card-avatars { display: flex; align-items: center; }
.card-avatars .card-avatar { margin-left: -6px; border: 2px solid var(--bg2); }
.card-avatars .card-avatar:first-child { margin-left: 0; }
.card-avatars .card-avatar-more {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg4); color: var(--text3); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-left: -6px; border: 2px solid var(--bg2);
}

.notification-dot { position: absolute; top: 10px; right: 32px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); z-index: 2; }

.activity-feed { flex: 1; overflow-y: auto; padding: 0 16px; display: flex; flex-direction: column; gap: 2px; }
.feed-empty { color: var(--text3); font-size: 13px; padding: 20px 0; text-align: center; }
.feed-entry { display: flex; gap: 8px; padding: 8px 0; }
.feed-comment { border-bottom: 1px solid var(--border); }
.feed-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: white; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase; flex-shrink: 0; overflow: hidden;
}
.feed-avatar.has-image img { width: 100%; height: 100%; object-fit: cover; }
.feed-avatar-sm { width: 22px; height: 22px; font-size: 9px; margin-top: 2px; }

.feed-content { flex: 1; min-width: 0; }
.feed-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.feed-author { font-size: 13px; font-weight: 600; color: var(--text); }
.feed-time { font-size: 11px; color: var(--text3); white-space: nowrap; margin-left: 8px; }
.feed-comment-body { font-size: 13px; line-height: 1.5; white-space: pre-wrap; color: var(--text); }
.feed-activity { align-items: center; }
.feed-activity-text { font-size: 12px; color: var(--text3); line-height: 1.4; }
.feed-activity-text strong { color: var(--text); font-weight: 600; }

.modal-right .comment-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--border); }
.comment-form textarea {
  flex: 1; padding: 8px 12px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 13px; font-family: inherit; resize: none;
}
.comment-form textarea:focus { outline: none; border-color: var(--accent); }

.auto-expand { resize: none; overflow: hidden; min-height: 60px; max-height: 300px; transition: height .1s ease; }
.auto-expand.scrollable { overflow-y: auto; }

/* === Board Wrapper + Todo Sidebar === */
.board-wrapper { display: flex; overflow: hidden; min-height: calc(100vh - 105px); }
.board-wrapper > .board { flex: 1 1 0; min-height: auto; overflow-x: auto; }

.todo-sidebar {
  flex: 0 0 280px; width: 280px;
  background: var(--bg2); margin-left: 4px; border-left: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto; padding: 0;
}
.sidebar-section { padding: 16px; border-bottom: 1px solid var(--border); }
.sidebar-section:last-child { border-bottom: none; flex: 1; overflow-y: auto; }
.sidebar-heading { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text3); margin-bottom: 12px; }
.sidebar-empty { font-size: 12px; color: var(--text3); text-align: center; padding: 12px 0; }

.todo-add-row { display: flex; gap: 6px; margin-bottom: 10px; }
.todo-input { flex: 1; padding: 6px 10px; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 13px; font-family: inherit; }
.todo-input:focus { outline: none; border-color: var(--accent); }

.todo-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.todo-item.is-done .todo-text { text-decoration: line-through; color: var(--text3); }

.todo-check {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border-strong); background: transparent; color: transparent;
  font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; padding: 0; transition: all .15s;
}
.todo-check:hover { border-color: var(--priority-low); background: rgba(16,185,129,0.12); color: var(--priority-low); }
.todo-check.checked { border-color: var(--priority-low); background: var(--priority-low); color: white; }

.todo-text { flex: 1; font-size: 13px; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-delete { background: none; border: none; color: var(--text3); font-size: 16px; cursor: pointer; padding: 0 2px; opacity: 0; transition: opacity .15s; line-height: 1; width: auto; }
.todo-item:hover .todo-delete { opacity: 1; }
.todo-delete:hover { color: var(--danger); }

.my-task-item { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-radius: 6px; cursor: pointer; transition: background .15s; }
.my-task-item:hover { background: var(--bg4); }
.my-task-priority-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.my-task-item.priority-low .my-task-priority-dot { background: var(--priority-low); }
.my-task-item.priority-medium .my-task-priority-dot { background: var(--priority-medium); }
.my-task-item.priority-high .my-task-priority-dot { background: var(--priority-high); }
.my-task-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.my-task-title { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-task-week { font-size: 11px; color: var(--text3); }
.my-task-item.is-done { opacity: 0.5; }
.my-task-item.is-done .my-task-title { text-decoration: line-through; }

/* === Import Log === */
.btn-import-log { padding: 6px 14px; background: transparent; border: 1px solid var(--border); border-radius: 6px; color: var(--text3); font-size: 13px; cursor: pointer; transition: all .15s; }
.btn-import-log:hover { color: var(--accent); border-color: var(--accent); }

.import-log-modal { width: 700px; max-height: 80vh; display: flex; flex-direction: column; }
.import-log-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.log-entry { margin-bottom: 16px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.log-entry-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--bg3); border-bottom: 1px solid var(--border); }
.log-date { font-size: 13px; font-weight: 600; color: var(--text); }
.log-stats { display: flex; gap: 10px; font-size: 11px; font-weight: 600; }
.log-stat-create { color: var(--status-in-progress); }
.log-stat-update { color: var(--status-live); }
.log-stat-skip { color: var(--text3); }
.log-stat-drop { color: var(--status-on-hold); }
.log-items { padding: 8px 14px; }
.log-item-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.log-badge { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; min-width: 52px; text-align: center; flex-shrink: 0; }
.log-badge-create { background: var(--status-in-progress); color: white; }
.log-badge-update { background: var(--status-live); color: white; }
.log-badge-skip { background: var(--bg4); color: var(--text3); }
.log-badge-drop { background: var(--status-on-hold); color: white; }
.log-item-title { flex: 1; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-item-meta { color: var(--text3); font-size: 12px; white-space: nowrap; }

/* === Notes === */
.notes-layout { display: flex !important; gap: 0; padding: 0 !important; min-height: calc(100vh - 105px); }
.notes-sidebar {
  flex: 0 0 260px; width: 260px;
  background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto;
}
.notes-sidebar-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 12px; border-bottom: 1px solid var(--border); }
.btn-add-page {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px dashed var(--border-strong); background: transparent; color: var(--text3);
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.btn-add-page:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-ring); }
.notes-page-list { flex: 1; overflow-y: auto; padding: 8px; }
.notes-page-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: background .15s; margin-bottom: 2px;
  border: 1px solid transparent;
}
.notes-page-item:hover { background: var(--bg4); }
.notes-page-item.active { background: var(--accent-ring); border-color: var(--accent); }
.notes-page-title { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.notes-page-delete { background: none; border: none; color: var(--text3); font-size: 16px; cursor: pointer; padding: 0 2px; opacity: 0; transition: opacity .15s; line-height: 1; flex-shrink: 0; width: auto; }
.notes-page-item:hover .notes-page-delete { opacity: 1; }
.notes-page-delete:hover { color: var(--danger); }

.notes-editor { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.notes-editor-header { padding: 20px 32px 0; }
.notes-title-input {
  width: 100%; padding: 8px 0; background: transparent;
  border: none; border-bottom: 1px solid var(--border);
  color: var(--text); font-size: 22px; font-weight: 700; font-family: inherit;
}
.notes-title-input:focus { outline: none; border-bottom-color: var(--accent); }
.notes-title-input::placeholder { color: var(--text3); }
.notes-editor-body { flex: 1; padding: 20px 32px; color: var(--text); font-size: 15px; line-height: 1.7; overflow-y: auto; outline: none; min-height: 200px; }
.notes-editor-body:empty::before { content: attr(data-placeholder); color: var(--text3); pointer-events: none; }
.notes-editor-body ul { list-style: disc; padding-left: 24px; margin: 4px 0; }
.notes-editor-body ul li { padding: 2px 0; line-height: 1.7; }
.notes-editor-body p { margin: 4px 0; min-height: 1.7em; }
.notes-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 16px; color: var(--text3); font-size: 15px; }

@media (max-width: 768px) {
  .header { flex-wrap: wrap; gap: 8px; }
  .board { padding: 8px; }
  .board-column { flex: 0 0 220px; min-width: 220px; max-width: 220px; }
  .modal-overlay .modal { width: 95%; margin: 16px; max-height: 95vh; }
  .modal-columns { flex-direction: column; overflow-y: auto; }
  .modal-left { flex: none; border-right: none; border-bottom: 1px solid var(--border); }
  .modal-right { flex: none; min-height: 300px; }
  .form-row { flex-direction: column; gap: 0; }
  .board-tabs { overflow-x: auto; }
  .week-nav { gap: 4px; }
  .todo-sidebar { display: none !important; }
  .board-wrapper { flex-direction: column; }
  .notes-sidebar { flex: 0 0 200px; width: 200px; }
  .notes-editor-header { padding: 16px 16px 0; }
  .notes-editor-body { padding: 16px; }
}
