* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  background-color: #f5f5f5;
  padding: 20px;
  line-height: 1.4;
}

.container {
  max-width: 210mm;
  margin: 0 auto;
  background: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-container {
  padding: 20px;
  background: white;
}

/* Header Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #000;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-placeholder {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-placeholder img {
  width: 100%;
  height: 100%;
}

.header-info {
  text-align: left;
}

.school-name {
  font-weight: bold;
  font-size: 14px;
  color: #000;
  margin-bottom: 4px;
}

.address {
  font-size: 12px;
  color: #666;
}

.form-title {
  text-align: center;
}

.form-title h1 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #000;
}

.form-number {
  font-size: 12px;
  color: #666;
}

.form-number input {
  border: none;
  background: transparent;
  font-size: 12px;
  color: #666;
  width: 200px;
  text-align: center;
}

/* Section Styles */
.section {
  margin-bottom: 20px;
}

.section h3 {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #000;
  text-decoration: underline;
}

/* Form Elements */
.form-row {
  margin-bottom: 8px;
}

.form-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-group label {
  font-size: 12px;
  min-width: 150px;
  color: #000;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea,
.form-group .form-value {
  border: none;
  border-bottom: 1px solid #000;
  background: transparent;
  padding: 2px 5px;
  font-size: 12px;
  flex: 1;
  min-width: 200px;
  margin: 0;
}

.form-value {
  display: inline-block;
  min-height: 16px;
}
.form-group textarea {
  border: 1px solid #000;
  resize: vertical;
  min-height: 40px;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-range input[type="date"] {
  min-width: 120px;
}

/* Checkbox Grid */
.checkbox-grid {
  margin: 10px 0;
}

.checkbox-row {
  display: flex;
  gap: 30px;
  margin-bottom: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.checkbox-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.checkbox-item label {
  font-size: 12px;
  color: #000;
  cursor: pointer;
}

/* Table Styles */
.table-container {
  margin: 15px 0;
  overflow-x: auto;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.items-table th,
.items-table td {
  border: 1px solid #000;
  padding: 4px 6px;
  text-align: center;
  vertical-align: middle;
}

.items-table th {
  background-color: #f0f0f0;
  font-weight: bold;
  font-size: 10px;
}

.items-table th:nth-child(1) {
  width: 5%;
} /* STT */
.items-table th:nth-child(2) {
  width: 20%;
} /* Danh mục */
.items-table th:nth-child(3) {
  width: 25%;
} /* Đặc tính chi tiết */
.items-table th:nth-child(4) {
  width: 8%;
} /* ĐVT */
.items-table th:nth-child(5) {
  width: 8%;
} /* SL */
.items-table th:nth-child(6) {
  width: 15%;
} /* Đơn giá */
.items-table th:nth-child(7) {
  width: 15%;
} /* Thành tiền */
.items-table th:nth-child(8) {
  width: 12%;
} /* NCC */

.table-input {
  border: none;
  background: transparent;
  width: 100%;
  padding: 2px;
  font-size: 11px;
  text-align: center;
}

.table-cell {
  padding: 4px 6px;
  font-size: 11px;
  text-align: center;
  vertical-align: middle;
}
.total-amount {
  font-weight: bold;
  color: #000;
}

/* Total Section */
.total-section {
  margin-top: 10px;
  text-align: right;
}

.total-row {
  font-size: 12px;
  margin-bottom: 5px;
}

.note-row {
  font-size: 10px;
  color: #666;
  margin-bottom: 3px;
}

#grand-total {
  color: #d32f2f;
  font-weight: bold;
}

/* Approval Section */
.approval-section {
  margin: 20px 0;
}

.approval-row {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.approval-item {
  flex: 1;
  text-align: center;
}

.approval-header {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 4px;
}

.approval-subheader {
  font-size: 10px;
  color: #666;
  margin-bottom: 10px;
}

.approval-content {
  border: 1px solid #000;
  padding: 10px;
  min-height: 80px;
}

.approval-label {
  font-size: 11px;
  margin-bottom: 20px;
}

.signature-space {
  height: 40px;
  border-bottom: 1px dashed #ccc;
}

/* Final Approval */
.final-approval {
  margin: 20px 0;
  text-align: center;
}

.final-approval-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 15px;
}

.final-approval-row {
  display: flex;
  justify-content: space-around;
  gap: 20px;
}

.final-approval-item {
  flex: 1;
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #ccc;
  font-size: 12px;
  font-weight: bold;
}

/* Note Styles */
.note {
  font-size: 10px;
  color: #666;
  font-style: italic;
  margin: 10px 0;
  padding: 10px;
  background-color: #f9f9f9;
  border-left: 3px solid #2196f3;
}

/* Control Panel */
.control-panel {
  padding: 20px;
  background: #f8f9fa;
  border-top: 1px solid #ddd;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-primary {
  background-color: #2196f3;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
}

.btn-primary:hover {
  background-color: #1976d2;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.btn-secondary:hover {
  background-color: #545b62;
}

/* Print Styles */
@media print {
  body {
    background: white;
    padding: 0;
  }

  .control-panel {
    display: none;
  }

  .container {
    box-shadow: none;
    max-width: none;
    margin: 0;
  }

  .form-container {
    padding: 15px;
  }

  .items-table {
    font-size: 10px;
  }

  .items-table th,
  .items-table td {
    padding: 3px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .header {
    flex-direction: column;
    text-align: center;
  }

  .logo-section {
    justify-content: center;
    margin-bottom: 10px;
  }

  .checkbox-row {
    flex-direction: column;
    gap: 10px;
  }

  .approval-row {
    flex-direction: column;
    gap: 20px;
  }

  .final-approval-row {
    flex-direction: column;
  }

  .table-container {
    font-size: 10px;
  }

  .form-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-group label {
    min-width: auto;
    margin-bottom: 5px;
  }
}
