/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background-color: #f5f5f5;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  color: #0052a3;
  text-decoration: underline;
}

/* 表单样式 */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  border-color: #0066cc;
}

input.intxt {
  width: 200px;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
}

.btn:hover {
  background: #f0f0f0;
  text-decoration: none;
}

.btn-primary {
  background: #0066cc;
  border-color: #0066cc;
  color: #fff;
}

.btn-primary:hover {
  background: #0052a3;
  border-color: #0052a3;
  color: #fff;
}

.btn-danger {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.btn-danger:hover {
  background: #c82333;
  border-color: #c82333;
  color: #fff;
}

/* 登录页面 */
#login {
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#login .top {
  text-align: center;
  padding: 20px 0;
}

#login .logo {
  color: #fff;
}

#login .logo span {
  display: block;
  font-size: 24px;
  margin-bottom: 20px;
}

#login .main {
  max-width: 400px;
  width: 100%;
  padding: 0 20px;
}

#login .denglu {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

#login .kuang {
  padding: 30px;
}

#login dl dt {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
}

#login dl dd {
  margin-bottom: 15px;
  line-height: 32px;
}

#login .bt {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s;
}

#login .bt:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

#login .foot {
  text-align: center;
  padding: 20px;
  color: #fff;
  font-size: 12px;
}

#login .foot a {
  color: #fff;
  text-decoration: underline;
}

/* 头部 */
#header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 15px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#header .header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#header h1 {
  font-size: 20px;
  font-weight: normal;
}

#header .user-info a {
  color: #fff;
  margin-left: 15px;
}

/* 导航 */
#nav {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#nav ul {
  max-width: 1200px;
  margin: 0 auto;
  list-style: none;
  display: flex;
}

#nav li {
  margin: 0;
}

#nav a {
  display: block;
  padding: 15px 25px;
  color: #333;
  transition: all 0.3s;
}

#nav a:hover {
  background: #f5f5f5;
  color: #667eea;
  text-decoration: none;
}

/* 主内容区 */
#main-content {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 10px;
  min-height: calc(100vh - 200px);
}

/* 页面标题 */
.page-header {
  background: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-header h2 {
  font-size: 18px;
  color: #333;
}

.page-header .page-actions .btn {
  margin-left: 10px;
}

/* 筛选面板 */
.filter-panel {
  background: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-row {
  margin-bottom: 15px;
}

.filter-row:last-child {
  margin-bottom: 0;
}

.filter-row label {
  display: inline-block;
  margin-right: 5px;
}

.filter-row select {
  margin-right: 20px;
  min-width: 150px;
}

/* 数据表格 */
.data-table {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.data-table .total-info {
  padding: 15px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

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

.table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.table tbody tr:hover {
  background: #f8f9fa;
}

.table img {
  border-radius: 4px;
}

/* 分页 */
.pagination {
  padding: 20px;
  text-align: center;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 15px;
  margin: 0 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #333;
  text-decoration: none;
}

.pagination a:hover {
  background: #667eea;
  border-color: #667eea;
  color: #fff;
  text-decoration: none;
}

/* 错误页面 */
.error-page {
  text-align: center;
  padding: 80px 20px;
}

.error-page h1 {
  font-size: 36px;
  color: #333;
  margin-bottom: 20px;
}

.error-page p {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
}

.error-actions .btn {
  margin: 0 10px;
}

/* 底部 */
#footer {
  text-align: center;
  padding: 20px;
  color: #eee;
  font-size: 12px;
  width: 100%;
}

#footer a {
  color: #eee;
}

/* 仪表盘 */
.dashboard {
  padding: 0;
}

.dashboard h2 {
  margin-bottom: 30px;
  color: #333;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.link-card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.link-card h3 {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
  color: #333;
}

.link-card ul {
  list-style: none;
}

.link-card li {
  margin-bottom: 10px;
}

.link-card a {
  display: block;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 4px;
  transition: background 0.3s;
}

.link-card a:hover {
  background: #667eea;
  color: #fff;
  text-decoration: none;
}

/* 表单页面 */
.form-container {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  max-width: 400px;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 200px;
}

/* 响应式 */
@media (max-width: 768px) {
  #header .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  #nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  #nav a {
    padding: 10px 15px;
    font-size: 13px;
  }
  
  .page-header {
    flex-direction: column;
    text-align: center;
  }
  
  .page-header .page-actions {
    margin-top: 15px;
  }
  
  .filter-row select {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  .table {
    font-size: 12px;
  }
  
  .table th,
  .table td {
    padding: 8px 10px;
  }
}
