/* Sức khỏe hệ thống — Trung tâm kiểm tra chất lượng (mobile-first) */

.tools-dash-tile--eh .tools-dash-tile__icon {
  color: #334155;
}

.eh-hero__source-banner {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.eh-hero__source-banner--ok {
  color: #166534;
  background: #ecfdf5;
  border-color: rgba(22, 163, 74, 0.25);
}

.eh-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 10px calc(20px + env(safe-area-inset-bottom, 0px));
  min-width: 0;
}

.eh-page__header {
  margin-bottom: 10px;
}

.eh-page__eyebrow {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.eh-page__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.eh-page__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

.eh-hero {
  --eh-tone: #64748b;
  --eh-tone-soft: rgba(100, 116, 139, 0.12);
  --eh-tone-grad-a: #f8fafc;
  --eh-tone-grad-b: #eef2f7;
  margin: 0 0 14px;
  padding: 16px 14px 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 12% 0%, var(--eh-tone-soft) 0%, transparent 55%),
    linear-gradient(160deg, var(--eh-tone-grad-a) 0%, #fff 48%, var(--eh-tone-grad-b) 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  min-width: 0;
  min-height: 232px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  overflow: hidden;
}

.eh-hero--tone-green {
  --eh-tone: #16a34a;
  --eh-tone-soft: rgba(22, 163, 74, 0.16);
  --eh-tone-grad-a: #f0fdf4;
  --eh-tone-grad-b: #ecfdf5;
}

.eh-hero--tone-yellow {
  --eh-tone: #ca8a04;
  --eh-tone-soft: rgba(202, 138, 4, 0.18);
  --eh-tone-grad-a: #fffbeb;
  --eh-tone-grad-b: #fef9c3;
}

.eh-hero--tone-orange {
  --eh-tone: #ea580c;
  --eh-tone-soft: rgba(234, 88, 12, 0.16);
  --eh-tone-grad-a: #fff7ed;
  --eh-tone-grad-b: #ffedd5;
}

.eh-hero--tone-red {
  --eh-tone: #dc2626;
  --eh-tone-soft: rgba(220, 38, 38, 0.14);
  --eh-tone-grad-a: #fef2f2;
  --eh-tone-grad-b: #fee2e2;
}

.eh-hero--tone-na {
  --eh-tone: #64748b;
  --eh-tone-soft: rgba(100, 116, 139, 0.1);
  --eh-tone-grad-a: #f8fafc;
  --eh-tone-grad-b: #f1f5f9;
}

.eh-hero__main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.eh-hero__gauge {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
}

.eh-hero__ring {
  display: block;
  width: 100%;
  height: 100%;
}

.eh-hero__ring-track {
  stroke: rgba(15, 23, 42, 0.08);
  stroke-width: 10;
}

.eh-hero__ring-fill {
  stroke: var(--eh-tone);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke 0.2s ease;
}

.eh-hero__gauge-score {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

.eh-hero__score-num {
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.eh-hero__score-den {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.eh-hero__meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eh-hero__score-label {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.eh-hero__status {
  margin: 0;
  min-width: 0;
}

.eh-hero__status-pill {
  display: inline-block;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--eh-tone);
  background: var(--eh-tone-soft);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eh-hero__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  margin-top: 2px;
}

.eh-hero__bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--eh-tone) 0%, #fda4af 100%);
}

.eh-hero--tone-green .eh-hero__bar-fill {
  background: linear-gradient(90deg, var(--eh-tone) 0%, #86efac 100%);
}

.eh-hero--tone-yellow .eh-hero__bar-fill {
  background: linear-gradient(90deg, var(--eh-tone) 0%, #fde047 100%);
}

.eh-hero--tone-orange .eh-hero__bar-fill {
  background: linear-gradient(90deg, var(--eh-tone) 0%, #fdba74 100%);
}

.eh-hero--tone-red .eh-hero__bar-fill {
  background: linear-gradient(90deg, var(--eh-tone) 0%, #fca5a5 100%);
}

.eh-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.eh-hero__chip {
  flex: 1 1 calc(50% - 6px);
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.eh-hero__chip--date {
  flex: 1 1 100%;
}

.eh-hero__chip-n {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  line-height: 1.1;
  flex: 0 0 auto;
}

.eh-hero__chip-n--sm {
  font-size: 13px;
  font-weight: 700;
}

.eh-hero__chip-l {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .eh-hero__ring-fill,
  .eh-hero__bar-fill {
    transition: none;
  }
}


.eh-section {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  min-width: 0;
}

.eh-section__title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.eh-empty {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.eh-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.eh-mini-card {
  min-width: 0;
  padding: 8px;
  border-radius: 11px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.eh-mini-card--nav {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.eh-mini-card--nav:active {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.eh-mini-card__stats {
  margin: 6px 0 0;
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
  min-width: 0;
}

.eh-mini-card__stats strong {
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.eh-mod-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
}

.eh-mod-progress__track {
  flex: 1 1 auto;
  min-width: 0;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.eh-mod-progress__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16a34a, #86efac);
}

.eh-mod-progress__txt {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #64748b;
}

.eh-section__hint {
  margin: -2px 0 8px;
  font-size: 12px;
  color: #64748b;
}

.eh-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0 0 10px;
  min-width: 0;
  font-size: 12px;
  color: #64748b;
}

.eh-crumb__link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: #0f766e;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.eh-crumb__sep {
  color: #cbd5e1;
}

.eh-crumb__item.is-current {
  color: #0f172a;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.eh-back-btn {
  display: inline-flex;
  align-items: center;
  margin: 0 0 8px;
  padding: 6px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #0f766e;
  cursor: pointer;
}

.eh-subhead {
  margin: 0 0 12px;
  min-width: 0;
}

.eh-page--sub .eh-page__title {
  margin: 0;
}

.eh-page--enter {
  animation: ehPageIn 0.22s ease-out;
}

@keyframes ehPageIn {
  from {
    opacity: 0.35;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eh-page--enter {
    animation: none;
  }
}

.eh-mod-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.eh-mod-stat {
  min-width: 0;
  padding: 10px 8px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  text-align: center;
}

.eh-mod-stat__n {
  display: block;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  line-height: 1.1;
}

.eh-mod-stat__l {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.eh-mod-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.eh-finding-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eh-finding {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  -webkit-tap-highlight-color: transparent;
}

.eh-finding:active {
  background: #f8fafc;
}

.eh-finding__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.eh-finding__id {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.eh-finding__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eh-finding__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.eh-finding-detail__id {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.eh-finding-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eh-finding-detail__row {
  display: flex;
  gap: 10px;
  min-width: 0;
  align-items: baseline;
}

.eh-finding-detail__k {
  flex: 0 0 88px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.eh-finding-detail__v {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eh-mini-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.eh-mini-card__title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  min-width: 0;
  flex: 1;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  white-space: normal;
}

.eh-mini-card__note {
  margin: 5px 0 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.eh-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eh-status--pass {
  background: #ecfdf5;
  color: #047857;
}

.eh-status--warn {
  background: #fffbeb;
  color: #b45309;
}

.eh-status--info {
  background: #eff6ff;
  color: #1d4ed8;
}

.eh-status--fail {
  background: #fef2f2;
  color: #b91c1c;
}

.eh-status--todo {
  background: #f1f5f9;
  color: #475569;
}

.eh-qw__task {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.eh-qw--done .eh-qw__title {
  color: #334155;
}

.eh-qw--in_progress {
  border-color: rgba(180, 83, 9, 0.28);
}

.eh-qw--verifying {
  border-color: rgba(180, 83, 9, 0.2);
}

.eh-audit__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 7px;
}

.eh-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.eh-stat {
  min-width: 0;
  padding: 8px;
  border-radius: 11px;
  background: #f8fafc;
}

.eh-stat--lead {
  background: #f1f5f9;
}

.eh-stat--span {
  grid-column: 1 / -1;
}

.eh-stat__label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 3px;
}

.eh-stat__value {
  display: block;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  line-height: 1.2;
}

.eh-sev-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
  background: #e2e8f0;
}

.eh-sev-bar--clean {
  background: #ecfdf5;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 28px;
  padding: 4px 8px;
}

.eh-sev-bar__clean {
  font-size: 11px;
  color: #047857;
  font-weight: 600;
}

.eh-sev-bar__seg {
  display: block;
  height: 100%;
  min-width: 0;
}

.eh-sev-bar__seg--c {
  background: #dc2626;
}

.eh-sev-bar__seg--h {
  background: #ea580c;
}

.eh-sev-bar__seg--m {
  background: #ca8a04;
}

.eh-sev-bar__seg--l {
  background: #64748b;
}

.eh-sev-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
  font-size: 11px;
  color: #64748b;
}

.eh-sev-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.eh-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.eh-dot--c {
  background: #dc2626;
}

.eh-dot--h {
  background: #ea580c;
}

.eh-dot--m {
  background: #ca8a04;
}

.eh-dot--l {
  background: #64748b;
}

.eh-metric-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.eh-metric-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
}

.eh-metric-row:last-child {
  border-bottom: 0;
}

.eh-metric-row__label {
  font-size: 13px;
  color: #334155;
  min-width: 0;
}

.eh-metric-row__value {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  text-align: right;
  flex-shrink: 0;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eh-qw-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.eh-qw {
  display: flex;
  gap: 8px;
  min-width: 0;
  width: 100%;
  padding: 8px;
  border-radius: 11px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.eh-qw:active {
  background: #f1f5f9;
}

.eh-qw__rank {
  flex-shrink: 0;
  width: 22px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  padding-top: 1px;
  font-variant-numeric: tabular-nums;
}

.eh-qw__title {
  margin: 0 0 5px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.eh-qw__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  font-size: 11px;
  color: #64748b;
  align-items: center;
}

.eh-qw__hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #ea580c;
}

.eh-report-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eh-report-btn {
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 11px;
  padding: 9px 10px;
  cursor: pointer;
  min-width: 0;
}

.eh-report-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.eh-report-btn__title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.eh-report-btn__path {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eh-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eh-timeline__item {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 2px 8px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
  min-width: 0;
}

.eh-timeline__item:last-child {
  border-bottom: 0;
}

.eh-timeline__task {
  grid-row: 1 / span 2;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  align-self: center;
}

.eh-timeline__title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eh-timeline__date {
  font-size: 11px;
  color: #64748b;
}

.eh-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.eh-check-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
}

.eh-check-list__item:last-child {
  border-bottom: 0;
}

.eh-check-list__label {
  font-size: 13px;
  color: #334155;
  min-width: 0;
}

.eh-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: #fffaf5;
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
}

.eh-viewer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.eh-viewer__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.eh-viewer__path {
  margin: 2px 0 0;
  font-size: 11px;
  color: #94a3b8;
  word-break: break-all;
}

.eh-viewer__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.eh-viewer__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px;
}

.eh-viewer__pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  color: #0f172a;
}

@media (min-width: 901px) {
  .eh-page {
    padding: 16px 20px 32px;
  }

  .eh-hero {
    min-height: 248px;
    padding: 20px 22px 18px;
    border-radius: 24px;
  }

  .eh-hero__main {
    gap: 22px;
  }

  .eh-hero__gauge {
    width: 132px;
    height: 132px;
  }

  .eh-hero__score-num {
    font-size: 42px;
  }

  .eh-hero__score-den {
    font-size: 12px;
  }

  .eh-hero__score-label {
    font-size: 13px;
  }

  .eh-hero__status-pill {
    font-size: 14px;
    padding: 6px 12px;
  }

  .eh-hero__chips {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .eh-hero__chip,
  .eh-hero__chip--date {
    flex: 1 1 0;
  }

  .eh-hero__chip-n {
    font-size: 16px;
  }

  .eh-card-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .eh-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .eh-stat--span {
    grid-column: span 2;
  }

  .eh-timeline__item {
    grid-template-columns: 100px 1fr 110px;
  }

  .eh-timeline__task {
    grid-row: auto;
  }

  .eh-timeline__date {
    text-align: right;
    align-self: center;
  }

  .eh-viewer {
    inset: 40px 10% 40px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
  }

  .eh-status {
    max-width: none;
  }

  .eh-sheet-host {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  .eh-sheet {
    max-width: 520px;
    max-height: min(88vh, 760px);
    border-radius: 16px;
    transform: none;
  }

  .eh-sheet__grab {
    display: none;
  }
}

/* Quick Win detail sheet */
.eh-sheet-host {
  position: fixed;
  inset: 0;
  /* Above Tools shell (8000) and owner bottom nav (8100); match other Tools modals. */
  z-index: 9100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: auto;
}

.eh-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.eh-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(92vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18);
  padding-bottom: env(safe-area-inset-bottom, 0);
  min-width: 0;
}

.eh-sheet__grab {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  margin: 8px auto 0;
}

.eh-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid #f1f5f9;
}

.eh-sheet__id {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.eh-sheet__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.eh-sheet__x {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.eh-sheet__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
}

.eh-sheet__badges .eh-status {
  max-width: none;
  height: auto;
  min-height: 20px;
  padding: 3px 8px;
  white-space: normal;
  text-transform: none;
  font-size: 10px;
  letter-spacing: 0;
}

.eh-sheet__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 14px 12px;
}

.eh-sheet__block {
  margin: 0 0 12px;
}

.eh-sheet__block h4 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.eh-sheet__block p {
  margin: 0;
  font-size: 13px;
  color: #0f172a;
  line-height: 1.45;
}

.eh-sheet__muted {
  margin-top: 4px !important;
  font-size: 12px !important;
  color: #94a3b8 !important;
  word-break: break-all;
}

.eh-sheet__files {
  margin: 0;
  padding-left: 16px;
}

.eh-sheet__files code {
  font-size: 12px;
  word-break: break-all;
}

.eh-sheet__foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid #f1f5f9;
  background: #fff;
  z-index: 2;
}

.eh-sheet__btn {
  height: 40px;
  border-radius: 11px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}

.eh-sheet__btn--primary {
  border-color: #ea580c;
  background: #ea580c;
  color: #fff;
}

.eh-sheet-toast[hidden] {
  display: none !important;
}

.eh-sheet-toast {
  position: absolute;
  left: 50%;
  bottom: calc(58px + env(safe-area-inset-bottom, 0));
  transform: translateX(-50%) translateY(8px);
  z-index: 20;
  max-width: min(92%, 360px);
  padding: 10px 14px;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.eh-sheet-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.eh-sheet-toast--error {
  background: #b91c1c;
}
