.title {
  margin-bottom: var(--space-6);
  text-align: center;
}

.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-4) 0;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 6px rgba(10, 20, 30, 0.04);
}

.item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1; /* Ensure it takes available space */
}

.file-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-settings-diff {
  margin-left: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #8a6d1f;
  white-space: normal;
}
.file-details {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.item-controls {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);

  label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
  }
}

.qty-input {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-align: center;
  &:focus {
    outline: none;
    border-color: var(--color-brand);
  }
}

.item-price {
  font-weight: 600;
  min-width: 60px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-height: 2.1rem;
}

.item-total-price {
  line-height: 1.1;
}

.item-unit-price {
  margin-top: 2px;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.2;
}

.item-unit-price--placeholder {
  visibility: hidden;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-2);

  @media (min-width: 500px) {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }
}

.setup-note {
  text-align: center;
  margin-bottom: var(--space-6);
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);

  @media (max-width: 640px) {
    flex-direction: column;
    align-items: stretch;
  }
}

.actions-left,
.actions-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.actions-right {
  justify-content: flex-end;

  @media (max-width: 640px) {
    justify-content: flex-start;
  }
}

.limit-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: right;

  @media (max-width: 640px) {
    text-align: left;
  }
}

.notes-section {
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: var(--color-neutral-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);

  label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: var(--space-2);
  }

  p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text);
    white-space: pre-wrap; /* Preserve line breaks */
  }
}

.recalc-banner {
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  border: 1px solid #f0c95a;
  background: #fff8e1;
  border-radius: var(--radius-md);
  color: #6f5b1a;
  font-size: 0.9rem;
}
