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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.login-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 余额状态标签样式 */
.status-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}

.status-normal {
  background-color: #2ecc71; /* 浅绿色 */
}

.status-warning {
  background-color: #f39c12; /* 浅黄色 */
}

.status-exhausted {
  background-color: #e74c3c; /* 红色 */
}

/* 预警值输入框样式 */
.alert-value-input {
  width: 80px;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-right: 8px;
  text-align: center;
}

/* 保存预警值按钮样式 */
.save-alert-btn {
  padding: 4px 12px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.3s;
}

.save-alert-btn:hover {
  background-color: #2980b9;
}

/* 仪表盘控制区域样式 */
.dashboard-controls {
  margin-bottom: 20px;
  text-align: right;
}

/* 图表弹窗样式已移至HTML文件中的内联样式 */

/* 图表Tabs样式 */
.chart-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.tab-btn {
  padding: 10px 20px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  font-size: 14px;
  margin-right: 5px;
  transition: all 0.3s;
}

.tab-btn:hover {
  background-color: #e9e9e9;
}

.tab-btn.active {
  background-color: #fff;
  border-color: #ddd;
  border-bottom: 1px solid #fff;
  font-weight: bold;
  color: #3498db;
}

/* 图表内容区域 */
.chart-tab-content {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 0 4px 4px 4px;
  padding: 20px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.chart-container {
  height: 400px;
  width: 100%;
}

.stats-summary {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  flex-wrap: wrap;
  gap: 20px;
}

.stat-item {
  text-align: center;
  min-width: 150px;
}

.stat-label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

/* 查看图表按钮样式 */
.view-chart-btn {
  padding: 4px 12px;
  background-color: #2ecc71;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.3s;
  margin-right: 8px;
}

.view-chart-btn:hover {
  background-color: #27ae60;
}

.login-container h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #2c3e50;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

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

.form-group input:focus {
  outline: none;
  border-color: #3498db;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-btn:hover {
  background-color: #2980b9;
}

.error-message {
  color: #e74c3c;
  margin-bottom: 15px;
  text-align: center;
}

/* 仪表盘样式 */
.dashboard {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.dashboard-header h2 {
  color: #2c3e50;
}

.logout-btn {
  padding: 8px 16px;
  background-color: #e74c3c;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.logout-btn:hover {
  background-color: #c0392b;
}

/* 表格样式 */
.webhook-table {
  width: 100%;
  border-collapse: collapse;
}

.webhook-table th,
.webhook-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.webhook-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

.webhook-table tr:hover {
  background-color: #f8f9fa;
}

.status-pending {
  color: #f39c12;
  font-weight: 500;
}

.status-processed {
  color: #27ae60;
  font-weight: 500;
}

/* 操作按钮 */
.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.process-btn {
  background-color: #27ae60;
  color: white;
}

.process-btn:hover {
  background-color: #229954;
}

.refresh-btn {
  padding: 8px 16px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 15px;
}

.refresh-btn:hover {
  background-color: #2980b9;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .dashboard {
    margin: 10px;
    padding: 15px;
  }
  
  .webhook-table {
    display: block;
    overflow-x: auto;
  }
  
  .login-container {
    margin: 50px 10px;
  }
}

/* ICP备案信息样式 */
.icp-info {
  text-align: center;
  margin-top: 30px;
  padding: 10px 0;
  color: #666;
  font-size: 14px;
}

.icp-info a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s;
}

.icp-info a:hover {
  color: #2980b9;
  text-decoration: underline;
}