/* RIDE BEYOND 业务后台 —— 配色取自小程序设计变量（--ink / --paper / --red） */
:root { --ink:#1F2A36; --paper:#F5F4F0; --line:#E6E3DC; --sub:#8A8F98; --red:#C0392B; --ok:#4E8B6A; --warn:#8A6A3E; }
* { box-sizing: border-box; }
body { margin:0; display:flex; min-height:100vh; background:var(--paper); color:#1A1A1A;
  font:14px/1.6 -apple-system,"PingFang SC","Helvetica Neue",sans-serif; }

.side { width:200px; flex-shrink:0; background:var(--ink); color:#fff; display:flex; flex-direction:column; }
.brand { padding:24px 20px; font-size:16px; letter-spacing:2px; border-bottom:1px solid rgba(255,255,255,.12); }
.brand small { display:block; font-size:11px; opacity:.6; letter-spacing:0; margin-top:6px; }
.side nav { flex:1; padding:12px 0; }
.side nav a { display:block; padding:12px 20px; color:rgba(255,255,255,.75); text-decoration:none; font-size:14px; }
.side nav a:hover { background:rgba(255,255,255,.06); color:#fff; }
.side nav a.on { background:rgba(255,255,255,.12); color:#fff; border-left:3px solid var(--red); }
.logout { padding:16px 20px; border-top:1px solid rgba(255,255,255,.12); }
.logout .who { font-size:12px; opacity:.6; margin-bottom:8px; }
.logout button { background:none; border:1px solid rgba(255,255,255,.3); color:#fff; padding:6px 14px; border-radius:4px; cursor:pointer; }

main { flex:1; padding:24px 32px 64px; min-width:0; }
header { display:flex; align-items:baseline; justify-content:space-between; border-bottom:1px solid var(--line); padding-bottom:16px; }
h1 { font-size:22px; margin:0; } h2 { font-size:15px; margin:28px 0 10px; }
.muted { color:var(--sub); font-size:12px; } .warn { color:var(--warn); font-size:12px; }
.msg { background:#FBF8F1; border-left:3px solid var(--warn); padding:10px 14px; margin:16px 0; }
.msg.err { background:#FBEDEA; color:#8A2A1C; font-weight:600; }   /* 失败 / 表单出错原地显示 */
.msg.ok { background:#EAF4EC; border-left-color:#3F7D5C; color:#1F4D35; }   /* 成功 */
.readonly { background:#EEF3EF; border-left:3px solid var(--ok); padding:10px 14px; margin:16px 0; font-size:13px; }
.back { display:inline-block; margin:16px 0 4px; color:var(--sub); text-decoration:none; }

.cards { display:flex; flex-wrap:wrap; gap:12px; margin:20px 0; }
.card { flex:1 1 150px; background:#fff; border:1px solid var(--line); border-radius:8px; padding:16px 18px;
  text-decoration:none; color:inherit; display:flex; flex-direction:column; gap:8px; }
.card strong { font-size:28px; } .card.hot strong { color:var(--red); }
.card span { font-size:13px; color:var(--sub); }

table { width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line); }
th, td { text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); font-size:13px; vertical-align:top; }
th { background:#F0EEE9; font-weight:600; white-space:nowrap; }
td.ell { max-width:280px; }
table.kv th { width:110px; }

.tabs { margin:18px 0; } .tabs a { display:inline-block; padding:6px 14px; margin-right:8px; border:1px solid var(--line);
  border-radius:999px; background:#fff; color:inherit; text-decoration:none; font-size:13px; }
.tabs a.on { background:var(--ink); color:#fff; border-color:var(--ink); }

form.act { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
form.box { background:#fff; border:1px solid var(--line); border-radius:8px; padding:16px; margin-bottom:14px; }
form.box.inline { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; }
label { display:block; font-size:12px; color:var(--sub); margin-bottom:10px; }
input, select { display:block; margin-top:4px; padding:7px 10px; border:1px solid var(--line); border-radius:4px;
  font-size:13px; min-width:160px; background:#fff; }
form.act input, form.act select { margin-top:0; }
button { padding:7px 14px; border:1px solid var(--ink); background:#fff; border-radius:4px; cursor:pointer; font-size:13px; }
button.ok { background:var(--ink); color:#fff; }
button.danger { border-color:var(--red); color:var(--red); }

.steps { display:flex; flex-wrap:wrap; gap:6px; }
.step { font-size:12px; padding:4px 10px; border-radius:999px; background:#EEF3EF; color:var(--ok); border:1px solid #D5E4D9; }
.step.now { background:#FBF8F1; color:var(--warn); border-color:#E8D9C3; }
.step.todo { background:#F2F2F2; color:var(--sub); border-color:#E6E6E6; }
.step.skip { background:#F2F2F2; color:#B5B5B5; text-decoration:line-through; }
.msg-row { border-bottom:1px solid var(--line); padding:8px 0; font-size:13px; }
.two-col { display:flex; gap:24px; flex-wrap:wrap; }
.two-col section { flex:1 1 380px; min-width:0; }

.login-page { display:flex; align-items:center; justify-content:center; background:var(--ink); }
.login { background:#fff; border-radius:12px; padding:36px 32px; width:320px; }
.login .brand { color:var(--ink); padding:0 0 20px; border:none; }
.login button { width:100%; background:var(--ink); color:#fff; padding:10px; margin-top:8px; }
.login input { width:100%; }
textarea { display:block; margin-top:4px; padding:7px 10px; border:1px solid var(--line); border-radius:4px;
  font-size:13px; width:100%; max-width:560px; box-sizing:border-box; font-family:inherit; }
.preview { background:#F7F6F2; border:1px solid var(--line); border-radius:8px; padding:12px 14px; max-width:420px; margin:8px 0 14px; }
.preview b { display:block; font-size:14px; } .preview span { font-size:12px; color:var(--sub); }
a.btn-link { display:inline-block; padding:7px 14px; border:1px solid var(--ink); border-radius:4px; background:var(--ink); color:#fff; text-decoration:none; font-size:13px; }
/* 操作手册：正文控制行宽，目录一行排开 */
.manual p, .manual li { font-size:14px; line-height:1.75; max-width:52em; }
.manual .lead { font-size:15px; margin:18px 0 8px; }
.manual h2 { font-size:17px; margin:36px 0 10px; padding-top:8px; }
.manual h3 { font-size:14px; margin:22px 0 8px; }
.manual ul, .manual ol { padding-left:22px; }
.manual li ul { margin:4px 0; }
.manual table { margin:8px 0 12px; }
.toc { background:#fff; border:1px solid var(--line); border-radius:8px; padding:14px 20px 12px; margin:16px 0 4px; max-width:860px; }
.toc-h { font-weight:600; font-size:15px; margin-bottom:6px; }
.toc ol { margin:0; padding-left:22px; columns:2 320px; column-gap:32px; }
.toc li { font-size:14px; line-height:1.9; break-inside:avoid; }
.toc a { color:var(--ink); text-decoration:none; border-bottom:1px solid var(--line); }
.toc a:hover { border-color:var(--ink); }
.manual h2 .no { display:inline-block; min-width:26px; color:var(--red); font-variant-numeric:tabular-nums; }
.manual h2 .totop { float:right; font-size:12px; font-weight:400; color:var(--sub); text-decoration:none; }
.ok-t { color:var(--ok); font-size:12px; }
th.num, td.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }

/* 品牌图片裁剪框（templates/brand.html + static/crop.js）：比例锁定为图片位在手机上的比例 */
body.js .nojs { display:none; }
.js-only { display:none; } body.js .js-only { display:inline-block; }   /* 要靠脚本才能用的按钮：脚本没跑就不出现 */
.crop-mask { position:fixed; inset:0; background:rgba(15,20,26,.6); z-index:100; display:flex; align-items:center; justify-content:center; padding:20px; }
.crop-mask[hidden] { display:none; }
[hidden] { display:none !important; }   /* 「其他（手填）」栏没选时藏起来（static/admin.js） */
input[readonly] { background:#F1EFEA; color:var(--sub); }   /* 锁住不能改的栏（如有人兑换过的优惠券面额） */
.crop-box { background:#fff; border-radius:8px; padding:20px 24px; width:100%; max-width:960px; max-height:calc(100vh - 40px); overflow:auto; }
.crop-main { display:flex; gap:24px; align-items:flex-start; flex-wrap:wrap; }
.crop-stage { position:relative; overflow:hidden; background:#1A1F26; border-radius:6px; cursor:grab; touch-action:none; user-select:none; }
.crop-stage.drag { cursor:grabbing; }
.crop-stage img { position:absolute; max-width:none; pointer-events:none; }
.crop-frame { position:absolute; box-shadow:0 0 0 9999px rgba(15,20,26,.62); outline:1px solid rgba(255,255,255,.9); pointer-events:none; }
.crop-frame canvas { width:100%; height:100%; display:block; }
.crop-tools { display:flex; gap:10px; align-items:center; margin-top:10px; }
.crop-tools input[type=range] { flex:1; min-width:0; }
.crop-side { flex:1; min-width:220px; display:grid; gap:10px; align-content:start; }
.crop-phones { display:flex; gap:14px; align-items:flex-start; flex-wrap:wrap; }
.crop-phone { display:grid; gap:6px; justify-items:center; font-size:12px; color:var(--sub); }
.crop-phone canvas { border-radius:6px; box-shadow:0 0 0 4px #1A1A1A; }
.crop-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:16px; }

/* 活动地点的地址 / 坐标 / 地图选点几栏（_pick.html place_pick），和表单里其他栏排在同一行流里 */
.loc-fields { display: contents; }
/* 在地图上选位置（static/admin.js 5）：腾讯地图选点组件放在弹层里 */
.map-mask { position: fixed; inset: 0; background: rgba(20,26,33,.55); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.map-box { background: #fff; border-radius: 8px; width: min(920px, 100%); height: min(680px, 100%); display: flex; flex-direction: column; overflow: hidden; }
.map-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.map-head .map-close { margin-left: auto; }
.map-frame { flex: 1; width: 100%; border: 0; }
.map-picked { align-self: center; }

/* 以旧换新（RB 2026-10-23）：勾选框和文字同一行；估值单的逐处损伤表不撑出右栏 */
label.check { display:flex; gap:6px; align-items:center; color:var(--text, inherit); font-size:13px; }
label.check input { display:inline-block; margin:0; width:auto; min-width:0; padding:0; flex:none; }
table.dmg { table-layout:fixed; }
table.dmg th, table.dmg td { padding:4px; }
table.dmg th:nth-child(1) { width:12%; } table.dmg th:nth-child(2) { width:32%; }
table.dmg th:nth-child(6) { width:14%; text-align:center; } table.dmg td:nth-child(6) { text-align:center; }
table.dmg input, table.dmg select { width:100%; box-sizing:border-box; margin:0; padding:5px 6px; min-width:0; }
table.dmg input[type=checkbox] { width:auto; min-width:0; }
