* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }
a { color: #1890ff; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* 登录页 */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-box { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); width: 400px; }
.login-box h1 { text-align: center; color: #1a1a2e; margin-bottom: 8px; font-size: 22px; }
.login-box .subtitle { text-align: center; color: #888; margin-bottom: 30px; font-size: 13px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; color: #555; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; transition: border-color 0.3s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,0.2); }
.btn { padding: 10px 20px; border: none; border-radius: 6px; font-size: 14px; transition: all 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-primary { background: #1890ff; color: #fff; }
.btn-primary:hover { background: #40a9ff; }
.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #73d13d; }
.btn-warning { background: #faad14; color: #fff; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-default { background: #fff; color: #333; border: 1px solid #d9d9d9; }
.btn-default:hover { border-color: #1890ff; color: #1890ff; }
.btn-info { background: #13c2c2; color: #fff; }
.btn-info:hover { background: #36cfc9; }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #001529; color: #fff; position: fixed; height: 100vh; overflow-y: auto; z-index: 100; }
.sidebar .logo { padding: 20px; text-align: center; border-bottom: 1px solid #1f3a5f; }
.sidebar .logo h2 { font-size: 16px; color: #fff; }
.sidebar .logo p { font-size: 11px; color: #8c9eb5; margin-top: 4px; }
.sidebar .menu { padding: 12px 0; }
.sidebar .menu-item { padding: 12px 24px; color: #8c9eb5; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sidebar .menu-item:hover { color: #fff; background: #1f3a5f; }
.sidebar .menu-item.active { color: #fff; background: #1890ff; }
.sidebar .version { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px; text-align: center; font-size: 11px; color: #4a6380; border-top: 1px solid #1f3a5f; }

.main { flex: 1; margin-left: 220px; }
.header { height: 60px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 50; }
.header .page-title { font-size: 18px; font-weight: 600; color: #1a1a2e; }
.header .user-info { display: flex; align-items: center; gap: 16px; }
.header .user-info .name { color: #333; font-weight: 500; }
.header .user-info .role { font-size: 12px; color: #888; background: #f0f0f0; padding: 2px 8px; border-radius: 10px; }
.content { padding: 24px; }

/* 卡片 */
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: #1a1a2e; display: flex; align-items: center; justify-content: space-between; }

/* KPI卡片 */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); position: relative; overflow: hidden; }
.kpi-card .label { color: #888; font-size: 13px; margin-bottom: 8px; }
.kpi-card .value { font-size: 28px; font-weight: 700; color: #1a1a2e; }
.kpi-card .unit { font-size: 14px; color: #888; margin-left: 4px; }
.kpi-card .hint { font-size: 12px; color: #aaa; margin-top: 6px; }
.kpi-card.blue { border-left: 4px solid #1890ff; }
.kpi-card.green { border-left: 4px solid #52c41a; }
.kpi-card.orange { border-left: 4px solid #faad14; }
.kpi-card.purple { border-left: 4px solid #722ed1; }
.kpi-card.red { border-left: 4px solid #ff4d4f; }
.kpi-card.cyan { border-left: 4px solid #13c2c2; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { background: #fafafa; font-weight: 600; color: #555; font-size: 13px; white-space: nowrap; }
td { font-size: 13px; }
tr:hover { background: #f5f9ff; }
.status-tag { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.status-pending { background: #fff7e6; color: #fa8c16; }
.status-processing { background: #e6f7ff; color: #1890ff; }
.status-closed { background: #f6ffed; color: #52c41a; }
.status-customer_cancel { background: #f9f0ff; color: #722ed1; }
.status-rejected { background: #fff1f0; color: #ff4d4f; }
.status-litigation { background: #fff0f6; color: #eb2f96; }

/* 筛选栏 */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; align-items: flex-end; }
.filter-bar .form-group { margin-bottom: 0; min-width: 150px; }
.filter-bar .form-group label { font-size: 12px; }
.filter-bar .form-group input, .filter-bar .form-group select { padding: 7px 10px; font-size: 13px; }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 20px; }
.pagination button { padding: 6px 12px; border: 1px solid #d9d9d9; background: #fff; border-radius: 4px; cursor: pointer; }
.pagination button.active { background: #1890ff; color: #fff; border-color: #1890ff; }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* 模态框 */
.modal-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: #fff; border-radius: 8px; width: 90%; max-width: 700px; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 16px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #999; }
.modal-body { padding: 20px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid #f0f0f0; display: flex; justify-content: flex-end; gap: 10px; }

/* 表单网格 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* 时间线 */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: #e8e8e8; }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item::before { content: ''; position: absolute; left: -20px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #1890ff; border: 2px solid #fff; box-shadow: 0 0 0 2px #1890ff; }
.timeline-item .time { font-size: 12px; color: #999; margin-bottom: 4px; }
.timeline-item .content { background: #f9f9f9; padding: 12px; border-radius: 6px; font-size: 13px; }
.timeline-item .handler { font-size: 12px; color: #666; margin-top: 6px; }

/* 图表容器 */
.chart-container { position: relative; height: 350px; }
.chart-container svg { width: 100% !important; height: 100% !important; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

/* 星级评分 */
.stars { display: inline-flex; gap: 4px; }
.star { font-size: 20px; cursor: pointer; color: #d9d9d9; transition: color 0.2s; }
.star.active { color: #fadb14; }
.star.readonly { cursor: default; }

/* 客户评价页 */
.review-page { min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; padding: 20px; }
.review-box { background: #fff; padding: 40px; border-radius: 12px; max-width: 500px; width: 100%; text-align: center; }
.review-box h2 { margin-bottom: 20px; color: #1a1a2e; }
.review-box .claim-info { background: #f5f9ff; padding: 16px; border-radius: 8px; margin-bottom: 24px; text-align: left; }
.review-box .claim-info p { margin: 6px 0; font-size: 13px; color: #555; }
.review-box .stars { justify-content: center; margin: 20px 0; }
.review-box .star { font-size: 36px; }

/* 工具类 */
.text-green { color: #52c41a; }
.text-red { color: #ff4d4f; }
.text-orange { color: #fa8c16; }
.text-blue { color: #1890ff; }
.text-muted { color: #999; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; background: #e6f7ff; color: #1890ff; }
.empty { text-align: center; padding: 40px; color: #999; }
.loading { text-align: center; padding: 40px; color: #999; }
