* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f3f6f8;
  color: #16212d;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: #263644;
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

header p {
  margin-top: 4px;
  color: #c9d5df;
}

main {
  width: min(1280px, calc(100vw - 32px));
  margin: 20px auto;
}

.panel {
  background: #fff;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 22px rgba(35, 49, 65, 0.06);
}

.panel-title,
.order-row,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title {
  justify-content: space-between;
}

.order-row select {
  flex: 1;
}

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

.login-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.hint {
  margin-top: 10px;
  color: #657487;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
}

input,
select,
button {
  height: 36px;
  border-radius: 4px;
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd8e2;
  padding: 0 8px;
  background: #fff;
}

textarea {
  min-height: 80px;
  padding: 8px;
  resize: vertical;
}

h3 {
  margin: 16px 0 10px;
  font-size: 15px;
}

.wide-field {
  margin-top: 12px;
}

button {
  border: 1px solid #0b5cab;
  background: #0b5cab;
  color: #fff;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.actions {
  margin-top: 14px;
  flex-wrap: wrap;
}

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

.field {
  border: 1px solid #d9e1e8;
  border-radius: 4px;
  padding: 10px;
}

.field span {
  display: block;
  color: #657487;
  font-size: 12px;
  margin-bottom: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

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

th {
  color: #657487;
  font-size: 12px;
}

.num {
  text-align: right;
  white-space: nowrap;
}

pre {
  overflow: auto;
  background: #17202a;
  color: #f8fafc;
  border-radius: 6px;
  padding: 12px;
}

.draft-empty {
  color: #657487;
}

@media (max-width: 900px) {
  header,
  .panel-title,
  .order-row {
    align-items: stretch;
    flex-direction: column;
  }

  .grid,
  .login-grid,
  .draft-grid {
    grid-template-columns: 1fr;
  }
}
