:root {
  --primary: #1890ff;
  --primary-hover: #40a9ff;
  --primary-active: #096dd9;
  --success: #52c41a;
  --warning: #faad14;
  --error: #ff4d4f;
  --text: #262626;
  --text-secondary: #595959;
  --text-hint: #8c8c8c;
  --border: #d9d9d9;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 36px;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn:active { background: var(--primary-active); border-color: var(--primary-active); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-block { display: flex; width: 100%; }
.btn-default { background: #fff; color: var(--text); border-color: var(--border); }
.btn-default:hover { color: var(--primary); border-color: var(--primary); }
.btn-danger { background: var(--error); border-color: var(--error); }
.btn-success { background: var(--success); border-color: var(--success); }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  transition: border 0.2s;
  min-height: 36px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(24,144,255,0.2); }

.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 6px; color: var(--text-secondary); font-size: 13px; }

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading-overlay.active { display: flex; }
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 10000;
  display: none;
}
.toast.show { display: block; }

.header {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-title { font-size: 16px; font-weight: 600; }
.header-actions { display: flex; gap: 8px; }

.empty { text-align: center; color: var(--text-hint); padding: 40px 16px; }

.timeline {
  position: relative;
  padding-left: 20px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 16px; }
.timeline-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid #fff;
}
.timeline-item.active .timeline-dot { background: var(--primary); }
.timeline-time { font-size: 12px; color: var(--text-hint); }
.timeline-title { font-weight: 500; }

.progress-bar {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.progress-step {
  flex: 1;
  height: 4px;
  background: var(--border);
  position: relative;
}
.progress-step.active { background: var(--primary); }
.progress-step-label {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-hint);
  white-space: nowrap;
}
.progress-step.active .progress-step-label { color: var(--primary); font-weight: 500; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: #e6f7ff;
  color: var(--primary);
  margin-right: 6px;
  margin-bottom: 6px;
}
.tag-success { background: #f6ffed; color: var(--success); }
.tag-warning { background: #fffbe6; color: var(--warning); }
.tag-error { background: #fff2f0; color: var(--error); }

.plate-keyboard {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  margin-top: 8px;
}
.plate-keyboard .key {
  padding: 6px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.plate-keyboard .key:active { background: var(--bg); }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  cursor: pointer;
}
.checkbox-item.selected { border-color: var(--primary); background: #e6f7ff; color: var(--primary); }

@media (max-width: 600px) {
  .container { padding: 12px; }
  .card { padding: 12px; }
  .plate-keyboard { grid-template-columns: repeat(8, 1fr); }
}

.admin-layout { display: flex; min-height: 100vh; }
.admin-sider {
  width: 200px;
  background: #001529;
  color: #fff;
  flex-shrink: 0;
}
.admin-sider-title { padding: 16px; font-size: 16px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-menu a {
  display: block;
  color: rgba(255,255,255,0.65);
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.admin-menu a:hover, .admin-menu a.active { color: #fff; background: var(--primary); }
.admin-content { flex: 1; padding: 16px; overflow: auto; }

.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: #fafafa; font-weight: 500; }
