.mechanism-wrap {
  padding: 20px 0;
  font-family: 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: #333;
}

/* Tab Navigation Styles */
.category-tabs-wrap {
  border-bottom: 1px solid #e0e0e0;
}

.category-tabs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}

.tab-item {
  position: relative;
  padding: 15px 0;
  padding-bottom: 15px;
  margin-right: 30px;
}

.tab-item:last-child {
  margin-right: 0;
}

.tab-item > a {
  display: inline-block;
  padding: 8px 20px;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.tab-item.active > a,
.tab-item:hover > a {
  color: #fff;
  background-color: #003087;
  border-color: #003087;
}

/* Dropdown Menu */
.tab-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 100;
}

.tab-item:hover .tab-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tab-dropdown a {
  display: block;
  padding: 10px 20px;
  color: #666;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
}

.tab-dropdown a:last-child {
  border-bottom: none;
}

.tab-dropdown a:hover {
  background-color: #f5f7fa;
  color: #003087;
}

.search-wrap {
  background: #fff;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 0 20px 20px;
}

.search-form {
  margin-bottom: 0;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.form-item {
  flex: 0 0 calc(50% - 10px);
  display: flex;
  align-items: center;
  margin-top: 20px;
}

/*.form-row .form-item:nth-child(even) {*/
/*  margin-left: 20px;*/
/*}*/

.form-item label {
  font-weight: 600;
  width: 80px;
  text-align: right;
  margin-right: 10px;
  flex-shrink: 0;
}

.form-input {
  border: 1px solid #ddd;
  height: 34px;
  line-height: 32px;
  padding: 0 10px;
  width: 100%;
  flex: 1;
  border-radius: 4px;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.form-input:focus, .form-select:focus {
  border-color: #003087;
  outline: none;
}

.date-range {
  display: flex;
  align-items: center;
  flex: 1;
}

.date-input {
  flex: 1;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') no-repeat right 8px center;
  background-size: 14px;
  background-color: #fff;
}

.separator {
  margin: 0 10px;
  color: #999;
}

.distpicker-wrap {
  display: flex;
  flex: 1;
}

.distpicker-wrap .form-select {
  margin-right: 10px;
}

.distpicker-wrap .form-select:last-child {
  margin-right: 0;
}

.form-select {
  border: 1px solid #ddd;
  height: 34px;
  padding: 0 8px;
  border-radius: 4px;
  flex: 1;
  width: 33%;
}

.tree-select-wrap {
  position: relative;
  flex: 1;
}

.tree-select-wrap .form-input {
  max-width: 100%;
}

.tree-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  z-index: 100;
  max-height: 250px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 4px;
  margin-top: 4px;
}

.form-actions {
  text-align: center;
}

.btn-search {
  background-color: #003087;
  color: #fff;
}

.btn-search, .btn-reset {
  padding: 8px 24px;
  margin: 0 10px;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s;
}

.btn-reset {
  background-color: #f5f5f5;
  color: #666;
}

.btn-search:hover {
  background-color: #002266;
}
.btn-reset:hover {
  background-color: #e8e8e8;
}

/* Table Styles */
.content-wrap {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow-x: auto; /* Enable horizontal scrolling for mobile */
}

.data-table {
  width: 100%;
  min-width: 800px; /* Ensure table doesn't shrink too much on mobile */
  border-collapse: collapse;
  text-align: center;
}

.data-table th {
  font-weight: 600;
  padding: 14px 8px;
  background-color: #f8f9fa;
  border-bottom: 2px solid #003087;
  color: #333;
  text-align: center;
}

.data-table td {
  padding: 12px 8px;
  border-bottom: 1px solid #eee;
}

.data-table tbody tr.row-group {
  background-color: #fafafa;
}

.data-table tbody tr.row-group:nth-child(even) {
  background-color: #fff;
}

.data-table tbody tr:hover td {
  background-color: #f0f4ff; /* Slight blue tint on hover */
}

.multi-row-td {
  vertical-align: middle;
  border-right: 1px solid #eee;
}

/* Responsive Media Queries */
@media screen and (max-width: 768px) {
  /* Mobile Category Tabs - Hidden */
  .category-tabs-wrap {
    display: none;
  }

  .container {
    width: auto;
  }

  .mechanism-wrap {
    padding: unset;
    padding: 30px 0;
  }
  
  .search-wrap, .content-wrap {
    padding: 15px 10px;
  }
  
  .form-row {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: unset;
  }

  .form-item {
    margin-top: unset;
  }
  
  .form-item, .item-org, .item-third {
    min-width: 100%;
    flex-wrap: wrap;
    flex: none;
    margin-bottom: 15px;
  }
  
  .form-row .form-item:nth-child(even) {
    margin-left: 0;
  }
  
  .form-item label {
    width: 100%;
    text-align: left;
    margin-bottom: 8px;
  }
  
  
  .form-input {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    max-width: none;
  }
  
  .date-range {
    flex: 1;
    width: auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    max-width: none;
  }
  
  .date-input {
    flex: 1;
    min-width: 0;
    max-width: none;
    padding: 0 5px;
  }
  
  .separator {
    margin: 0 5px;
  }
  
  .distpicker-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
  }
  
  .distpicker-wrap .form-select {
    width: 100%;
    flex: none;
    min-width: 0;
    padding: 0 5px;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .distpicker-wrap .form-select:last-child {
    margin-bottom: 0;
  }
  
  .tree-select-wrap {
    flex: 1;
    width: auto;
    max-width: none;
  }
  
  .form-actions {
    display: flex;
    justify-content: center;
    width: 100%;
  }
  
  .inline-actions {
    margin-left: 0;
    justify-content: space-between;
  }
  
  .btn-search, .btn-reset {
    flex: 1;
    max-width: 150px;
    margin: 0;
  }
}
