/**
 * 红海车域 - 个人中心页样式
 *
 * 对应旧系统：D:\hhcyCar\oldCode\hhcy-car-mall\target\classes\templates\web\user_center.html
 * 旧系统样式内嵌于 <style> 标签，新系统抽离为独立 CSS 文件。
 */

/* 基础 */
body { background: #f5f5f5; font-family: "Microsoft YaHei", Arial, sans-serif; }
.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

/* 页面头 */
.page-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }
.page-title { font-size: 22px; color: #333; margin: 0; }
.logout-btn { padding: 7px 18px; border: 1px solid #ddd; border-radius: 4px; color: #666; text-decoration: none; font-size: 14px; }
.logout-btn:hover { border-color: #24549B; color: #24549B; }

/* 用户卡片 */
.user-card { background: #fff; border-radius: 8px; padding: 24px 30px; display: flex; align-items: center; gap: 20px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.avatar { width: 60px; height: 60px; border-radius: 50%; background: #24549B; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.user-meta { flex: 1; }
.nickname { font-size: 18px; font-weight: bold; color: #333; }
.phone { font-size: 14px; color: #999; margin-top: 4px; }
.stat-row { display: flex; gap: 30px; }
.stat-box { text-align: center; }
.stat-num { font-size: 24px; font-weight: bold; color: #FB331F; }
.stat-lbl { font-size: 12px; color: #999; margin-top: 2px; }

/* 主体布局 */
.main-layout { display: flex; gap: 20px; }
.sidebar { width: 180px; flex-shrink: 0; }
.si { padding: 14px 18px; background: #fff; border-radius: 8px; margin-bottom: 8px; cursor: pointer; font-size: 15px; color: #666; transition: all .2s; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.si:hover { color: #24549B; }
.si.active { background: #24549B; color: #fff; }
.si i { margin-right: 6px; }

/* 内容区 */
.content { flex: 1; background: #fff; border-radius: 8px; padding: 24px; min-height: 400px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.tab-title { font-size: 18px; font-weight: bold; color: #333; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid #f0f0f0; }
.tab-title i { color: #24549B; margin-right: 6px; }

/* 收藏车辆列表 */
.car-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.car-item { display: flex; gap: 14px; padding: 14px; border: 1px solid #f0f0f0; border-radius: 8px; cursor: pointer; transition: all .2s; }
.car-item:hover { border-color: #24549B; box-shadow: 0 2px 8px rgba(36,84,155,0.1); }
.car-item img { width: 140px; height: 95px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: #f5f5f5; }
.ci { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.ci-name { font-size: 15px; font-weight: bold; color: #333; }
.ci-meta { font-size: 12px; color: #999; margin-top: 4px; }
.ci-price { font-size: 18px; font-weight: bold; color: #FB331F; margin-top: 6px; }
.ci-price small { font-size: 12px; color: #999; font-weight: normal; }
.ci-actions { margin-top: 8px; display: flex; gap: 8px; }

/* 小按钮 */
.btn-sm { padding: 5px 14px; border-radius: 4px; border: none; font-size: 12px; cursor: pointer; }
.btn-red { background: #FB331F; color: #fff; }
.btn-red:hover { background: #e02d1a; }
.btn-gray { background: #f0f0f0; color: #666; }
.btn-gray:hover { background: #e0e0e0; }

/* 空状态提示 */
.empty-tip { text-align: center; padding: 60px 20px; color: #ccc; font-size: 15px; line-height: 2; }
.empty-tip a { color: #24549B; text-decoration: none; }
.empty-tip a:hover { text-decoration: underline; }

/* 预约卡片 */
.appt-card { border: 1px solid #f0f0f0; border-radius: 8px; padding: 18px; margin-bottom: 14px; transition: all .2s; }
.appt-card:hover { border-color: #24549B; box-shadow: 0 2px 8px rgba(36,84,155,0.1); }
.appt-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.appt-car { font-size: 15px; font-weight: bold; color: #333; }
.appt-status { font-size: 12px; padding: 3px 10px; border-radius: 12px; }
.appt-status.pending { background: #FFF3E0; color: #F57C00; }
.appt-status.contacted { background: #E8F5E9; color: #388E3C; }
.appt-status.cancelled { background: #f5f5f5; color: #999; }
.appt-info { font-size: 13px; color: #666; line-height: 2; }
.appt-info i { width: 20px; color: #24549B; margin-right: 4px; }
.appt-actions { margin-top: 12px; text-align: right; }
.appt-actions a { color: #24549B; text-decoration: none; font-size: 13px; margin-right: 8px; }

/* 响应式适配 */
@media (max-width: 768px) {
  .main-layout { flex-direction: column; }
  .sidebar { width: 100%; display: flex; overflow-x: auto; }
  .si { border-bottom: none; border-right: 1px solid #f0f0f0; flex-shrink: 0; white-space: nowrap; }
  .car-list { grid-template-columns: 1fr; }
  .user-card { flex-direction: column; text-align: center; gap: 12px; }
  .stat-row { justify-content: center; }
}

/* 修改密码模态框 */
.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-box { background: #fff; border-radius: 8px; width: 400px; max-width: 90%; max-height: 90vh; overflow: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid #f0f0f0; }
.modal-header h3 { margin: 0; font-size: 18px; color: #333; }
.modal-close { font-size: 24px; color: #999; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #333; }
.modal-body { padding: 24px; }
.modal-body .form-group { margin-bottom: 16px; }
.modal-body label { display: block; font-size: 14px; color: #666; margin-bottom: 6px; }
.modal-body input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; box-sizing: border-box; }
.modal-body input:focus { border-color: #24549B; outline: none; }
.form-error { color: #FB331F; font-size: 13px; margin: 8px 0; min-height: 18px; }
.form-success { color: #28a745; font-size: 13px; margin: 8px 0; padding: 10px; background: #e8f5e9; border-radius: 4px; }
.btn-submit { width: 100%; padding: 12px; background: #24549B; color: #fff; border: none; border-radius: 4px; font-size: 15px; cursor: pointer; margin-top: 8px; }
.btn-submit:hover { background: #1a3d7a; }
.btn-submit:disabled { background: #ccc; cursor: not-allowed; }
