:root {
  color-scheme: light;
  --red: #cf142b;
  --ink: #202124;
  --muted: #68707d;
  --line: #d9dde5;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --gold: #b97916;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.form-page {
  background:
    linear-gradient(180deg, rgba(207, 20, 43, 0.08), rgba(246, 247, 249, 0) 260px),
    var(--bg);
}

.form-shell {
  max-width: 820px;
}

.form-head,
.admin-top {
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.form-head p:last-child {
  color: var(--muted);
  line-height: 1.7;
}

.panel,
.filters,
.stats,
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel {
  padding: 22px;
}

.grid {
  display: grid;
  gap: 16px;
}

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}

textarea {
  resize: vertical;
}

button,
.export {
  border: 0;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 700;
  text-decoration: none;
}

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

.secondary {
  background: #2f6f55;
}

.danger {
  background: #8f1d2c;
}

.small-delete {
  min-height: 34px;
  padding: 0 12px;
}

.primary {
  width: 100%;
  margin-top: 4px;
}

.message {
  min-height: 24px;
  color: var(--muted);
}

.hidden {
  display: none;
}

.success {
  color: #167a3a;
}

.error {
  color: var(--red);
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
}

.stats div {
  padding: 18px;
  background: #fff;
}

.stats span {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--red);
}

.stats small {
  color: var(--muted);
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.filters label {
  margin: 0;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  background: #fafafa;
  color: #3d4451;
  font-size: 14px;
}

.status-select {
  min-width: 112px;
  padding: 8px;
}

@media (max-width: 760px) {
  .two,
  .filters,
  .stats {
    grid-template-columns: 1fr;
  }

  .admin-top {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 25px;
  }
}
