/* ---- monitoring strip ---- */
.monitor {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 34px;
  animation: fade-up .5s ease both;
}
.stat {
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
  border-radius: 12px;
  padding: 15px;
  min-width: 0;
}
.stat-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.stat-head span {
  color: var(--muted);
  font: 9px var(--mono);
  letter-spacing: .13em;
}
.stat-head b {
  font: 500 15px var(--mono);
  letter-spacing: -.02em;
  color: var(--text);
  white-space: nowrap;
}
.stat:not(:nth-child(4)) .stat-head b { font-size: clamp(12px, 3.5vw, 15px); }
.stat:nth-child(4) .stat-head { display: block; }
.stat:nth-child(4) .stat-head b { display: block; margin-top: 6px; font-size: 13px; }
.stat small {
  display: block;
  margin-top: 9px;
  color: #6c757a;
  font: 9px var(--mono);
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar {
  height: 5px;
  margin-top: 11px;
  border-radius: 99px;
  background: #191d1f;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #7fa52f, var(--accent));
  transition: width .9s cubic-bezier(.22, .8, .3, 1);
}
.bar i.hot { background: linear-gradient(90deg, #d5a03a, var(--danger)); }

/* ---- detail drawer ---- */
.detail-dialog {
  margin: 0 0 0 auto;
  height: 100vh;
  max-height: 100vh;
  width: min(94vw, 560px);
  border-radius: 0;
  border: 0;
  border-left: 1px solid #2d3234;
  animation: slide-in .34s cubic-bezier(.22, .8, .3, 1) both;
}
.detail-dialog::backdrop {
  background: rgba(4, 5, 6, .66);
  backdrop-filter: blur(3px);
  animation: fade .3s ease both;
}
.detail-wrap {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.detail-meta span {
  border: 1px solid #2c3234;
  border-radius: 99px;
  padding: 5px 11px;
  color: #a9b1b3;
  font: 10px var(--mono);
  letter-spacing: .04em;
}
.detail-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.detail-title h3 {
  font-size: 15px;
  margin: 6px 0 0;
  letter-spacing: -.02em;
}
.detail-title strong {
  font: 500 13px var(--mono);
  color: var(--accent);
}
.progress { margin-top: 2px; }
.progress i { transition: width .8s cubic-bezier(.22, .8, .3, 1); }
.todo-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 190px;
  overflow: auto;
}
.todo-list li {
  display: flex;
  gap: 9px;
  font-size: 12.5px;
  color: #c7cdcd;
  border: 1px solid #23282a;
  border-radius: 7px;
  padding: 8px 10px;
}
.todo-list li span { color: var(--accent); }
.todo-list li.done { color: #7d8588; text-decoration: line-through; }
.todo-list li.done span { color: #6d7d4a; }
.todo-empty { border-style: dashed; color: #7d8588; text-decoration: none; }
.notes {
  margin: 0;
  max-height: 34vh;
  overflow: auto;
  padding: 13px;
  border: 1px solid #23282a;
  border-radius: 8px;
  background: #090b0c;
  color: #b8bfc0;
  font: 11.5px/1.6 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-hint { margin: 14px 0 0; color: #5f676b; font: 9px var(--mono); letter-spacing: .12em; }

@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 760px) {
  .monitor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .detail-dialog { width: 100vw; }
  .notes { max-height: 30vh; }
}
@media (prefers-reduced-motion: reduce) {
  .monitor, .detail-dialog, .detail-dialog::backdrop { animation: none; }
  .bar i, .progress i { transition: none; }
}
