:root {
  --bg: #FAF3E0;
  --card: #FFFBF5;
  --border: #3D2817;
  --primary: #D47969;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: #3D2817;
}
.layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 220px;
  background: #F1E4CF;
  border-right: 3px solid var(--border);
  padding: 24px;
}
.logo {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 32px;
}
.sidebar nav a {
  display: block;
  margin-bottom: 16px;
  color: #3D2817;
  text-decoration: none;
  font-weight: 600;
}
.sidebar nav a:hover { color: var(--primary); }
.content { flex: 1; padding: 32px; }
.page-title { font-size: 28px; font-weight: 700; margin-bottom: 24px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 4px 4px 0 rgba(61, 40, 23, 0.15);
}
.card-label { font-size: 14px; color: #8B7355; margin-bottom: 8px; }
.card-value { font-size: 32px; font-weight: 700; color: var(--primary); }
.card-subvalue {
  margin-top: 6px;
  font-size: 14px;
  color: rgba(61,40,23,0.7);
}
.stats-detail {
  margin-top: 24px;
}
.detail-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}
.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.detail-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px dashed rgba(61,40,23,0.2);
  border-radius: 10px;
  font-size: 14px;
}
.detail-list strong {
  font-size: 18px;
  color: var(--primary);
}
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.filters { display: flex; gap: 12px; flex-wrap: wrap; }
.filters input, .filters select {
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #FFF;
}
.btn {
  padding: 8px 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--primary);
  color: #FFF;
  cursor: pointer;
}
.btn.secondary {
  background: #FFF;
  color: var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
th, td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(61,40,23,0.1);
  font-size: 14px;
}
th {
  text-align: left;
  background: rgba(212, 121, 105, 0.1);
}
tr:last-child td { border-bottom: none; }
.btn.link {
  background: transparent;
  border: none;
  color: var(--primary);
  text-decoration: underline;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
}
.btn.link:hover {
  color: #B85A4A;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: 16px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 8px 8px 0 rgba(61, 40, 23, 0.2);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid rgba(61, 40, 23, 0.1);
}
.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}
.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.modal-close:hover {
  color: var(--primary);
}

/* 表单样式 */
#grantVipForm {
  padding: 24px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #3D2817;
  font-size: 14px;
}
.form-group .required {
  color: var(--primary);
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="datetime-local"],
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #FFF;
  font-size: 14px;
  font-family: inherit;
}
.form-group input[readonly] {
  background: #F5F5F5;
  color: #666;
}
.duration-input-group {
  display: flex;
  gap: 8px;
}
.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #8B7355;
  line-height: 1.5;
}
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid rgba(61, 40, 23, 0.1);
}
.form-actions .btn {
  min-width: 100px;
}
