:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --primary: #4a69bd;
  --primary-dark: #3c5aa6;
  --danger: #e55039;
  --success: #78e08f;
  --warning: #f6b93b;
  --text: #2d3436;
  --muted: #636e72;
  --border: #dfe6e9;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

.card {
  background: var(--card);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 24px;
  margin-bottom: 20px;
}

h1, h2, h3 { margin-top: 0; }

.form-group { margin-bottom: 16px; }
label { display: block; margin-bottom: 6px; font-weight: 500; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}
textarea { min-height: 80px; resize: vertical; }

button {
  padding: 10px 18px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  background: var(--primary);
  color: #fff;
}
button:hover { background: var(--primary-dark); }
button.secondary { background: #b2bec3; color: #2d3436; }
button.danger { background: var(--danger); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
th { background: #f8f9fa; font-weight: 600; }
tr:hover { background: #f8f9fa; }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  background: #dfe6e9;
  color: var(--text);
}
.badge-admin { background: var(--primary); color: #fff; }

.flash {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.flash-error { background: #ffe0e0; color: #c0392b; }
.flash-success { background: #e0ffef; color: #27ae60; }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal {
  background: #fff; border-radius: 8px; padding: 24px;
  width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto;
}

.hidden { display: none; }

.user-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.status-待商务部接收 { background: #dfe6e9; }
.status-待处理 { background: #74b9ff; color: #fff; }
.status-处理中 { background: #f6b93b; }
.status-已解决 { background: #78e08f; }
.status-已退款 { background: #e55039; color: #fff; }
