* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f7f8;
  color: #1a1a1a;
  margin: 0;
  padding: 2rem 1rem;
}

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 2rem;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

h1 {
  margin-top: 0;
  font-size: 1.4rem;
}

label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #555;
}

input, select, button, textarea {
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
}

button {
  background: #1a1a1a;
  color: #fff;
  border: none;
  cursor: pointer;
}

button:hover {
  background: #333;
}

button:disabled {
  background: #aaa;
  cursor: not-allowed;
}

.secondary-btn {
  background: transparent;
  color: #555;
  border: 1px solid #ccc;
}

.secondary-btn:hover {
  background: #f0f0f0;
}

.message {
  font-size: 0.85rem;
  color: #b3261e;
  min-height: 1.2em;
}

.status-line {
  font-size: 0.85rem;
  color: #444;
  margin: 0.5rem 0 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.82rem;
}

th, td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.wrap-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.5em;
}

.status-select {
  width: 130px;
}

.sourcing-remarks-input {
  width: 150px;
  resize: vertical;
}

.number-products-input {
  width: 70px;
}

.order-id-input {
  width: 120px;
}

.sourcing-amount-input {
  width: 90px;
}

.account-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.account-field label {
  margin-bottom: 0;
  white-space: nowrap;
}

.account-field input {
  width: 200px;
}

.row-message {
  margin: 0.25rem 0 0;
  min-height: 1em;
}

.toggle-links-btn {
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
  white-space: nowrap;
}

.links-detail-row.hidden {
  display: none;
}

.links-detail-row td {
  padding: 0.75rem 1rem;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}

.links-detail {
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.7;
}

.links-detail a {
  color: #1a56db;
}

.request-exception-block {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #ddd;
}
