* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f5f5;
  min-height: 100vh;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  background-color: #2196F3;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
  font-size: 1.5rem;
  margin: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#logout {
  padding: 0.5rem 1rem;
  background-color: transparent;
  border: 1px solid white;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#logout:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.main-container {
  flex: 1;
  display: flex;
  background-color: #f5f5f5;
}

.sidebar {
  width: 200px;
  background-color: white;
  padding: 1rem 0;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.nav-btn {
  display: block;
  padding: 0.8rem 1.5rem;
  color: #666;
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.nav-btn:hover {
  background-color: #f5f5f5;
  color: #2196F3;
}

.nav-btn.active {
  background-color: #e3f2fd;
  color: #2196F3;
  border-left-color: #2196F3;
}

.content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.button-group {
  display: flex;
  gap: 0.5rem;
}

.submit-btn,
.test-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
}

.submit-btn {
  background-color: #2196F3;
  color: white;
}

.submit-btn:hover {
  background-color: #1564b3;
}

.test-btn {
  background-color: #4CAF50;
  color: white;
}

.test-btn:hover {
  background-color: #39853d;
}

.form-group {
  margin-bottom: 0.6rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #666;
}

.form-group input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: #2196F3;
}


.data-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin: 0; /* 移除上边距 */
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: #f8f9fa;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px; /* 设置最大宽度，超出显示省略号 */
}

.data-table th {
  font-weight: 600;
  color: #495057;
}

.data-table tr:hover {
  background-color: #f5f5f5;
}

.devices-table .device-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.devices-table .device-checkbox:checked {
  background-color: #2196F3;
}


.loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;

  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #0000002e;
  z-index: 9999;
  display: none;
}
.loading-container img {
  width: 100px;
}


/* 响应式布局 */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    padding: 0.5rem;
  }

  .nav-btn {
    padding: 0.5rem 1rem;
  }

  .content {
    padding: 1rem;
  }
} 