.tools-page-shell {
  padding-bottom: 48px;
}

.tools-hero {
  padding: 64px 0 28px;
}

.thermoprops-app {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.tools-page-shell .page-main,
.tools-page-shell .page-content,
.thermoprops-panel,
.thermoprops-states {
  min-width: 0;
}

.thermoprops-app__bar,
.thermoprops-panel {
  background: var(--color-surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.thermoprops-app__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
}

.thermoprops-app__bar h2,
.thermoprops-section-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.thermoprops-app__eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.thermoprops-engine {
  min-width: 188px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--color-primary-softer);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
}

.thermoprops-engine.is-ready {
  background: rgba(22, 140, 82, 0.1);
  color: #12623c;
}

.thermoprops-engine.is-error {
  background: rgba(188, 55, 55, 0.1);
  color: #9b2727;
}

.thermoprops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.thermoprops-panel {
  padding: 20px;
}

.thermoprops-form {
  display: grid;
  gap: 16px;
}

.thermoprops-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.thermoprops-field label {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.thermoprops-field input,
.thermoprops-field select,
.thermoprops-result-card select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
}

.thermoprops-field input,
.thermoprops-field select {
  padding: 10px 12px;
}

.thermoprops-field select,
.thermoprops-result-card select {
  cursor: pointer;
}

.thermoprops-field input:focus,
.thermoprops-field select:focus,
.thermoprops-result-card select:focus {
  border-color: var(--color-primary-hover);
  box-shadow: 0 0 0 4px var(--color-state-focus-ring);
}

.thermoprops-input-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(140px, 0.75fr) minmax(150px, 0.85fr);
  gap: 14px;
}

.thermoprops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.thermoprops-actions--compact {
  justify-content: flex-end;
}

.thermoprops-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.thermoprops-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--color-state-focus-outline);
  box-shadow: var(--shadow-soft);
}

.thermoprops-button--primary {
  border-color: transparent;
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.thermoprops-button--danger {
  color: #9b2727;
}

.thermoprops-button:disabled {
  background: var(--color-state-disabled-bg);
  color: var(--color-state-disabled-text);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.thermoprops-message {
  min-height: 22px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.thermoprops-message.is-error {
  color: #9b2727;
}

.thermoprops-message.is-success {
  color: #12623c;
}

.thermoprops-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.thermoprops-section-head p {
  margin: 5px 0 0;
  font-size: 0.9rem;
}

.thermoprops-section-head--actions {
  align-items: center;
}

.thermoprops-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.thermoprops-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(124px, 0.42fr);
  gap: 14px;
  align-items: end;
  min-height: 108px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--gradient-surface);
}

.thermoprops-result-card__label {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.thermoprops-result-card__value {
  min-height: 34px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.thermoprops-result-card__value.is-text {
  font-size: 0.98rem;
}

.thermoprops-result-card select {
  padding: 8px 10px;
  font-weight: 800;
  min-width: 124px;
}

.thermoprops-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.thermoprops-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  background: var(--color-surface);
}

.thermoprops-table th,
.thermoprops-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.86rem;
  text-align: left;
  white-space: nowrap;
}

.thermoprops-table th {
  background: var(--color-primary-800);
  color: var(--color-on-primary);
  font-weight: 800;
}

.thermoprops-table tbody tr:nth-child(even) td {
  background: var(--color-primary-softer);
}

.thermoprops-table tbody tr:last-child td {
  border-bottom: 0;
}

.thermoprops-table__empty {
  color: var(--muted) !important;
  text-align: center !important;
}

@media (max-width: 1100px) {
  .thermoprops-result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .thermoprops-input-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .tools-hero {
    padding-top: 42px;
  }

  .thermoprops-app__bar,
  .thermoprops-section-head,
  .thermoprops-section-head--actions {
    display: grid;
  }

  .thermoprops-engine,
  .thermoprops-actions,
  .thermoprops-actions--compact {
    width: 100%;
  }

  .thermoprops-result-card {
    grid-template-columns: 1fr;
  }

  .thermoprops-result-card select {
    min-width: 0;
  }

  .thermoprops-button {
    width: 100%;
  }
}
