* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1890ff;
  --primary-dark: #096dd9;
  --success: #67c23a;
  --warning: #e6a23c;
  --danger: #f56c6c;
  --info: #909399;
  --text: #333;
  --text-secondary: #666;
  --text-light: #999;
  --border: #ebeef5;
  --bg: #f5f7fa;
  --bg-white: #fff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Status tags */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.tag-success { background: #f0f9eb; color: var(--success); }
.tag-warning { background: #fdf6ec; color: var(--warning); }
.tag-danger { background: #fef0f0; color: var(--danger); }
.tag-info { background: #f4f4f5; color: var(--info); }
.tag-primary { background: #ecf5ff; color: var(--primary); }

/* Card */
.card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn:active { opacity: 0.7; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-block { width: 100%; }

/* Header bar */
.header {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  background: var(--primary);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header .back-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  margin-right: 8px;
}

/* Tab bar */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-white);
  position: sticky;
  top: 48px;
  z-index: 99;
}
.tab-item {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* Form */
.form-group {
  margin-bottom: 12px;
}
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.form-group select,
.form-group input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 10px;
  font-size: 14px;
  outline: none;
  background: #fff;
  -webkit-appearance: none;
}
.form-group select:focus,
.form-group input:focus {
  border-color: var(--primary);
}

/* Grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
}

/* Pull to refresh hint */
.refresh-hint {
  text-align: center;
  padding: 12px;
  color: var(--text-light);
  font-size: 13px;
}

/* Detail row */
.detail-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.detail-row:last-child {
  border-bottom: none;
}
.detail-label {
  width: 85px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.detail-value {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  word-break: break-all;
}

/* Floating action button */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(24,144,255,0.4);
  cursor: pointer;
  z-index: 100;
}
