/* Tổng kết buổi thi — đợt 16 Agent B. Chỉ biến màu app.css. */

body:has(#v-mon-report:not([hidden])) .page-head { display: none; }

#v-mon-report { display: block; }
#v-mon-report[hidden] { display: none; }

.mr-page { display: grid; gap: 16px; padding-bottom: 24px; }

.mr-skel { display: grid; gap: 16px; }
.mr-skel .sk-block {
  min-height: 88px; border-radius: var(--r);
  background: linear-gradient(90deg, var(--surface-2), var(--surface-hover), var(--surface-2));
  background-size: 200% 100%;
  animation: mr-shimmer 1.2s ease-in-out infinite;
}
.mr-skel .sk-head { min-height: 120px; }
.mr-skel .sk-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mr-skel .sk-kpi {
  min-height: 96px; border-radius: var(--r); background: var(--surface-2);
}
@media (max-width: 767px) {
  .mr-skel .sk-kpis { grid-template-columns: 1fr 1fr; }
}
@keyframes mr-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mr-skel .sk-block { animation: none; }
}

.mr-head .asg-head-main { width: 100%; }
/* «‹ Giám sát» nằm trái như mọi trang chi tiết (nút mặc định canh giữa chữ). */
.mr-head .asg-head-text { display: flex; flex-direction: column; align-items: flex-start; }
.mr-head .asg-crumb-link { text-align: left; align-self: flex-start; }
.mr-kpis { margin: 0; }

.mr-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
}
.mr-toolbar .btn-primary,
.mr-toolbar .btn-ghost { min-height: 44px; }

.mr-blocks { display: grid; gap: 16px; }
.mr-block { padding: 20px 24px; }
.mr-block-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.mr-block-title {
  margin: 0; font-size: 17px; font-weight: 700; color: var(--text-strong);
}
.mr-block-n {
  font-variant-numeric: tabular-nums; font-weight: 700;
  color: var(--text-muted); font-size: 14px;
}

.mr-list { display: grid; gap: 8px; }
.mr-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 16px; width: 100%; text-align: left;
  padding: 12px 14px; min-height: 52px;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--surface); color: inherit; font: inherit;
  cursor: pointer; transition: background 140ms ease, border-color 140ms ease;
}
.mr-row:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.mr-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mr-row.static { cursor: default; }
.mr-row.static:hover { background: var(--surface); border-color: var(--border); }
.mr-row-main {
  display: grid; gap: 2px; min-width: 0; flex: 1 1 auto;
}
.mr-row-name {
  font-weight: 600; color: var(--text-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mr-row-why {
  font-size: 13px; color: var(--text-muted); line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mr-row-time {
  flex: 0 0 auto; font-size: 12px; color: var(--text-faint);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.mr-empty { margin-top: 8px; }

@media (max-width: 767px) {
  .mr-block { padding: 16px; }
  .mr-row {
    flex-wrap: wrap; align-items: flex-start;
  }
  .mr-row-time { width: 100%; }
  .mr-toolbar { flex-direction: column; align-items: stretch; }
  .mr-toolbar .btn-primary,
  .mr-toolbar .btn-ghost,
  .mr-toolbar .btn-sm { width: 100%; justify-content: center; }
}

/* In / Lưu PDF */
@media print {
  .sb, .bn, .page-head, .mr-toolbar, .asg-crumb-link { display: none !important; }
  #v-mon-report { display: block !important; }
  .mr-page { gap: 12px; }
  .mr-block, .asg-head, .asg-kpi { box-shadow: none !important; break-inside: avoid; }
  .mr-row { border-color: #ccc; }
}
