body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background-color: #f8f9fb;
  color: #333;
  margin: 0;
}

.container {
  padding: 40px;
}

/* 表单容器 */
form {
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  max-width: 900px;
  margin: 0 auto 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Section 标题 */
form h2 {
  width: 100%;
  color: #1a237e;
  margin-top: 30px;
  margin-bottom: 10px;
  border-bottom: 2px solid #4a90e2;
  padding-bottom: 5px;
  font-size: 22px;
}

/* Label 样式（放大+间距） */
label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 16px;
  line-height: 1.4;
}

/* Input/Select 样式（放大+圆角+填充） */
input[type="text"],
input[type="number"],
input[type="date"],
select {
  padding: 14px 16px;
  border: 1px solid #ccd4e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

input:focus,
select:focus {
  border-color: #1a73e8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

select {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

select option {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 提交按钮样式（放大、动画） */
input[type="submit"],
button {
  background-color: #1a73e8;
  color: white;
  border: none;
  padding: 14px 28px;
  font-size: 17px;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  margin-top: 25px;
}

input[type="submit"]:hover,
button:hover {
  background-color: #155ab6;
  transform: translateY(-1px);
}

/* 表格部分 */
.table-wrapper {
  overflow-x: auto;
  margin: 0 auto;
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  min-width: 600px;
}

th, td {
  padding: 14px;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
  font-size: 15px;
}

th {
  background-color: #e8f0fe;
  color: #1a237e;
  font-weight: 600;
}

tr:hover {
  background-color: #f5faff;
}

/* 页面标题 */
h2, h3 {
  text-align: center;
  color: #1a237e;
  margin-bottom: 30px;
}

/* 导航栏 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1e293b;
  padding: 12px 24px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
}

.navbar-left,
.navbar-middle,
.navbar-right {
  display: flex;
  align-items: center;
}

.navbar-middle {
  flex-grow: 1;
  justify-content: center;
}

.navbar a {
  color: #e2e8f0;
  text-decoration: none;
  margin: 0 12px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #38bdf8;
}

/* 表单左右两栏布局 */
.row-two-column {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  width: 100%;
}

/* 每块 Section 样式 */
.form-section {
  flex: 1;
  min-width: 300px;
  margin-bottom: 10px;
}

.form-section > *:not(:last-child) {
  margin-bottom: 16px; /* 每个字段之间增加距离 */
}

.form-section input,
.form-section select {
  width: 100%;
}

/* 📱 Mobile 响应式优化 */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  form {
    flex-direction: column;
    padding: 20px;
  }

  .row-two-column {
    flex-direction: column;
  }

  input[type="submit"],
  button {
    width: 100%;
    font-size: 15px;
  }

  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }

  .navbar-middle {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .navbar a {
    margin: 6px 0;
  }

  table {
    font-size: 14px;
    min-width: unset;
  }

  .table-wrapper {
    overflow-x: auto;
  }
}

/* 按钮组容器 */
.button-group {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* 通用按钮样式 */
.button-group button {
  flex: 1;
  min-width: 140px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

/* 提交按钮颜色 */
.button-submit {
  background-color: #1a73e8;
  color: #fff;
}

.button-submit:hover {
  background-color: #155ab6;
  transform: translateY(-1px);
}

/* 删除按钮颜色 */
.button-delete {
  background-color: #dc3545;
  color: #fff;
}

.button-delete:hover {
  background-color: #c82333;
  transform: translateY(-1px);
}

/* 📱 移动设备：垂直排列 + 宽度100% */
@media (max-width: 768px) {
  .button-group {
    flex-direction: column;
    gap: 12px;
  }

  .button-group button {
    width: 100%;
  }
}