:root { --green:#1f6f43; --green-d:#175634; --gold:#c9a227; --bg:#f5f7f5; --line:#e2e8e2; }
* { box-sizing:border-box; margin:0; padding:0; }
body { font-family:"Microsoft YaHei","PingFang SC",sans-serif; background:var(--bg); color:#24382a; font-size:14px; }
a { color:var(--green); text-decoration:none; }
a:hover { text-decoration:underline; }

.topbar { background:var(--green); color:#fff; padding:14px 24px; display:flex; align-items:center; justify-content:space-between; }
.topbar .brand { font-size:18px; font-weight:700; display:flex; align-items:center; gap:10px; }
.topbar .brand img { height:30px; }
.topbar .nav a { color:#eaf5ea; margin-left:18px; font-size:13px; }
.topbar .nav a:hover { color:#fff; }
.topbar .nav .logout { color:#f3d9a0; }

.wrap { max-width:1200px; margin:24px auto; padding:0 20px; }
.card-box { background:#fff; border:1px solid var(--line); border-radius:8px; padding:20px; margin-bottom:20px; }
.toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:16px; }
.toolbar input[type=text], .toolbar select { padding:8px 10px; border:1px solid var(--line); border-radius:6px; font-size:13px; }
.btn { display:inline-block; padding:8px 16px; border-radius:6px; border:1px solid var(--line); background:#fff; cursor:pointer; font-size:13px; color:#24382a; }
.btn:hover { border-color:var(--green); }
.btn.primary { background:var(--green); color:#fff; border-color:var(--green); }
.btn.primary:hover { background:var(--green-d); }
.btn.gold { background:var(--gold); color:#fff; border-color:var(--gold); }
.btn.danger { color:#b23a3a; border-color:#e6c0c0; }
.btn.danger:hover { background:#fdf0f0; }
.btn.sm { padding:4px 10px; font-size:12px; }

table.list { width:100%; border-collapse:collapse; }
table.list th { text-align:left; font-size:12px; color:#6b7a6b; border-bottom:2px solid var(--line); padding:8px 8px; }
table.list td { padding:8px; border-bottom:1px solid var(--line); vertical-align:middle; font-size:13px; }
table.list .thumb { width:46px; height:46px; object-fit:cover; border-radius:4px; border:1px solid var(--line); }
table.list tr:hover td { background:#fafcfa; }
.pager { margin-top:16px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.pager a, .pager .cur { padding:5px 12px; border:1px solid var(--line); border-radius:5px; font-size:13px; }
.pager a:hover { border-color:var(--green); }
.pager .cur { background:var(--green); color:#fff; border-color:var(--green); }
.pager .info { color:#6b7a6b; font-size:13px; }
.pager-jump { margin-left:auto; display:inline-flex; align-items:center; gap:5px; }
.pager-jump input[type=number] { width:56px; padding:5px 6px; border:1px solid var(--line); border-radius:5px; font-size:13px; }

.form-row { margin-bottom:14px; }
.form-row label { display:block; font-size:13px; color:#445544; margin-bottom:5px; font-weight:600; }
.form-row label .hint { font-weight:400; color:#9aa69a; font-size:12px; }
.form-row input[type=text], .form-row input[type=number], .form-row input[type=password], .form-row textarea, .form-row input[type=email] {
  width:100%; padding:9px 11px; border:1px solid var(--line); border-radius:6px; font-size:14px; font-family:inherit;
}
.form-row textarea { min-height:80px; resize:vertical; }
.form-row input:focus, .form-row textarea:focus { outline:none; border-color:var(--green); }
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.imgs-preview { display:flex; gap:10px; flex-wrap:wrap; margin-top:8px; }
.imgs-preview .ip { position:relative; width:90px; }
.imgs-preview .ip img { width:90px; height:90px; object-fit:cover; border-radius:6px; border:1px solid var(--line); }
.imgs-preview .ip button { position:absolute; top:-6px; right:-6px; width:20px; height:20px; border-radius:50%; border:none; background:#b23a3a; color:#fff; cursor:pointer; font-size:12px; line-height:1; }
.flash { background:#e8f4ec; border:1px solid #bcdcc6; color:#175634; padding:10px 14px; border-radius:6px; margin-bottom:16px; }
.muted { color:#8a968a; font-size:12px; }

.login-wrap { max-width:380px; margin:80px auto; }
.login-wrap h1 { text-align:center; color:var(--green); margin-bottom:6px; }
.login-wrap .sub { text-align:center; color:#8a968a; margin-bottom:24px; font-size:13px; }
.error { background:#fdf0f0; color:#b23a3a; border:1px solid #e6c0c0; padding:10px 14px; border-radius:6px; margin-bottom:16px; }

/* 内联编辑 */
.editable { cursor:pointer; border-bottom:1px dashed transparent; padding:2px 5px; display:inline-block; border-radius:3px; min-width:40px; line-height:1.5; transition:background .12s; }
.editable:hover { background:#eaf4ec; border-bottom-color:var(--green); }
.editable .inline-input, .editable .inline-textarea {
  width:100%; padding:3px 6px; border:1.5px solid var(--green); border-radius:4px;
  font-size:13px; font-family:inherit; box-sizing:border-box; display:block;
}
.editable .inline-textarea { resize:vertical; min-height:46px; line-height:1.4; }
.editable .inline-input:focus, .editable .inline-textarea:focus { outline:none; }
.editable-price { white-space:pre-line; }
.inline-hint { color:#8a968a; font-size:12px; margin:0 0 10px; }
.inline-hint b { color:var(--green); }

/* 拖拽排序 */
.drag-handle { cursor:grab; color:#c2cbc2; font-size:17px; user-select:none; line-height:1; touch-action:none; }
.drag-handle:hover { color:var(--green); }
.drag-handle:active { cursor:grabbing; }
tr.dragging { opacity:.45; background:#eaf4ec; pointer-events:none; }

/* 可供开关 */
.switch { position:relative; display:inline-block; width:40px; height:22px; vertical-align:middle; }
.switch input { opacity:0; width:0; height:0; }
.switch .slider { position:absolute; cursor:pointer; top:0; left:0; right:0; bottom:0; background:#c6d0c6; border-radius:22px; transition:.2s; }
.switch .slider:before { content:""; position:absolute; height:16px; width:16px; left:3px; bottom:3px; background:#fff; border-radius:50%; transition:.2s; }
.switch input:checked + .slider { background:var(--green); }
.switch input:checked + .slider:before { transform:translateX(18px); }
tr.unavailable td { opacity:.45; }
tr.unavailable .thumb { filter:grayscale(1); }

/* 位置序号 */
.editable-rank { cursor:pointer; color:#6b7a6b; font-weight:600; border-bottom:1px dashed #c2cbc2; padding:1px 4px; border-radius:3px; }
.editable-rank:hover { color:var(--green); background:#eaf4ec; }

/* 缩略图点击上传 */
.thumb-upload { position:relative; display:inline-block; cursor:pointer; }
.thumb-upload .thumb { display:block; }
.thumb-upload:hover .thumb { opacity:.6; }
.thumb-upload .badge { position:absolute; top:2px; right:2px; background:var(--green); color:#fff; border-radius:50%; width:15px; height:15px; line-height:15px; font-size:11px; text-align:center; opacity:0; transition:.15s; }
.thumb-upload:hover .badge { opacity:1; }
.toast { position:fixed; top:70px; right:24px; background:var(--green); color:#fff; padding:10px 18px;
  border-radius:6px; font-size:13px; box-shadow:0 4px 12px rgba(0,0,0,.15); opacity:0; transition:opacity .25s;
  pointer-events:none; z-index:99; }
.toast.show { opacity:1; }
