.eh-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.eh-search {
  width: min(210px, 34vw);
  min-height: 34px;
  padding: 0 10px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
}

.eh-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.1);
}

.eh-btn {
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.eh-btn:hover,
.eh-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.eh-quick {
  margin-top: 2px;
}

.eh-exam-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 780px;
  margin: 0 auto 12px;
  padding: 10px 14px;
  color: #8b4a13;
  font-size: 12px;
  font-weight: 700;
  background: var(--gold-soft);
  border: 1px solid #f2d49b;
  border-radius: 10px;
}

.eh-exam-bar strong {
  color: var(--red);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.eh-section {
  margin-top: 18px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.eh-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.eh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.eh-stat {
  padding: 12px;
  background: var(--surface);
  border-radius: 9px;
}

.eh-stat strong,
.eh-stat span {
  display: block;
}

.eh-stat strong {
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

.eh-stat span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.eh-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(120px, 1.2fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.eh-row:last-child {
  border-bottom: 0;
}

.eh-row strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eh-row span {
  color: var(--muted);
  font-size: 10px;
}

.eh-bar {
  height: 7px;
  overflow: hidden;
  background: var(--surface);
  border-radius: 999px;
}

.eh-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.eh-trend {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  height: 110px;
  align-items: end;
}

.eh-day {
  display: grid;
  height: 100%;
  align-items: end;
  gap: 5px;
  text-align: center;
}

.eh-day-track {
  display: flex;
  height: 82px;
  align-items: end;
  overflow: hidden;
  background: var(--surface);
  border-radius: 5px 5px 2px 2px;
}

.eh-day-track span {
  width: 100%;
  min-height: 3px;
  background: var(--accent);
}

.eh-day small {
  color: var(--muted);
  font-size: 8px;
}

.eh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.eh-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.eh-badge {
  padding: 6px 9px;
  color: #8a5a12;
  font-size: 10px;
  font-weight: 700;
  background: var(--gold-soft);
  border: 1px solid #ecd79d;
  border-radius: 999px;
}

.eh-badge.locked {
  opacity: 0.38;
  filter: grayscale(1);
}

.eh-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.eh-field input {
  min-height: 36px;
  padding: 0 9px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

body.dark .eh-section,
body.dark .eh-stat {
  background: var(--card);
}

@media (max-width: 760px) {
  .eh-search {
    width: 130px;
  }

  .eh-toolbar .eh-btn {
    display: none;
  }

  .eh-toolbar .eh-btn.eh-essential {
    display: inline-flex;
    align-items: center;
  }

  .eh-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .eh-row .eh-bar {
    grid-column: 1 / -1;
  }
}
