main.content:has(#sub-app) {
  min-width: 0;
}

.sub-container {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: #1a1a1a;
}

.sub-card {
  box-sizing: border-box;
  background: #f8f9fa;
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  padding: 1.2rem 1.35rem;
}

.sub-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e1e4e8;
}

.sub-card-header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #2d3436;
}

.sub-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.sub-input,
.sub-select {
  box-sizing: border-box;
  padding: 0.5rem 0.7rem;
  border: 1px solid #cfd4da;
  border-radius: 6px;
  background: #fff;
  color: #2d3436;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.95rem;
}

.sub-btn {
  appearance: none;
  background: #fff;
  border: 1px solid #cfd4da;
  color: #2d3436;
  border-radius: 6px;
  padding: 0.45rem 0.78rem;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.sub-btn:hover {
  border-color: #00cec9;
  background: #e6fffe;
}

.sub-btn-primary {
  background: #2d3436;
  border-color: #2d3436;
  color: #fff;
}

.sub-btn-primary:hover {
  background: #00cec9;
  border-color: #00cec9;
  color: #1a1a1a;
}

.sub-error {
  margin: 0.75rem 0 0 0;
  padding: 0.65rem 0.9rem;
  background: #fff0f0;
  border: 1px solid #ff7675;
  border-radius: 6px;
  color: #c0392b;
  font-weight: 600;
  font-size: 0.88rem;
}

.sub-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
}

.sub-stat {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
}

.sub-stat-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #636e72;
  font-weight: 700;
}

.sub-stat-value {
  display: block;
  margin-top: 0.2rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.94rem;
  font-weight: 700;
  color: #2d3436;
  word-break: break-all;
}

.sub-table-wrap {
  overflow-x: auto;
  margin-top: 0.85rem;
}

.sub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.sub-table th,
.sub-table td {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #e1e4e8;
  white-space: nowrap;
}

.sub-table th {
  font-family: inherit;
  font-size: 0.76rem;
  text-transform: uppercase;
  color: #636e72;
}

@media (max-width: 640px) {
  .sub-card {
    padding: 1rem;
  }
}
