:root {
  --primary-color: #006f67;
  --secondary-color: #6ebf4d;
  --primary-light: rgba(0, 111, 103, 0.1);
  --secondary-light: rgba(110, 191, 77, 0.1);
  --text-color: #333;
  --text-light: #666;
  --background-color: #f9fafb;
  --card-bg: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
  --radius: 8px;
}

.column-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.column-dropdown {
  position: relative;
  display: inline-block;
}

.column-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 280px;
  max-width: 320px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 850 !important;
  border-radius: 8px;
  border: 1px solid #e0e6ed;
  overflow: hidden;
  margin-top: 4px;
}

.column-dropdown.active .column-dropdown-content {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.column-dropdown-content.show {
  display: block !important;
}

.column-dropdown-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e6ed;
  font-weight: 600;
  font-size: 0.85rem;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.column-dropdown-body {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.column-dropdown-body::-webkit-scrollbar {
  width: 6px;
}

.column-dropdown-body::-webkit-scrollbar-track {
  background: #f1f3f4;
}

.column-dropdown-body::-webkit-scrollbar-thumb {
  background: #c1c8cd;
  border-radius: 3px;
}

.column-dropdown-body::-webkit-scrollbar-thumb:hover {
  background: #a8b2ba;
}

.column-item {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  position: relative;
}

.column-item:hover {
  background-color: rgba(0, 111, 103, 0.08);
  border-left-color: rgba(0, 111, 103, 0.3);
}

.column-item:active {
  background-color: rgba(0, 111, 103, 0.12);
}

.column-item input[type="checkbox"] {
  margin: 0;
  margin-right: 0.75rem;
  width: 16px;
  height: 16px;
  accent-color: #006f67;
  cursor: pointer;
}

.column-item label {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
  line-height: 1.4;
  user-select: none;
}

.column-item:hover label {
  color: #006f67;
}

.column-item input[type="checkbox"]:checked + label {
  color: #006f67;
  font-weight: 600;
}

.column-item::after {
  content: "";
  position: absolute;
  right: 1rem;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #006f67;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.column-item input[type="checkbox"]:checked::after,
.column-item:has(input[type="checkbox"]:checked)::after {
  opacity: 1;
}

.column-dropdown-footer {
  background: #f8f9fa;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e0e6ed;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.column-action-btn {
  background: none;
  border: 1px solid #dee2e6;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #6c757d;
  font-weight: 500;
}

.column-action-btn:hover {
  background-color: rgba(0, 111, 103, 0.1);
  border-color: #006f67;
  color: #006f67;
}

.column-action-btn.primary {
  background-color: #006f67;
  color: white;
  border-color: #006f67;
}

.column-action-btn.primary:hover {
  background-color: #005a54;
  border-color: #005a54;
}

.column-toggle-btn {
  background: #006f67;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 111, 103, 0.2);
}

.column-toggle-btn:hover {
  background: #005a54;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 111, 103, 0.3);
}

.column-toggle-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 111, 103, 0.2);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-action-btn {
  background: none;
  border: 1px solid #dee2e6;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  color: #6c757d;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-action-btn:hover {
  background-color: rgba(0, 111, 103, 0.1);
  border-color: #006f67;
  color: #006f67;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 111, 103, 0.2);
}

.table-action-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 111, 103, 0.2);
}

.table-action-btn.active {
  background-color: #006f67;
  border-color: #006f67;
  color: white;
}

.sort-indicator {
  margin-left: 0.5rem;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

th.sorted .sort-indicator {
  opacity: 1;
}

th:hover .sort-indicator {
  opacity: 0.8;
}

.filter-input {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.8rem;
  background: white;
}

.filter-input:focus {
  outline: none;
  border-color: #006f67;
  box-shadow: 0 0 0 2px rgba(0, 111, 103, 0.1);
}

.hidden {
  display: none !important;
}

.dragging {
  opacity: 0.5;
}

@media (max-width: 768px) {
  .column-dropdown-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
  }
}
