/* ===============================
   BASE
================================ */
* {
  box-sizing: border-box;
  font-family: "Prompt", sans-serif;
}

body {
  background: #f1f5f9;
  padding: 20px;
}

.container {
  max-width: 1100px;
  margin: auto;
  background: #fff;
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
}

/* ===============================
   HEADER
================================ */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.header-bar h2 {
  margin: 0;
  color: #1f2937;
}

.job-code {
  background: #eef2ff;
  color: #3730a3;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}

/* ===============================
   SECTION
================================ */
.section {
  margin-bottom: 28px;
}

.section h3 {
  color: #2563eb;
  font-size: 16px;
  margin-bottom: 12px;
  border-left: 4px solid #2563eb;
  padding-left: 8px;
}

/* ===============================
   GRID (ฟอร์มอ่านง่าย)
================================ */
.grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 16px;
  font-size: 14px;
}

.grid > div {
  padding: 6px 0;
}

.grid strong {
  color: #374151;
  font-weight: 500;
}

/* ===============================
   STATUS
================================ */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.pending {
  background: #fde68a;
  color: #92400e;
}

.in_progress {
  background: #bfdbfe;
  color: #1e40af;
}

.approved {
  background: #bbf7d0;
  color: #166534;
}

.rejected {
  background: #fecaca;
  color: #991b1b;
}

/* ===============================
   FILE LIST
================================ */
.files a {
  display: block;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: #f8fafc;
  color: #2563eb;
  text-decoration: none;
  font-size: 14px;
}

.files a:hover {
  background: #eef2ff;
}

/* ===============================
   SIGNATURE (เรียงแถวเดียว)
================================ */
.signature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 10px;
}

.sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  text-align: center;
  border: 1px solid #e5e7eb;
  padding: 16px;
  border-radius: 14px;
  background: #f9fafb;
}

.sign img {
  width: 180px;
  height: 90px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin: 8px 0;
}

.sign-name {
  margin-top: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}

.sign-pos {
  font-size: 12px;
  color: #6b7280;
}

.sign-empty {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 13px;
}

/* ===============================
   BUTTON
================================ */
.back {
  display: inline-block;
  margin-top: 20px;
  background: #6b7280;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
}

.back:hover {
  background: #4b5563;
}

/* ===============================
   RESPONSIVE (Mobile)
================================ */
@media (max-width: 768px) {

  .grid {
    grid-template-columns: 1fr;
  }

  .signature-grid {
    grid-template-columns: 1fr;
  }

  .job-code {
    font-size: 12px;
    padding: 4px 10px;
  }
}
