:root {
  --navy: #10253f;
  --blue: #1e72b8;
  --pale: #f3f7fb;
  --gold: #edb343;
  --ink: #183147;
  --line: #dbe5ee;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--pale);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    "Noto Sans Thai",
    sans-serif;
}
header {
  height: 68px;
  background: var(--navy);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 max(5vw, 24px);
}
.brand {
  font-size: 21px;
  font-weight: 800;
  color: white;
  text-decoration: none;
  letter-spacing: 0.5px;
}
.brand span {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 8px;
  font-weight: 500;
}
nav {
  display: flex;
  gap: 20px;
}
nav a {
  color: #dbeafa;
  text-decoration: none;
  font-size: 14px;
}
main {
  max-width: 1040px;
  margin: auto;
  padding: 44px 24px 64px;
}
footer {
  text-align: center;
  color: #738596;
  font-size: 13px;
  padding: 28px;
}
.hero {
  text-align: center;
  padding: 15px 0 30px;
}
.hero h1,
.receipt h1,
.admin-head h1 {
  margin: 5px 0;
  font-size: clamp(28px, 4vw, 42px);
  color: var(--navy);
}
.compact {
  padding-bottom: 20px;
}
.eyebrow {
  color: var(--blue);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 12px;
  margin: 0;
}
.hero p:not(.eyebrow) {
  color: #5b6c7c;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 5px 16px #1736530a;
  margin-bottom: 20px;
}
h2 {
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--navy);
}
label {
  display: block;
  font-weight: 650;
  font-size: 14px;
  margin: 14px 0;
}
input,
textarea,
select {
  margin-top: 6px;
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #bdccda;
  border-radius: 8px;
  font: inherit;
  background: white;
}
textarea {
  resize: vertical;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 18px;
}
.grid label {
  min-width: 0;
}
.three {
  grid-template-columns: repeat(3, 1fr);
}
.sizes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.sizes label {
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}
.sizes input {
  width: 100%;
  text-align: center;
  margin: 8px 0 3px;
  padding: 7px;
}
.sizes span,
.muted,
small {
  color: #6b7c8c;
  font-weight: 400;
}
.total {
  text-align: right;
  font-size: 17px;
}
.total strong {
  color: var(--blue);
  font-size: 22px;
}
.choice {
  display: flex;
  gap: 28px;
}
.choice label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.choice input {
  display: inline;
  width: auto;
  margin: 0;
}
.hidden {
  display: none;
}
.primary,
.button {
  display: inline-block;
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  padding: 12px 20px;
  font-weight: 750;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  margin-top: 12px;
}
.secondary {
  background: white;
  border: 1px solid #b9cad9;
  color: var(--navy);
}
.alert {
  padding: 13px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
}
.error {
  background: #fff0ef;
  color: #a12e23;
}
.success {
  background: #edfaf2;
  color: #18713b;
}
.receipt,
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.status {
  font-size: 12px;
  font-weight: 800;
  display: inline-block;
  padding: 5px 9px;
  border-radius: 99px;
  background: #f2f4f5;
  color: #546371;
}
.awaiting_review {
  background: #fff5d8;
  color: #8a5a00;
}
.paid,
.shipped {
  background: #e7f8ee;
  color: #13713d;
}
.packing {
  background: #e5f1ff;
  color: #1e5d98;
}
.cancelled {
  background: #ffeaea;
  color: #a23030;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.line {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.grand {
  font-size: 18px;
  border: 0;
}
.payment form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.payment input[type="file"] {
  max-width: 360px;
}
.slip-preview {
  border-top: 1px solid var(--line);
  margin: 18px 0;
  padding-top: 12px;
}
.slip-preview img {
  max-width: 280px;
  max-height: 380px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: block;
}
.narrow {
  max-width: 620px;
  margin: auto;
}
.results a {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}
th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  color: #617588;
  font-size: 13px;
}
.thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 7px;
}
.small-btn {
  border: 0;
  background: var(--navy);
  color: white;
  border-radius: 6px;
  padding: 7px;
  margin-top: 6px;
  cursor: pointer;
}
td select {
  font-size: 12px;
  padding: 6px;
  margin: 0;
  min-width: 130px;
}
@media (max-width: 650px) {
  header {
    height: auto;
    padding: 15px 20px;
    flex-direction: column;
    gap: 12px;
  }
  main {
    padding: 30px 16px;
  }
  .card {
    padding: 20px;
  }
  .grid,
  .three,
  .two-col {
    grid-template-columns: 1fr;
  }
  .sizes {
    grid-template-columns: repeat(3, 1fr);
  }
  .choice {
    display: block;
  }
  .receipt,
  .admin-head {
    align-items: flex-start;
    gap: 15px;
  }
  .receipt .button {
    white-space: nowrap;
  }
  .results a {
    grid-template-columns: 1fr;
  }
  .payment form {
    align-items: stretch;
  }
  .payment input[type="file"] {
    max-width: none;
  }
}
