/* Container */
.system-mapping-container {
  display: flex;
  height: 100vh;
  background: #f5f5f5;
  font-family: Arial, sans-serif;
}

/* Sidebar */
.settings-sidebar {
  width: 250px;
  background: #fff;
  border-right: 1px solid #ddd;
  overflow-y: auto;
  flex-shrink: 0;
}

.embedded .settings-sidebar {
  display: none;
}

.settings-nav {
  padding: 0;
}

.settings-nav-item {
  display: block;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  transition: background 0.2s;
}

.settings-nav-item:hover {
  background: #f8f9fa;
}

.settings-nav-item.active-section {
  background: #f0f0f0;
  font-weight: 600;
  cursor: default;
}

.settings-nav-section {
  border-bottom: 1px solid #ddd;
}

.settings-nav-subitem {
  display: block;
  padding: 10px 20px 10px 40px;
  color: #666;
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid #f8f8f8;
  transition: background 0.2s;
}

.settings-nav-subitem:hover {
  background: #f8f9fa;
}

.settings-nav-subitem.active {
  background: #e8f4f8;
  color: #17a2b8;
  font-weight: 600;
  border-left: 3px solid #17a2b8;
}

/* Main Content */
.mapping-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

/* Tabs */
.mapping-tabs {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #ddd;
  padding: 10px 20px;
  gap: 10px;
  align-items: center;
}

.mapping-tab {
  padding: 8px 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  transition: all 0.2s;
}

.mapping-tab:hover {
  background: #f0f0f0;
}

.mapping-tab.active {
  background: #fff;
  color: #333;
  font-weight: 600;
  border-bottom-color: #fff;
  margin-bottom: -1px;
}

.mapping-link {
  color: #17a2b8;
  text-decoration: none;
  font-size: 13px;
  padding: 8px 12px;
}

.mapping-link:hover {
  text-decoration: underline;
}

/* Content */
.mapping-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Status Actions */
.status-actions {
  margin-bottom: 20px;
}

.btn-add-status {
  background: #fff;
  border: 1px solid #ff6b6b;
  color: #ff6b6b;
  padding: 8px 16px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-add-status:hover {
  background: #ff6b6b;
  color: #fff;
}

/* Status Workflow */
.status-workflow {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.status-column {
  min-width: 250px;
  flex-shrink: 0;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.status-column-header {
  padding: 12px 15px;
  background: #e9ecef;
  border-bottom: 1px solid #ddd;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-icon {
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 14px;
  padding: 2px;
  transition: color 0.2s;
}

.info-icon:hover {
  color: #666;
}

.status-items {
  padding: 10px;
  min-height: 100px;
}

.status-section-header {
  font-size: 11px;
  color: #666;
  font-weight: 600;
  margin: 10px 0 5px 0;
  text-transform: uppercase;
}

.status-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 8px 10px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: move;
  transition: all 0.2s;
  font-size: 13px;
}

.status-item:hover {
  background: #f0f0f0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-item.dragging {
  opacity: 0.5;
}

.drag-handle {
  color: #999;
  font-size: 12px;
  cursor: grab;
}

.drag-handle:active {
  cursor: grabbing;
}

/* Out of Flow Section */
.out-of-flow-section,
.inactive-section {
  margin-top: 30px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
}

.section-header {
  padding: 12px 15px;
  background: #f8f9fa;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: #333;
}

.out-of-flow-content,
.inactive-content {
  padding: 15px;
  min-height: 100px;
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 13px;
}

/* Scrollbar */
.mapping-content::-webkit-scrollbar,
.settings-sidebar::-webkit-scrollbar,
.status-workflow::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.mapping-content::-webkit-scrollbar-track,
.settings-sidebar::-webkit-scrollbar-track,
.status-workflow::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.mapping-content::-webkit-scrollbar-thumb,
.settings-sidebar::-webkit-scrollbar-thumb,
.status-workflow::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.mapping-content::-webkit-scrollbar-thumb:hover,
.settings-sidebar::-webkit-scrollbar-thumb:hover,
.status-workflow::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Responsive */
@media (max-width: 1024px) {
  .settings-sidebar {
    width: 200px;
  }
  
  .status-column {
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .system-mapping-container {
    flex-direction: column;
  }
  
  .settings-sidebar {
    width: 100%;
    max-height: 200px;
  }
  
  .status-workflow {
    flex-direction: column;
  }
  
  .status-column {
    width: 100%;
  }
}
