/* ============================================================
   车辐进销存 — 全局公共样式
   所有页面在 layui.css 之后引用本文件
   ============================================================ */

/* ---------- 基础 ---------- */
body { background: #f5f6fa; margin: 0; font-family: -apple-system, "Microsoft YaHei", "PingFang SC", Helvetica, Arial, sans-serif; }

/* ---------- 卡片/工具栏 ---------- */
.cf-toolbar { background: #fff; padding: 12px 15px; border-radius: 4px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.cf-card { background: #fff; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); overflow: hidden; }
.cf-card-header { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-size: 14px; font-weight: 600; color: #333; }
.cf-card-body { padding: 16px; }

/* ---------- 通用按钮 ---------- */
.cf-btn { display: inline-block; height: 30px; line-height: 30px; padding: 0 14px; border: 1px solid #e6e6e6; border-radius: 2px; background: #fff; cursor: pointer; font-size: 12px; color: #555; transition: all 0.15s; vertical-align: middle; }
.cf-btn:hover { border-color: #1E9FFF; color: #1E9FFF; }
.cf-btn-primary { background: #1E9FFF; border-color: #1E9FFF; color: #fff; }
.cf-btn-primary:hover { opacity: 0.85; color: #fff; }
.cf-btn-danger { background: #FF5722; border-color: #FF5722; color: #fff; }
.cf-btn-danger:hover { opacity: 0.85; color: #fff; }

/* ---------- 快捷日期按钮 ---------- */
.cf-qdp { margin-right: 4px; padding: 0 10px; height: 28px; line-height: 28px; border: 1px solid #e6e6e6; border-radius: 2px; background: #fff; cursor: pointer; font-size: 12px; color: #666; transition: all 0.15s; }
.cf-qdp:hover { border-color: #1E9FFF; color: #1E9FFF; }
.cf-qdp.active { background: #1E9FFF; border-color: #1E9FFF; color: #fff; }

/* ============================================================
   斑马纹 — 全局自动生效
   layui table 有 lay-even 属性支持，但需要 table.render({even:true})
   这里用 CSS 直接实现，不需要改 JS
   ============================================================ */
.layui-table-view .layui-table-body tbody tr:nth-child(even) {
    background-color: #f5f7fa;
}
.layui-table-view .layui-table-body tbody tr:nth-child(even):hover {
    background-color: #f2f7fe;
}

/* 静态表格也加斑马纹 */
.layui-table[lay-even] tbody tr:nth-child(even),
.layui-table tbody tr:nth-child(even) {
    background-color: #f5f7fa;
}

/* ============================================================
   表格优化
   ============================================================ */
/* 表头加粗、微调 */
.layui-table-header th {
    background: #f8f9fb;
    font-weight: 600;
    color: #333;
}

/* 表格行 hover 色 — 用更柔和的蓝色 */
.layui-table-click,
.layui-table-hover {
    background-color: #f0f7ff !important;
}

/* 分页区微调 */
.layui-table-page { padding: 6px 10px; }

/* ============================================================
   表单优化
   ============================================================ */
.cf-form-label { width: 100px; text-align: right; padding: 9px 15px; font-weight: 500; }
.cf-form-value { padding: 9px 0; color: #333; }

/* ============================================================
   通用辅助
   ============================================================ */
.cf-text-muted { color: #999; }
.cf-text-success { color: #5FB878; }
.cf-text-danger { color: #FF5722; }
.cf-text-warning { color: #FFB800; }
.cf-text-primary { color: #1E9FFF; }
.cf-font-bold { font-weight: 600; }
.cf-mt-10 { margin-top: 10px; }
.cf-mt-15 { margin-top: 15px; }
.cf-mb-10 { margin-bottom: 10px; }
.cf-mb-15 { margin-bottom: 15px; }
.cf-text-right { text-align: right; }
.cf-text-center { text-align: center; }

/* ============================================================
   标签徽章增强
   ============================================================ */
.cf-tag { display: inline-block; padding: 2px 8px; border-radius: 2px; font-size: 12px; line-height: 18px; }
.cf-tag-success { background: #5FB878; color: #fff; }
.cf-tag-warning { background: #FFB800; color: #fff; }
.cf-tag-danger { background: #FF5722; color: #fff; }
.cf-tag-info { background: #1E9FFF; color: #fff; }
.cf-tag-default { background: #e2e2e2; color: #666; }

/* ============================================================
   状态徽章颜色变体（layui 未内置 layui-badge-* 颜色类，
   不定义时所有徽章都会显示默认红色，造成误读）
   ============================================================ */
.layui-badge.layui-badge-green  { background-color:#16baaa!important; color:#fff!important; }
.layui-badge.layui-badge-gray   { background-color:#999!important;    color:#fff!important; }
.layui-badge.layui-badge-orange { background-color:#ffb800!important; color:#fff!important; }
.layui-badge.layui-badge-blue   { background-color:#1e9fff!important; color:#fff!important; }

/* ============================================================
   滚动条美化
   ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d2d2d2; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #999; }
