* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #172b4d;
  background: #f5f7fa;
  font-family: Arial, Helvetica, sans-serif;
}

.page {
  width: 100%;
  min-height: 900px;
  padding: 24px;
}

.panel {
  width: 100%;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
}

.topbar,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
}

h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

p {
  margin: 0;
}

.muted {
  color: #6b778c;
}

.notice {
  margin: 20px 0;
  padding: 12px 14px;
  color: #344563;
  background: #f4f5f7;
  border: 1px solid #dfe3ea;
  border-radius: 6px;
}

.notice-success {
  color: #064b2c;
  background: #e3fcef;
  border-color: #abf5d1;
}

.notice-warning {
  color: #5f3811;
  background: #fff7d6;
  border-color: #f5d06f;
}

.notice-error {
  color: #7a1f17;
  background: #ffebe6;
  border-color: #ffbdad;
}

.section {
  margin-top: 24px;
}

.search {
  width: min(360px, 100%);
  height: 38px;
  padding: 8px 10px;
  color: #172b4d;
  background: #ffffff;
  border: 1px solid #c1c7d0;
  border-radius: 6px;
  font: inherit;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(520px, 100%);
}

.search-row .search {
  flex: 1;
}

.table-wrap {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #ebecf0;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #5e6c84;
  background: #f4f5f7;
  font-size: 13px;
  font-weight: 700;
}

.stock-col,
.stock-cell {
  width: 48px;
  min-width: 48px;
  max-width: 56px;
  padding-right: 6px;
  padding-left: 6px;
  text-align: center;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

.empty {
  padding: 24px;
  color: #6b778c;
  text-align: center;
}

.number-input {
  width: 110px;
  height: 34px;
  padding: 6px 8px;
  color: #172b4d;
  border: 1px solid #c1c7d0;
  border-radius: 6px;
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  color: #ffffff;
  background: #0b66c3;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.button:hover {
  background: #0052a3;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-secondary {
  color: #0b66c3;
  background: #e9f2ff;
}

.button-secondary:hover {
  background: #d7e8ff;
}

.button-danger {
  background: #de350b;
}

.button-danger:hover {
  background: #bf2600;
}

.button-small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.debug {
  display: grid;
  gap: 12px;
  margin: 0;
}

.debug div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
}

.debug dt {
  color: #6b778c;
}

.debug dd {
  margin: 0;
  font-weight: 700;
}
