/* Right detail panel - 80vw, full height, left 20% visible */
.detail-backdrop {
  position: fixed; inset: 0; z-index: 120; background: rgba(10, 31, 68, .30);
  display: flex; justify-content: flex-end; animation: fade-in .16s ease;
}
.detail-panel {
  width: 80vw; max-width: 1180px; height: 100%; background: var(--surface);
  display: flex; flex-direction: column; box-shadow: -28px 0 70px rgba(10, 31, 68, .30);
  animation: detail-in .22s cubic-bezier(.2,.8,.25,1); border-left: 1px solid var(--border-strong);
}
@keyframes detail-in { from { transform: translateX(40px); opacity: .55; } }
.detail-header {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px 22px 12px;
  border-bottom: 1px solid var(--border); background: var(--surface); flex: none;
}
.detail-header .dlg-titles { flex: 1; min-width: 0; }
.detail-header h2 { font-size: 17px; line-height: 1.3; }
.detail-header .sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.detail-header .btn-icon { flex: none; }
.detail-tabs { display: flex; align-items: center; gap: 2px; padding: 0 18px; border-bottom: 1px solid var(--border); background: var(--surface); flex: none; overflow-x: auto; }
.detail-tabs .tab { padding: 9px 11px; }
.detail-tabs .spacer { flex: 1; }
.detail-body { flex: 1; overflow-y: auto; padding: 20px 24px 30px; }
.detail-footer {
  display: flex; align-items: center; gap: 8px; padding: 12px 22px;
  border-top: 1px solid var(--border); background: var(--surface-2); flex: none;
}
.detail-footer .left { margin-right: auto; display: flex; gap: 6px; }

.panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.panel-main { min-width: 0; }
.panel-side { display: flex; flex-direction: column; gap: 14px; }
.panel-block { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 13px; }
.panel-block h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin: 0 0 9px; font-weight: 700; }
.panel-block .field + .field { margin-top: 10px; }
.panel-field-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; }
.panel-field-row .lbl { color: var(--text-muted); min-width: 74px; display: flex; align-items: center; gap: 6px; }
.panel-field-row .lbl svg { width: 14px; height: 14px; color: var(--text-faint); }
.panel-field-row .val { font-weight: 550; }

.title-input {
  width: 100%; border: 1px solid transparent; background: transparent; border-radius: 8px;
  font-size: 19px; font-weight: 650; letter-spacing: -.02em; padding: 4px 8px; margin-left: -8px;
}
.title-input:hover { background: var(--surface-2); }
.title-input:focus { outline: none; border-color: var(--primary-500); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-100); }
.desc-preview { font-size: 13px; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.desc-preview.muted { color: var(--text-faint); }
.desc-editor { width: 100%; min-height: 96px; }

.checklist { display: flex; flex-direction: column; gap: 6px; }
.checklist-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 7px 9px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
}
.checklist-item:hover { border-color: var(--border-strong); }
.checklist-item input[type="checkbox"] { margin-top: 3px; width: 15px; height: 15px; accent-color: var(--primary-700); flex: none; }
.checklist-item .chk-main { flex: 1; min-width: 0; }
.checklist-item .chk-text { font-size: 12.5px; line-height: 1.4; word-break: break-word; }
.checklist-item.done .chk-text { text-decoration: line-through; color: var(--text-faint); }
.checklist-item .chk-sub { display: flex; gap: 10px; flex-wrap: wrap; font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }
.checklist-item .chk-sub .over { color: var(--danger); font-weight: 600; }
.checklist-item .chk-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.45; }
.checklist-add { display: flex; gap: 6px; margin-top: 2px; }
.checklist-progress { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.checklist-progress .progress { flex: 1; }

.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.attach-thumb { position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.attach-thumb img { width: 100%; height: 84px; object-fit: cover; display: block; }
.attach-thumb .att-name { font-size: 9.5px; color: var(--text-muted); padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-thumb .att-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; background: rgba(10,31,68,.6); color: #fff; border-radius: 6px; border: 0; display: flex; align-items: center; justify-content: center; }
.attach-thumb .att-del svg { width: 12px; height: 12px; }

/* Comments */
.comment-thread { display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 10px; }
.comment .avatar { flex: none; }
.comment .c-main { flex: 1; min-width: 0; }
.comment .c-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.comment .c-author { font-size: 12.5px; font-weight: 650; }
.comment .c-time { font-size: 10.5px; color: var(--text-faint); }
.comment .c-edited { font-size: 10px; color: var(--text-faint); font-style: italic; }
.comment .c-actions { margin-left: auto; display: flex; gap: 2px; opacity: 0; }
.comment:hover .c-actions { opacity: 1; }
.comment .c-actions .btn-icon { width: 24px; height: 24px; }
.comment .c-bubble { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; margin-top: 3px; }
.comment .c-body { font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.comment .c-images { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.comment .c-images img { max-width: 280px; max-height: 220px; border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in; object-fit: cover; }
.comment-empty { text-align: center; color: var(--text-faint); font-size: 12.5px; padding: 22px; }

.comment-composer { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 10px; margin-top: 6px; }
.comment-composer textarea { border: 0; box-shadow: none; padding: 4px 2px; min-height: 54px; resize: vertical; }
.comment-composer textarea:focus { box-shadow: none; }
.comment-composer .composer-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.comment-composer .composer-row .hint { font-size: 10.5px; color: var(--text-faint); }
.image-previews { display: flex; flex-wrap: wrap; gap: 7px; margin: 6px 0 2px; }
.image-preview { position: relative; width: 74px; height: 60px; border-radius: 7px; overflow: hidden; border: 1px solid var(--border); }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview button { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 5px; border: 0; background: rgba(10,31,68,.65); color: #fff; display: flex; align-items: center; justify-content: center; }
.image-preview button svg { width: 11px; height: 11px; }

.avatar-picker { display: flex; flex-wrap: wrap; gap: 5px; }
.avatar-pick { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 3px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; font-size: 11.5px; }
.avatar-pick[aria-pressed="true"] { background: var(--primary-50); border-color: var(--primary-500); color: var(--primary-800); }
.avatar-pick .avatar { width: 20px; height: 20px; font-size: 8px; }

.label-pick { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 11px; color: var(--text-muted); }
.label-pick[aria-pressed="true"] { color: #fff; border-color: transparent; }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,31,68,.86); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox .btn-icon { position: absolute; top: 18px; right: 18px; color: #fff; }

.panel-section { margin-bottom: 22px; }
.panel-section > h3 { font-size: 13px; font-weight: 650; margin-bottom: 9px; display: flex; align-items: center; gap: 7px; }
.panel-section > h3 svg { width: 15px; height: 15px; color: var(--text-faint); }
.panel-section .section-actions { margin-left: auto; display: flex; gap: 4px; }

@media (max-width: 1100px) {
  .panel-grid { grid-template-columns: minmax(0, 1fr); }
  .panel-side { flex-direction: row; flex-wrap: wrap; }
  .panel-side .panel-block { flex: 1 1 240px; }
}
@media (max-width: 860px) {
  .detail-panel { width: 100vw; max-width: 100vw; }
  .detail-body { padding: 16px; }
  .detail-header { padding: 13px 14px 10px; }
  .detail-footer { padding: 10px 14px; }
}

/* Keep dialogs and the lightbox above the 80vw detail panel */
.modal-backdrop { z-index: 170; }
.slideover-backdrop { z-index: 170; }
.lightbox { z-index: 220; }
/* Notification bell + panel */
.bell-btn { position: relative; }
.bell-badge {
  position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 9px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--surface);
  line-height: 1; pointer-events: none;
}
.notif-section { margin-bottom: 20px; }
.notif-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.notif-section-head h3 { font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.notif-section-head h3 svg { width: 14px; height: 14px; color: var(--text-faint); }
.notif-section-head .badge { margin-left: auto; }
.notif-list { display: flex; flex-direction: column; gap: 4px; }
.notif-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 9px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text);
  text-decoration: none;
}
.notif-item:hover { border-color: var(--primary-500); background: var(--primary-50); text-decoration: none; }
.notif-dot { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.notif-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.notif-title { font-size: 12.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-meta { font-size: 10.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-assignees { font-size: 10px; color: var(--text-faint); display: inline-flex; align-items: center; gap: 3px; flex: none; }
.notif-assignees svg { width: 11px; height: 11px; }
/* Task dependencies */
.dep-list { display: flex; flex-direction: column; gap: 5px; }
.dep-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; min-width: 0;
}
.dep-item.done { opacity: .6; }
.dep-item .dep-status { display: flex; color: var(--text-faint); flex: none; }
.dep-item .dep-status svg { width: 14px; height: 14px; }
.dep-item .dep-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep-tag { font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; flex: none; }
.dep-tag.warn { background: var(--warning-bg); color: var(--warning); }
.dep-tag.ok { background: var(--success-bg); color: var(--success); }
/* ---------- Compact / professional detail panel ---------- */
.tab { display: inline-flex; align-items: center; gap: 6px; }
.tab svg { width: 15px; height: 15px; flex: none; }
.board-tabs .tab { padding: 8px 11px; font-size: 12.5px; }
.board-tabs .tab svg { width: 14px; height: 14px; }
.detail-header { padding: 12px 18px 9px; }
.detail-header h2 { font-size: 15.5px; letter-spacing: -.01em; }
.detail-header .sub { font-size: 11.5px; margin-top: 2px; }
.detail-tabs { padding: 0 14px; }
.detail-tabs .tab { padding: 8px 10px; font-size: 12px; }
.detail-body { padding: 16px 18px 24px; overflow-x: hidden; }
.detail-footer { padding: 9px 18px; }
.panel-grid { grid-template-columns: minmax(0, 1fr) 264px; gap: 16px; }
.panel-main { max-width: 760px; }
.panel-block { padding: 10px 11px; border-radius: 9px; }
.panel-block h4 { margin-bottom: 6px; font-size: 9.5px; }
.panel-block .field + .field { margin-top: 8px; }
.panel-block .field label { font-size: 10.5px; }
.panel-block .input, .panel-block .select, .panel-block .textarea { min-height: 32px; padding: 5px 8px; font-size: 12px; border-radius: 8px; }
.panel-block .select { padding-right: 26px; background-position: right 8px center; }
.panel-block .checkbox { font-size: 12px; }
.panel-field-row { padding: 3px 0; font-size: 12px; }
.panel-field-row .lbl { min-width: 66px; }
.title-input { font-size: 16px; padding: 2px 6px; margin-left: -6px; }
.task-meta-strip { display: flex; gap: 5px; flex-wrap: wrap; margin: 6px 0 0; }
.task-meta-strip .chip { font-size: 10px; padding: 1px 7px; background: var(--surface-2); gap: 4px; }
.task-meta-strip .chip svg { width: 11px; height: 11px; }
.panel-main .desc-editor { min-height: 62px; font-size: 12.5px; line-height: 1.55; }
.panel-section { margin-bottom: 16px; }
.panel-section > h3 { font-size: 12px; margin-bottom: 7px; gap: 5px; }
.panel-section > h3 svg { width: 13px; height: 13px; }
.checklist-progress { margin-bottom: 6px; font-size: 10.5px; }
.checklist { gap: 4px; }
.checklist-item { padding: 5px 7px; gap: 7px; border-radius: 7px; }
.checklist-item input[type="checkbox"] { width: 14px; height: 14px; margin-top: 2px; }
.checklist-item .input-inline { font-size: 12px; padding: 1px 5px; }
.checklist-item .input { min-height: 26px; height: 26px; padding: 2px 6px; font-size: 11px; border-radius: 6px; }
.checklist-add { gap: 5px; }
.checklist-add .input { min-height: 30px; font-size: 12px; }
.dep-list { gap: 4px; }
.dep-item { padding: 5px 8px; font-size: 12px; border-radius: 7px; }
.attach-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.attach-thumb img { height: 62px; }
.attach-thumb .att-name { font-size: 9px; padding: 2px 4px; }
.avatar-picker { gap: 4px; }
.avatar-pick { padding: 2px 7px 2px 2px; font-size: 11px; }
.avatar-pick .avatar { width: 18px; height: 18px; font-size: 7.5px; }
.color-swatches { gap: 4px; }
.label-add-row { display: flex; gap: 6px; }
.label-add-row .input { flex: 1; min-width: 0; }
.panel-main .swatch { width: 19px; height: 19px; border-radius: 5px; }
.panel-side .swatch { width: 19px; height: 19px; border-radius: 5px; }
.comment-thread { gap: 11px; }
.comment .c-bubble { padding: 7px 10px; border-radius: 8px; }
.comment .c-body { font-size: 12.5px; }
.comment-composer { padding: 8px; border-radius: 10px; }
.comment-composer textarea { min-height: 44px; font-size: 12.5px; }
@media (max-width: 1100px) { .panel-grid { grid-template-columns: minmax(0, 1fr); } }
/* ---------- Premium checklist ---------- */
.checklist { gap: 6px; }
.checklist-progress { gap: 8px; }
.todo-item {
  display: flex; align-items: flex-start; gap: 9px; padding: 8px 9px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.todo-item:hover { border-color: var(--border-strong); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.todo-item.done { background: linear-gradient(0deg, rgba(18, 128, 92, .035), rgba(18, 128, 92, .035)); }
.todo-check { position: relative; display: inline-flex; margin-top: 1px; flex: none; cursor: pointer; }
.todo-check input { position: absolute; inset: 0; width: 18px; height: 18px; opacity: 0; cursor: pointer; margin: 0; }
.todo-box {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center; color: #fff; background: var(--surface);
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.todo-box svg { width: 11px; height: 11px; opacity: 0; transform: scale(.7); transition: .15s ease; pointer-events: none; }
.todo-check input:checked + .todo-box { background: var(--success); border-color: var(--success); }
.todo-check input:checked + .todo-box svg { opacity: 1; transform: scale(1); }
.todo-check input:focus-visible + .todo-box { box-shadow: 0 0 0 3px var(--primary-100); }
.todo-check:active .todo-box { transform: scale(.94); }
.todo-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.todo-title {
  border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 550;
  color: var(--text); padding: 1px 3px; border-radius: 5px; width: 100%; min-width: 0;
}
.todo-title:hover { background: var(--surface-2); }
.todo-title:focus { outline: none; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.todo-item.done .todo-title { color: var(--text-faint); text-decoration: line-through; }
.todo-meta { display: flex; gap: 5px; flex-wrap: wrap; padding-left: 3px; }
.todo-chip {
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid transparent;
  background: transparent; color: var(--text-faint); font-size: 10px; line-height: 1.4;
  padding: 1px 5px; border-radius: 6px; max-width: 100%;
}
.todo-chip svg { width: 10px; height: 10px; flex: none; }
.todo-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-chip:hover { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
.todo-chip.has { color: var(--primary-700); background: var(--primary-50); border-color: var(--primary-100); }
.todo-chip.has:hover { background: var(--primary-100); color: var(--primary-800); }
.todo-editor { display: grid; grid-template-columns: 142px minmax(0, 1fr); gap: 6px; margin: 4px 0 1px; padding-left: 3px; }
.todo-editor .input { min-height: 28px; height: 28px; font-size: 11.5px; padding: 3px 7px; border-radius: 7px; }
.todo-del {
  border: 0; background: transparent; color: var(--text-faint); width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: .12s ease; flex: none;
}
.todo-del svg { width: 13px; height: 13px; }
.todo-item:hover .todo-del, .todo-item:focus-within .todo-del { opacity: 1; }
.todo-del:hover { background: var(--danger-bg); color: var(--danger); }
.todo-add {
  display: flex; align-items: center; gap: 7px; border: 1px dashed var(--border-strong);
  background: var(--surface-2); border-radius: 9px; padding: 2px 4px 2px 9px; margin-top: 6px;
  transition: .15s ease;
}
.todo-add:focus-within { border-color: var(--primary-500); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-100); }
.todo-add-icon { color: var(--text-faint); display: flex; }
.todo-add-icon svg { width: 13px; height: 13px; }
.todo-add input { flex: 1; min-width: 0; border: 0; background: transparent; height: 30px; font-size: 12px; color: var(--text); }
.todo-add input:focus { outline: none; }
.todo-add .btn { padding: 0 8px; height: 26px; font-size: 11.5px; }
@media (max-width: 680px) {
  .todo-editor { grid-template-columns: 1fr; }
  .todo-del { opacity: 1; }
}
.detail-tabs-bar { margin: -20px -24px 18px; padding: 0 14px; }