* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Sarabun', sans-serif;
}

body {
  background-color: #f4f7fa;
  color: #333;
  line-height: 1.6;
}
header {
  background: linear-gradient(90deg, #1e3a8a, #3b82f6);
  color: white;
  text-align: center;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
header p {
  font-size: 1.2rem;
  opacity: 0.9;
}
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.standard-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.standard-card:hover {
  transform: translateY(-5px);
}
.standard-header {
  background: #3b82f6;
  color: white;
  padding: 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}
.sub-issue {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}
.sub-issue:last-child {
  border-bottom: none;
}
.sub-issue h3 {
  color: #1e3a8a;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
.question span {
  color: #4b5563;
}
.answer-type {
  background: #e0f2fe;
  color: #1e40af;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.9rem;
}
footer {
  text-align: center;
  padding: 2rem;
  background: #1e3a8a;
  color: white;
  margin-top: 2rem;
}
footer p {
  font-size: 1rem;
}
/* Three-column button group */
.button-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
  align-items: center;
}
/* General button styling */
.action-button {
  padding: 10px;
  font-family: 'Sarabun', sans-serif;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s;
}
/* Upload button */
.upload-button {
  background-color: #007bff;
  color: white;
}
.upload-button:hover {
  background-color: #0056b3;
}
/* Guide button */
.guide-button {
  background-color: #28a745;
  color: white;
}
.guide-button:hover {
  background-color: #218838;
}
/* Slide button (toggle switch) */
.slide-button {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 40px;
  text-align: center;
}
.slide-button input {
  opacity: 0;
  width: 0;
  height: 0;
}
/* Responsive adjustments */
@media (max-width: 768px) {
  .button-group {
    grid-template-columns: 1fr;
  }

  .action-button, .slide-button {
    width: 100%;
  }
}
/* New styles for the upload section */
.upload-section {
  padding: 10px 0;
}
.upload-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}
.upload-btn, .guide-btn {
  background-color: #1a73e8;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  width: fit-content;
}
.upload-btn:hover, .guide-btn:hover {
  background-color: #1557b0;
}
.slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
}
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 20px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #1a73e8;
}
input:checked + .slider:before {
  transform: translateX(20px);
}
.upload-status {
  font-size: 0.9em;
  color: #333;
}
.upload-section .upload-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  padding: 10px 0;
}
.upload-section .column {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.upload-section .upload-btn,
.upload-section .guide-btn {
  padding: 8px 16px;
  font-family: 'Sarabun', sans-serif;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background-color: #007bff;
  border: none;
  border-radius: 4px;
  display: inline-block;
}
.upload-section .guide-btn {
  background-color: #28a745;
}
.upload-section .slider-container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.upload-section .upload-status {
  font-family: 'Sarabun', sans-serif;
  font-size: 14px;
}
/* Ensure consistency with existing question styling */
.question.upload-section {
  margin-top: 10px;
  padding: 10px;
  border-top: 1px solid #eee;
}
/* Custom styles for input fields in ACD.php */
.question {
   display: flex;
   align-items: center;
   padding: 0.8rem 1rem;
   background: #f9fafb;
   border-radius: 8px;
   margin-bottom: 0.5rem;
   font-size: 1rem;
   gap: 1rem;
 }
.question span {
  flex: 1;
  color: #4b5563;
}
.question input[type="number"],
.question input[type="text"],
.question select {
  width: 150px;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: 'Sarabun', sans-serif;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.question input[type="number"]:focus,
.question input[type="text"]:focus,
.question select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.question input[type="number"]::-webkit-inner-spin-button,
.question input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}
.btn-primary {
  background-color: #3b82f6;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: block;
  margin: 20px auto;
}
.btn-primary:hover {
  background-color: #1e3a8a;
}
/* Adjust upload section for consistency */
.upload-section {
  padding: 10px;
  border-top: 1px solid #eee;
}
.upload-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  align-items: center;
}
.column {
  display: flex;
  justify-content: center;
  align-items: center;
}
.upload-btn,
.guide-btn {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background-color: #007bff;
  border: none;
}
.guide-btn {
  background-color: #28a745;
}
.upload-btn:hover,
.guide-btn:hover {
  opacity: 0.9;
}
.slider-container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 20px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #1a73e8;
}
input:checked + .slider:before {
  transform: translateX(20px);
}
.upload-status {
  font-size: 14px;
  color: #333;
}
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}
.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}