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

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

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

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

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

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

.emptying-app__bar h2,
.emptying-section-head h3,
.emptying-form__group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
}

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

.emptying-engine {
  min-width: 188px;
  padding: 10px 12px;
  border: 1px solid rgba(18, 98, 60, 0.2);
  border-radius: 8px;
  background: rgba(22, 140, 82, 0.1);
  color: #12623c;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
}

.emptying-panel {
  padding: 20px;
}

.emptying-form {
  display: grid;
  gap: 18px;
}

.emptying-form__group {
  display: grid;
  gap: 14px;
}

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

.emptying-field--wide {
  max-width: 460px;
}

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

.emptying-field input,
.emptying-field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.94rem;
  outline: none;
}

.emptying-field select {
  cursor: pointer;
}

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

.emptying-dimensions,
.emptying-input-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.emptying-input-row--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

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

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

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

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

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

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

.emptying-visual {
  min-width: 0;
}

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

.emptying-svg-shell {
  min-height: 380px;
}

.emptying-chart {
  min-height: 380px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdfe, #f2f8fa);
  overflow: hidden;
}

.emptying-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.emptying-chart__empty {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.emptying-chart-bg {
  fill: #fff;
}

.emptying-chart-grid {
  fill: none;
  stroke: #d8e5ea;
  stroke-width: 1;
}

.emptying-chart-axis {
  fill: none;
  stroke: #172033;
  stroke-width: 2;
}

.emptying-chart-line {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.emptying-chart-label {
  fill: #607080;
  font: 12px Arial, Helvetica, sans-serif;
}

.emptying-chart-title {
  fill: #172033;
  font: 700 13px Arial, Helvetica, sans-serif;
}

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

.emptying-result-card {
  min-height: 106px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--gradient-surface);
}

.emptying-result-card--empty {
  grid-column: 1 / -1;
  color: var(--muted);
}

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

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

.emptying-result-card__hint {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.emptying-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.emptying-detail-grid div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf4f6;
  padding-bottom: 8px;
}

.emptying-detail-grid strong {
  color: var(--ink);
  text-align: right;
  overflow-wrap: anywhere;
}

.emptying-alerts {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.emptying-alert {
  border-left: 4px solid #b7791f;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.12);
  color: #744210;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
}

[hidden] {
  display: none !important;
}

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

  .emptying-dimensions,
  .emptying-input-row,
  .emptying-input-row--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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

  .emptying-engine,
  .emptying-actions,
  .emptying-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .emptying-dimensions,
  .emptying-input-row,
  .emptying-input-row--compact,
  .emptying-detail-grid {
    grid-template-columns: 1fr;
  }
}
