/* ============================================================
   炎禹 DIY 手链系统 · 后台统一皮肤 yyadmin.css
   品牌色系(与小程序 6.0 规范联动):
     主色 豆沙玫瑰 #C0787F / 雾玫瑰粉 #E8B4BC / 香槟金 #D6BD9C
     底色 奶油白 #FBF7F4 / 文字 暖炭灰 #4A4145 / 次文字 #9C8E93
   所有新模块页面统一引用本文件 + layui
   ============================================================ */

/* ---------- 全局基调(淡暖灰底 + 白卡片, 有层次不惨白) ---------- */
body { background: #F7F3F1; color: #4A4145; font-size: 13px; }
a { color: #C0787F; }
a:hover { color: #A9606A; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #E3CDD1; border-radius: 3px; }

/* ---------- 页面骨架: 标题区 / 搜索区 / 卡片 ---------- */
.yy-page { padding: 15px; }
.yy-page-title { display: flex; align-items: baseline; margin-bottom: 12px; }
.yy-page-title h2 { font-size: 17px; font-weight: 600; color: #4A4145; margin: 0; letter-spacing: .5px; }
.yy-page-title .sub { margin-left: 10px; font-size: 12px; color: #9C8E93; }

.yy-card { background: #fff; border-radius: 10px; border: 1px solid #EFE7E5; box-shadow: 0 1px 4px rgba(198,154,162,.05); margin-bottom: 12px; overflow: hidden; }
.yy-card .yy-card-header { padding: 12px 16px; border-bottom: 1px solid #F5E9EB; display: flex; align-items: center; justify-content: space-between; }
.yy-card .yy-card-header .t { font-size: 14px; font-weight: 600; color: #4A4145; }
.yy-card .yy-card-header .t::before { content: ''; display: inline-block; width: 4px; height: 14px; background: linear-gradient(180deg,#E8B4BC,#C0787F); border-radius: 2px; margin-right: 8px; vertical-align: -2px; }
.yy-card .yy-card-header .extra { font-size: 12px; color: #9C8E93; }
.yy-card .yy-card-body { padding: 14px 16px; }

/* 搜索区 */
.yy-search { background: #fff; border-radius: 10px; border: 1px solid #EFE7E5; box-shadow: none; padding: 12px 16px 2px; margin-bottom: 12px; }
.yy-search .layui-form-item { margin-bottom: 10px; }
.yy-search .layui-form-label { width: 76px; padding: 9px 0; text-align: left; color: #6B5F63; }
.yy-search .layui-input-inline { margin-right: 10px; margin-bottom: 0; }
.yy-search .layui-input, .yy-search .layui-select { border-radius: 6px; border-color: #E8DCDF; }
.yy-search .layui-input:focus, .yy-search .layui-select:focus { border-color: #E8B4BC !important; }
.yy-search .ws { display: inline-block; width: 190px; }

/* 工具条 */
.yy-toolbar { margin-bottom: 10px; }

/* ---------- 按钮(淡雅描边式: 白底 + 彩色边框/文字, 少用大面积色块) ---------- */
.layui-btn {
    background-color: #fff; border: 1px solid #C0787F; color: #C0787F;
    border-radius: 6px; height: 34px; line-height: 32px;
}
.layui-btn:hover { background: #FDF6F7; color: #A9606A; border-color: #A9606A; opacity: 1; }
.layui-btn .layui-icon { color: inherit; }
.layui-btn-lg { height: 42px; line-height: 40px; }
.layui-btn-sm { height: 28px; line-height: 26px; border-radius: 5px; }
.layui-btn-xs { height: 22px; line-height: 20px; padding: 0 8px; border-radius: 4px; }
.layui-btn-primary { background-color: #fff; border: 1px solid #D9C6CA; color: #8A6F75; }
.layui-btn-primary:hover { border-color: #C0787F; color: #C0787F; background: #FDF6F7; }
.layui-btn-normal { background-color: #fff; border: 1px solid #A9BCCF; color: #7E97AE; }
.layui-btn-normal:hover { border-color: #8CA6BD; color: #6E88A0; background: #F3F7FA; }
.layui-btn-warm { background-color: #fff; border: 1px solid #E5B585; color: #C08A4E; }
.layui-btn-warm:hover { border-color: #D6A26A; color: #AC783F; background: #FBF5EC; }
.layui-btn-danger { background-color: #fff; border: 1px solid #D8918F; color: #C06663; }
.layui-btn-danger:hover { border-color: #C66C6A; color: #AC5553; background: #FBF1F1; }
.layui-btn-disabled, .layui-btn-disabled:hover { background: #F5F0ED !important; border-color: #E3D9DB !important; color: #B3A6AA !important; cursor: not-allowed; }
.yy-btn-gold { background-color: #fff; border: 1px solid #D6BD9C; color: #B4976B; }
.yy-btn-gold:hover { border-color: #C6A87F; color: #A3854F; background: #FBF7F0; }
/* 弹窗底部按钮(layer) */
.layui-layer-btn .layui-layer-btn0 { background: #fff !important; border-color: #C0787F !important; color: #C0787F !important; border-radius: 6px; }
.layui-layer-btn .layui-layer-btn0:hover { background: #FDF6F7 !important; color: #A9606A !important; }
.layui-layer-btn .layui-layer-btn1 { background: #fff !important; border: 1px solid #D9C6CA !important; color: #8A6F75 !important; border-radius: 6px; }
/* 表格内行按钮配色(描边) */
.layui-table .layui-btn-xs { border-width: 1px; }

/* ---------- 表格 ---------- */
.layui-table { color: #4A4145; }
.layui-table-header, .layui-table thead tr, .layui-table-header table { background: #FBF7F4 !important; }
.layui-table thead th { background: #FBF7F4; color: #8A6F75; font-weight: 600; }
.layui-table-header th { color: #8A6F75 !important; }
.layui-table tbody tr:hover, .layui-table-hover, .layui-table-click { background: #FDF6F7; }
.layui-table-cell { height: auto; min-height: 40px; line-height: 1.6; }  /* auto: 多行内容(商品图+名称+数量)不被裁剪 */
.layui-table-view { border-color: #F0E3E6; border-radius: 0 0 10px 10px; }
.layui-table-page { border-top: 1px solid #F5E9EB; }
.layui-laypage .layui-laypage-curr .layui-laypage-em { background: #C0787F; border-radius: 4px; }
.layui-laypage a, .layui-laypage span { color: #6B5F63; }
.layui-table-main .layui-table { border: none; }
.yy-thumb { width: 46px; height: 46px; border-radius: 6px; object-fit: cover; border: 1px solid #F0E3E6; background: #FBF7F4; }
.yy-thumb-banner { width: 96px; height: 44px; }
.yy-thumb-wide { width: 64px; height: 84px; }
.yy-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid #F0E3E6; vertical-align: middle; margin-right: 6px; }

/* 状态徽标 */
.yy-badge { display: inline-block; padding: 0 9px; height: 22px; line-height: 22px; border-radius: 11px; font-size: 12px; white-space: nowrap; }
.yy-badge-rose   { background: #F9E7E9; color: #C0787F; }
.yy-badge-green  { background: #E4F0E9; color: #7FA891; }
.yy-badge-blue   { background: #E7EEF5; color: #8CA6BD; }
.yy-badge-gold   { background: #F6EEE1; color: #B4976B; }
.yy-badge-orange { background: #FBEFDE; color: #CD9355; }
.yy-badge-gray   { background: #F0EDEE; color: #9C8E93; }
.yy-badge-red    { background: #F9E4E4; color: #C66; }
.yy-price { color: #C0787F; font-weight: 600; }
.yy-muted { color: #9C8E93; font-size: 12px; }

/* 表单内多字段一行(输入框+单位文字不换行不错位) */
.yy-row { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; }
.yy-row .layui-input { flex: 0 0 auto; }
.yy-row .seg { white-space: nowrap; color: #9C8E93; font-size: 13px; }

/* ---------- 弹窗表单(重做版: 标准底部按钮) ---------- */
.layui-form-popup { padding: 18px 20px 6px; }
.layui-form-popup .layui-form-item { margin-bottom: 14px; clear: both; }
.layui-form-popup .layui-form-label { width: 92px; padding: 9px 0; text-align: left; color: #6B5F63; }
.layui-form-popup .layui-input-block { margin-left: 102px; min-height: 36px; }
.layui-form-popup .layui-input, .layui-form-popup .layui-textarea, .layui-form-popup .layui-select { border-radius: 6px; border-color: #E8DCDF; }
.layui-form-popup .layui-input:focus, .layui-form-popup .layui-textarea:focus { border-color: #E8B4BC !important; }
.layui-form-popup .layui-textarea { min-height: 88px; }
.layui-form-popup .form-tip { color: #9C8E93; font-size: 12px; line-height: 1.7; display: block; margin-top: 4px; }
.layui-form-popup .img-preview { margin-top: 8px; }
.layui-form-popup .img-preview img { max-width: 100%; max-height: 200px; border-radius: 8px; border: 1px solid #F0E3E6; }
.layui-form-popup .layui-form-switch { margin-top: 6px; }
.layui-form-popup .layui-form-switch i { background: #E3CDD1; }
.layui-form-checked > div.layui-unselect.layui-form-switch { background-color: #C0787F !important; border-color: #C0787F !important; }
.layui-form-radio > i:hover, .layui-form-radioed > i { color: #C0787F; }
.layui-form-checkbox[lay-skin=primary] i:hover { border-color: #C0787F; }
.layui-form-checked[lay-skin=primary] i { background-color: #C0787F !important; border-color: #C0787F !important; }
.layui-form-select dl dd.layui-this { background: #C0787F; }

/* 图片上传小组件 */
.yy-uploader { display: inline-block; }
.yy-uploader .pick-btn { cursor: pointer; }
.yy-up-imgs { margin-top: 8px; }
.yy-up-imgs .item { position: relative; display: inline-block; margin: 0 8px 8px 0; }
.yy-up-imgs .item img { width: 78px; height: 78px; border-radius: 8px; border: 1px solid #F0E3E6; object-fit: cover; }
.yy-up-imgs .item .del { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; line-height: 16px; text-align: center; background: #C66; color: #fff; border-radius: 50%; cursor: pointer; font-size: 12px; }
.yy-up-imgs .item .main-flag { position: absolute; left: 0; bottom: 0; right: 0; background: rgba(192,120,127,.85); color: #fff; font-size: 11px; text-align: center; border-radius: 0 0 8px 8px; line-height: 18px; }
.yy-up-imgs .item .mv { position: absolute; top: 50%; margin-top: -9px; width: 18px; height: 18px; line-height: 17px; text-align: center; background: rgba(74,65,69,.55); color: #fff; border-radius: 50%; cursor: pointer; font-size: 10px; }
.yy-up-imgs .item .mv.l { left: -7px; }
.yy-up-imgs .item .mv.r { right: -7px; }

/* ---------- 详情弹窗 ---------- */
.layer-detail { padding: 18px 22px; max-height: 540px; overflow-y: auto; }
.layer-detail h4 { margin: 18px 0 8px; font-size: 14px; font-weight: 600; color: #C0787F; }
.layer-detail h4:first-child { margin-top: 0; }
.layer-detail h4::before { content: ''; display: inline-block; width: 4px; height: 13px; background: linear-gradient(180deg,#E8B4BC,#C0787F); border-radius: 2px; margin-right: 7px; vertical-align: -1px; }
.layer-detail .d-row { padding: 5px 0; font-size: 13px; color: #6B5F63; }
.layer-detail .d-row b { color: #4A4145; font-weight: 600; }
.layer-detail img.d-thumb { width: 44px; height: 44px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.layer-detail .d-goods { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px dashed #F0E3E6; }
.layer-detail .d-goods img { width: 48px; height: 48px; border-radius: 6px; margin-right: 10px; object-fit: cover; }
.layer-detail .d-goods .g-name { flex: 1; }
.layer-detail table.layui-table { margin-top: 6px; }
.layer-detail .layui-table th { background: #FBF7F4; }

/* 时间线 */
.yy-timeline { margin: 6px 0 6px 4px; }
.yy-timeline .tl-item { position: relative; padding: 0 0 14px 18px; border-left: 2px solid #F0D9DD; }
.yy-timeline .tl-item:last-child { border-left-color: transparent; padding-bottom: 2px; }
.yy-timeline .tl-item::before { content: ''; position: absolute; left: -5px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: #E8B4BC; }
.yy-timeline .tl-item.first::before { background: #C0787F; box-shadow: 0 0 0 3px rgba(192,120,127,.18); }
.yy-timeline .tl-head { font-size: 13px; color: #4A4145; font-weight: 600; }
.yy-timeline .tl-body { font-size: 12px; color: #9C8E93; margin-top: 2px; }
.yy-timeline .tl-time { font-size: 12px; color: #C0B3B7; }

/* ---------- 仪表盘 ---------- */
.yy-stat-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.yy-stat { flex: 1 1 15%; min-width: 140px; background: #fff; border-radius: 10px; border: 1px solid #EFE7E5; padding: 16px 16px 12px; box-shadow: none; position: relative; overflow: hidden; }
.yy-stat .num { font-size: 26px; font-weight: 700; color: #4A4145; line-height: 1.2; }
.yy-stat .lbl { font-size: 12px; color: #9C8E93; margin-top: 4px; }
.yy-stat .deco { position: absolute; right: -14px; bottom: -18px; width: 74px; height: 74px; border-radius: 50%; background: linear-gradient(135deg, rgba(232,180,188,.35), rgba(214,189,156,.25)); }
.yy-stat.hl .num { color: #C0787F; }
.yy-stat.clickable { cursor: pointer; transition: transform .15s; }
.yy-stat.clickable:hover { transform: translateY(-2px); }
.yy-dash-link { color: #C0787F; cursor: pointer; }
.yy-dash-link:hover { text-decoration: underline; }

/* ---------- 树形左侧面板 ---------- */
.yy-tree { background: #fff; border-radius: 10px; border: 1px solid #EFE7E5; box-shadow: none; }
.yy-tree .hd { padding: 12px 14px; border-bottom: 1px solid #F5E9EB; font-weight: 600; }
.yy-tree .bd { padding: 8px 10px; max-height: 560px; overflow: auto; }
.yy-tree .layui-tree-txt { color: #6B5F63; }
.yy-tree .layui-tree-entry.selected .layui-tree-txt { color: #C0787F; font-weight: 600; }
.yy-tree .all-item { padding: 7px 8px; cursor: pointer; border-radius: 6px; color: #6B5F63; margin-bottom: 4px; }
.yy-tree .all-item:hover { background: #FDF6F7; }
.yy-tree .all-item.active { background: #F9E7E9; color: #C0787F; font-weight: 600; }

/* ---------- 分组配置页 ---------- */
.yy-cfg-tabs .layui-tab-title { border-color: #F0E3E6; }
.yy-cfg-tabs .layui-tab-title .layui-this { color: #C0787F; }
.yy-cfg-tabs .layui-tab-title .layui-this:after { border-bottom-color: #C0787F; }
.yy-cfg-item { display: flex; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed #F0E3E6; }
.yy-cfg-item .k { width: 210px; flex-shrink: 0; }
.yy-cfg-item .k .name { color: #4A4145; font-weight: 600; font-size: 13px; }
.yy-cfg-item .k .remark { color: #9C8E93; font-size: 12px; margin-top: 2px; }
.yy-cfg-item .v { flex: 1; padding-right: 6px; }
.yy-cfg-item .v .layui-input { border-radius: 6px; }
.yy-cfg-secret { font-family: Consolas, monospace; letter-spacing: 1px; }

/* 手工费分段编辑 */
.yy-fee-row { display: flex; align-items: center; margin-bottom: 8px; }
.yy-fee-row .layui-input { border-radius: 6px; text-align: center; }
.yy-fee-row .seg { margin: 0 6px; color: #9C8E93; }
.yy-fee-row .fee { width: 110px !important; }

/* 售后/订单状态步骤 */
.yy-steps { display: flex; margin: 4px 0 10px; }
.yy-steps .st { flex: 1; text-align: center; position: relative; font-size: 12px; color: #9C8E93; }
.yy-steps .st::before { content: ''; display: block; width: 10px; height: 10px; border-radius: 50%; background: #E9DEE0; margin: 0 auto 4px; }
.yy-steps .st::after { content: ''; position: absolute; top: 4px; left: 50%; width: 100%; height: 2px; background: #E9DEE0; z-index: 0; }
.yy-steps .st:last-child::after { display: none; }
.yy-steps .st.done { color: #C0787F; }
.yy-steps .st.done::before, .yy-steps .st.done::after { background: #E8B4BC; }
.yy-steps .st.cur { color: #A9606A; font-weight: 600; }
.yy-steps .st.cur::before { background: #C0787F; box-shadow: 0 0 0 3px rgba(192,120,127,.2); }

/* ---------- 商品管理左侧分类列表(手写树) ---------- */
.cate-group { margin-bottom: 2px; }
.cate-top {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 8px; border-radius: 6px; cursor: pointer;
  color: #6B5F63; font-size: 13px; font-weight: 600;
}
.cate-top:hover { background: #FDF6F7; color: #C0787F; }
.cate-top.active { background: #F9E7E9; color: #C0787F; }
.cate-arrow { font-size: 12px; color: #B3A6AA; transition: transform .15s; display: inline-block; }
.cate-arrow.cate-arrow-open { transform: rotate(90deg); }
.cate-count {
  margin-left: auto; font-size: 11px; font-weight: 400;
  background: #F5F0ED; color: #9C8E93; border-radius: 8px; padding: 0 7px; line-height: 16px;
}
.cate-children { padding-left: 18px; }
.cate-child {
  padding: 6px 8px; border-radius: 6px; cursor: pointer;
  color: #9C8E93; font-size: 12.5px;
}
.cate-child:hover { color: #C0787F; background: #FDF6F7; }
.cate-child.active { background: #F9E7E9; color: #C0787F; font-weight: 600; }
.cate-empty { padding: 18px 8px; color: #B3A6AA; font-size: 12px; }

/* ---------- 表格内商品行(订单列表等) ---------- */
.yy-goods { display: flex; align-items: center; padding: 3px 0; }
.yy-goods img {
  width: 40px; height: 40px; border-radius: 6px; object-fit: cover;
  margin-right: 8px; border: 1px solid #F0E3E6; background: #FBF7F4; flex-shrink: 0;
}
.yy-goods-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 弹窗内原生 select(运费地区等) ---------- */
.yy-sel {
  height: 36px; padding: 0 8px; box-sizing: border-box;
  border: 1px solid #E8DCDF; border-radius: 6px;
  background: #fff; color: #4A4145; font-size: 13px;
  outline: none; flex: 1; min-width: 0;
}
.yy-sel:focus { border-color: #E8B4BC; }
