.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.field-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.oh-input,
.oh-select {
  width: 100%;
  padding: 0.62rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.94rem;
}

.oh-input:focus,
.oh-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
}

.check-row input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--primary-color);
}

.dropzone-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.dropzone-sub {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.selected-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary-color);
  font-size: 0.86rem;
  font-weight: 700;
}

.action-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1rem;
}

.report-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.07);
  border: 1px solid rgba(37, 99, 235, 0.22);
  margin-top: 1.25rem;
  margin-bottom: 0;
}

.eval-split {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.eval-split > * {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.chart-panel {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem 1rem;
  text-align: center;
}

.chart-panel svg {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.sub-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin-bottom: 1rem;
  background: var(--bg-color);
  min-width: 0;
  max-width: 100%;
}

.sub-card h3 {
  font-size: 1.03rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.details-box {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-top: 0.85rem;
  background: var(--bg-color);
}

.details-box summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
}

.guide-shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.guide-shot-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  background: var(--bg-color);
}

.guide-shot-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.stress-nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.stress-nav-pills a {
  padding: 0.3rem 0.68rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
}

.stress-nav-pills a.current,
.stress-nav-pills a:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.ref-tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.ref-tables-grid > * {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.ref-tables-grid table,
.oh-guide table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.ref-tables-grid th,
.ref-tables-grid td,
.oh-guide th,
.oh-guide td {
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.6rem;
}

.ref-tables-grid caption,
.oh-guide caption {
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.num-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.row-highlight td {
  font-weight: 700;
  background: rgba(37, 99, 235, 0.08);
}

@media (max-width: 768px) {
  .sub-card {
    padding: 0.85rem 0.7rem;
  }
  .sub-card .sub-card {
    padding: 0.75rem 0.6rem;
  }
  .filter-bar > .field-group {
    min-width: 0 !important;
    flex: 1 1 100%;
  }
  .chart-panel {
    padding: 0.75rem 0.5rem;
  }
}
