.todo-panel {
  margin-top: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.todo-head {
  height: 78px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.todo-head p { margin: 0 0 4px; color: #4262a7; font-size: 9px; font-weight: 800; letter-spacing: 1.4px; }
.todo-head h2 { margin: 0; font-size: 19px; }
.todo-head button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #65718a; display: grid; place-items: center; cursor: pointer; }
.todo-head button:hover { color: var(--blue); border-color: #c4d0ea; background: #f7f9fd; }
.todo-head button:disabled { opacity: .65; }
.todo-head button svg { width: 17px; }
.todo-head button.is-loading svg { animation: todo-spin .8s linear infinite; }

.todo-summary { display: grid; grid-template-columns: repeat(4, 1fr); min-height: 76px; border-bottom: 1px solid var(--line); background: #fafbfe; }
.summary-cell { display: flex; align-items: center; gap: 11px; padding: 14px 20px; border-right: 1px solid var(--line); }
.summary-cell:last-child { border-right: 0; }
.summary-cell > svg { width: 20px; color: #70809e; }
.summary-cell > span { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; }
.summary-cell small { font-size: 11px; color: #778198; }
.summary-cell b { font-size: 22px; color: #1b2740; }
.summary-cell.has-overdue svg, .summary-cell.has-overdue b { color: #c9433b; }

.todo-list { max-height: 390px; overflow: auto; }
.todo-row { min-height: 68px; display: grid; grid-template-columns: 50px minmax(0, 1fr) 120px 92px 20px; gap: 14px; align-items: center; padding: 11px 20px; color: var(--ink); text-decoration: none; border-bottom: 1px solid #edf0f5; transition: background .15s; }
.todo-row:last-child { border-bottom: 0; }
.todo-row:hover { background: #f7f9fd; }
.todo-row.is-overdue { background: #fff8f7; }
.todo-row.is-overdue:hover { background: #fff3f1; }
.todo-module { width: 42px; height: 28px; display: grid; place-items: center; border-radius: 5px; font-size: 11px; font-weight: 750; }
.todo-module.fast { color: #9a5a0c; background: #fff0dc; }
.todo-module.quality { color: #234b9f; background: #e8eefb; }
.todo-content { min-width: 0; display: grid; gap: 5px; }
.todo-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; }
.todo-meta { min-width: 0; display: flex; align-items: center; gap: 8px; color: #818a9d; font-size: 10px; }
.todo-meta b { font-weight: 650; color: #66728a; }
.todo-meta em { font-style: normal; color: #31539b; background: #edf2fb; padding: 2px 5px; border-radius: 3px; }
.todo-parent { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-stage { justify-self: start; padding: 4px 8px; border-radius: 4px; background: #f0f3f8; color: #5f6b81; font-size: 10px; font-weight: 650; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.todo-due { display: grid; gap: 3px; }
.todo-due small { font-size: 9px; color: #8a93a4; }
.todo-due b { font-size: 11px; font-weight: 650; }
.is-overdue .todo-due small, .is-overdue .todo-due b { color: #c9433b; }
.todo-arrow { width: 17px; color: #9aa4b6; }

.todo-state { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #8a94a7; text-align: center; }
.todo-state > svg { width: 25px; margin-bottom: 10px; }
.todo-state b { font-size: 13px; color: #536078; margin-bottom: 5px; }
.todo-state span { font-size: 11px; }
.todo-state:not(.todo-empty):not(.todo-error) > svg { animation: todo-spin .8s linear infinite; }
.todo-empty > svg { color: #4d8b6a; }
.todo-error > svg { color: #c9433b; }

@keyframes todo-spin { to { transform: rotate(360deg); } }

@media (max-width: 800px) {
  .todo-panel { margin-top: 20px; }
  .todo-summary { grid-template-columns: 1fr 1fr; }
  .summary-cell:nth-child(2) { border-right: 0; }
  .summary-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .todo-row { grid-template-columns: 44px minmax(0, 1fr) 18px; padding: 12px 14px; gap: 10px; }
  .todo-stage, .todo-due { display: none; }
  .todo-head { padding: 0 16px; }
  .todo-list { max-height: 420px; }
}
