/* ===== 碰一碰拓客系统 · 样式 ===== */
:root{
  --brand:#FF6A2B; --brand2:#FF3D6E; --brand-soft:#FFF1EA;
  --ink:#1D2433; --ink2:#4B5566; --muted:#8A93A3; --line:#E8ECF2;
  --bg:#F5F7FA; --card:#FFFFFF; --green:#12B76A; --blue:#2E90FA; --amber:#F79009; --red:#F04438;
  --shadow:0 2px 12px rgba(20,30,55,.06); --shadow-lg:0 12px 40px rgba(20,30,55,.14);
  --r:12px;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Segoe UI",sans-serif;background:var(--bg);color:var(--ink);font-size:14px;line-height:1.55;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font-family:inherit;font-size:inherit;color:inherit}
button{cursor:pointer;border:none;background:none}
.ic{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
a{color:inherit;text-decoration:none}
::-webkit-scrollbar{width:7px;height:7px}
::-webkit-scrollbar-thumb{background:#D7DDE6;border-radius:8px}
::-webkit-scrollbar-track{background:transparent}

/* ===== 顶部导航 ===== */
.topbar{height:64px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 24px;gap:28px;position:sticky;top:0;z-index:50}
.brand{display:flex;align-items:center;gap:10px;min-width:220px}
.brand-mark{width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,var(--brand),var(--brand2));display:grid;place-items:center;color:#fff;box-shadow:0 4px 12px rgba(255,106,43,.3)}
.brand-mark .ic{width:21px;height:21px;stroke-width:2.4}
.brand-text{font-weight:800;font-size:17px;letter-spacing:-.3px}
.brand-text span{font-size:10px;color:var(--brand);font-weight:800;background:var(--brand-soft);padding:2px 6px;border-radius:5px;vertical-align:middle;margin-left:3px}
.topnav{display:flex;gap:4px;background:#F2F4F8;padding:4px;border-radius:10px}
.topnav-btn{padding:8px 18px;border-radius:7px;color:var(--ink2);font-weight:600;transition:.18s}
.topnav-btn.active{background:#fff;color:var(--brand);box-shadow:0 1px 6px rgba(20,30,55,.1)}
.top-actions{margin-left:auto;display:flex;align-items:center;gap:10px}
.cloud-status{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;padding:5px 9px;border-radius:20px;background:#EAFBF3;color:#12B76A;white-space:nowrap}
.cloud-status::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.cloud-status.syncing{background:#FFF6E5;color:#B77800}
.cloud-status.error{background:#FFF1EA;color:#D4451B}
.cloud-status.local{background:#F2F4F8;color:var(--ink2)}
.store-select{border:1px solid var(--line);border-radius:8px;padding:8px 12px;background:#fff;color:var(--ink);max-width:190px;outline:none}
.btn-ghost{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:8px;padding:8px 12px;color:var(--ink2);font-weight:600;transition:.18s}
.btn-ghost:hover{border-color:var(--brand);color:var(--brand)}

/* ===== 视图切换 ===== */
.view{display:none;min-height:calc(100vh - 64px)}
.view.active{display:block}

/* ===== 顾客端 ===== */
.customer-layout{max-width:1180px;margin:0 auto;padding:36px 24px 60px;display:grid;grid-template-columns:1fr 1fr;gap:72px;align-items:center}
.phone-wrap{position:relative;display:flex;justify-content:center}
.phone-shadow{position:absolute;width:300px;height:30px;bottom:-14px;border-radius:50%;background:rgba(30,40,60,.16);filter:blur(18px)}
.phone-frame{width:326px;height:646px;background:#15181F;border-radius:44px;padding:9px;box-shadow:0 28px 70px rgba(16,24,40,.3),inset 0 0 0 2px #2A2F3A;position:relative}
.phone-notch{position:absolute;top:9px;left:50%;transform:translateX(-50%);width:108px;height:26px;background:#15181F;border-radius:0 0 18px 18px;z-index:5}
.phone-status{height:38px;display:flex;align-items:center;justify-content:space-between;padding:0 22px;color:#fff;font-size:11px;font-weight:700}
.status-right{display:flex;align-items:center;gap:4px;font-size:10px}
.status-right .ic{width:13px;height:13px}
.phone-screen{height:576px;background:#FAFBFD;border-radius:32px;overflow:hidden;position:relative;display:flex;flex-direction:column}
.phone-home{position:absolute;bottom:17px;left:50%;transform:translateX(-50%);width:104px;height:4px;background:rgba(255,255,255,.5);border-radius:4px}

/* 顾客端侧栏 */
.customer-aside{max-width:460px}
.aside-badge{display:inline-flex;align-items:center;gap:6px;color:var(--brand);background:var(--brand-soft);padding:6px 12px;border-radius:20px;font-size:12px;font-weight:700;margin-bottom:18px}
.aside-badge .ic{width:14px;height:14px}
.customer-aside h1{font-size:34px;line-height:1.35;letter-spacing:-.8px;margin-bottom:14px}
.aside-intro{color:var(--ink2);font-size:15px;line-height:1.8;margin-bottom:24px}
.flow-list{display:flex;flex-direction:column;gap:14px;margin-bottom:24px}
.flow-item{display:flex;gap:12px;align-items:flex-start}
.flow-num{width:26px;height:26px;border-radius:50%;background:#fff;border:1px solid var(--line);color:var(--brand);font-weight:800;display:grid;place-items:center;font-size:12px;flex:none}
.flow-item b{display:block;font-size:14px}
.flow-item small{color:var(--muted);font-size:12px}
.live-panel{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;box-shadow:var(--shadow)}
.live-title{font-weight:700;font-size:13px;margin-bottom:12px;display:flex;align-items:center;gap:7px}
.dot{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px rgba(18,183,106,.13)}
.live-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;text-align:center}
.live-grid b{display:block;font-size:20px;color:var(--brand)}
.live-grid small{color:var(--muted);font-size:11px}
.aside-tip{color:var(--muted);font-size:12px;margin-top:14px;line-height:1.7}

/* 手机内 - 启动页 */
.cus-start{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;text-align:center;position:relative;overflow:hidden}
.cus-start::before{content:"";position:absolute;top:-90px;left:50%;transform:translateX(-50%);width:320px;height:320px;background:radial-gradient(circle,rgba(255,106,43,.16),transparent 70%);border-radius:50%}
.nfc-rings{position:relative;width:130px;height:130px;display:grid;place-items:center;margin-bottom:20px}
.nfc-rings .ring{position:absolute;border:2px solid rgba(255,106,43,.35);border-radius:50%;animation:ripple 2.6s ease-out infinite}
.nfc-rings .r1{width:60px;height:60px;animation-delay:0s}
.nfc-rings .r2{width:92px;height:92px;animation-delay:.5s}
.nfc-rings .r3{width:126px;height:126px;animation-delay:1s}
@keyframes ripple{0%{transform:scale(.6);opacity:0}30%{opacity:1}100%{transform:scale(1.25);opacity:0}}
.nfc-core{width:58px;height:58px;border-radius:18px;background:linear-gradient(135deg,var(--brand),var(--brand2));display:grid;place-items:center;color:#fff;box-shadow:0 8px 22px rgba(255,61,110,.35);z-index:2}
.nfc-core .ic{width:30px;height:30px;stroke-width:2.2}
.start-store{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 14px;width:100%;text-align:left;margin-bottom:8px;box-shadow:var(--shadow)}
.store-logo{width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,#FFB088,#FF6A2B);display:grid;place-items:center;color:#fff;font-weight:800;font-size:14px;flex:none}
.start-store b{display:block;font-size:13px}
.start-store small{color:var(--muted);font-size:11px}
.start-desc{color:var(--ink2);font-size:12px;margin:10px 0 20px;line-height:1.7}
.btn-primary{background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;border-radius:12px;padding:13px 20px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 8px 20px rgba(255,61,110,.28);transition:.18s;width:100%}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(255,61,110,.36)}
.btn-primary .ic{width:17px;height:17px}
.start-foot{color:#B9C0CB;font-size:10px;margin-top:14px}

/* 手机内 - 活动页 */
.cus-app{flex:1;display:flex;flex-direction:column;min-height:0}
.cus-hero{background:linear-gradient(135deg,#FF7B3D,#FF3D6E);padding:18px 18px 26px;color:#fff;position:relative;flex:none}
.cus-hero::after{content:"";position:absolute;right:-30px;top:-30px;width:140px;height:140px;border:1px solid rgba(255,255,255,.2);border-radius:50%}
.hero-top{display:flex;align-items:center;gap:9px;margin-bottom:12px}
.hero-logo{width:36px;height:36px;border-radius:10px;background:rgba(255,255,255,.22);display:grid;place-items:center;font-weight:800}
.hero-name{font-size:15px;font-weight:800}
.hero-meta{font-size:10px;opacity:.9}
.hero-reward{margin-top:4px;display:inline-flex;align-items:center;gap:5px;background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);padding:5px 10px;border-radius:20px;font-size:11px;font-weight:700}
.cus-tabs{display:flex;background:#fff;border-bottom:1px solid var(--line);flex:none}
.cus-tab{flex:1;padding:12px 0;text-align:center;color:var(--muted);font-size:12px;font-weight:700;position:relative}
.cus-tab.active{color:var(--brand)}
.cus-tab.active::after{content:"";position:absolute;bottom:0;left:28%;right:28%;height:3px;background:var(--brand);border-radius:3px 3px 0 0}
.cus-body{flex:1;overflow-y:auto;padding:14px;min-height:0}
.sec-title{font-size:13px;font-weight:800;margin:2px 0 10px;display:flex;align-items:center;gap:6px}
.sec-title .ic{width:15px;height:15px;color:var(--brand)}
.sec-sub{color:var(--muted);font-size:10px;margin:-6px 0 12px}

/* 平台卡 */
.platform-grid{display:flex;flex-direction:column;gap:9px}
.pf-card{background:#fff;border:1px solid var(--line);border-radius:11px;padding:10px;display:flex;align-items:center;gap:9px;transition:.18s}
.pf-card:hover{border-color:var(--brand);box-shadow:0 4px 14px rgba(255,106,43,.1);transform:translateY(-1px)}
.pf-logo{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;color:#fff;font-weight:800;font-size:14px;flex:none}
.pf-info{flex:1;min-width:0}
.pf-info b{font-size:12px;display:block}
.pf-acts{display:flex;gap:4px;margin:3px 0;flex-wrap:wrap}
.pf-act{font-size:9px;color:var(--brand);background:var(--brand-soft);padding:1px 5px;border-radius:4px}
.pf-info small{color:var(--muted);font-size:9px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pf-go{font-size:10px;font-weight:700;color:#fff;background:var(--ink);padding:6px 9px;border-radius:7px;flex:none}
.pf-card.done{opacity:.62}

/* 表单（手机内） */
.form-group{margin-bottom:11px}
.form-label{font-size:11px;font-weight:700;color:var(--ink2);margin-bottom:5px;display:block}
.form-control{width:100%;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font-size:11px;outline:none;background:#fff}
.form-control:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(255,106,43,.08)}
.chips{display:flex;flex-wrap:wrap;gap:5px}
.chip{font-size:10px;padding:4px 9px;border-radius:14px;border:1px solid var(--line);background:#fff;color:var(--ink2);transition:.15s}
.chip.on{background:var(--brand-soft);border-color:var(--brand);color:var(--brand);font-weight:700}
.segment{display:flex;background:#F2F4F8;border-radius:8px;padding:3px;gap:2px}
.segment button{flex:1;font-size:10px;padding:5px 0;border-radius:6px;color:var(--muted);font-weight:600}
.segment button.on{background:#fff;color:var(--brand);box-shadow:0 1px 4px rgba(0,0,0,.08)}
.btn-gen{width:100%;margin-top:2px}
.ai-tip{background:linear-gradient(135deg,#FFF6F0,#FFF0F3);border:1px solid #FFE0D2;border-radius:9px;padding:9px 10px;font-size:10px;color:#B4542A;line-height:1.6;margin-bottom:11px}
.checkin-guide{display:flex;align-items:flex-start;gap:8px;background:#FFF6F0;border:1px solid #FFD9C7;border-radius:9px;padding:9px 10px;margin-bottom:11px}
.checkin-guide .ic{width:15px;height:15px;color:var(--brand);margin-top:1px}
.checkin-guide>div{flex:1;min-width:0}
.checkin-guide b{font-size:11px;display:block;color:#B4542A}
.checkin-guide small{font-size:9px;color:#C2764E;display:block;line-height:1.6;margin-top:2px}
.checkin-guide .mini-btn{flex:none}
.ai-benefit-card{background:linear-gradient(135deg,#FFF8F2,#FFF1E8);border:1px solid #FFDCC2;border-radius:10px;padding:11px 12px;margin-bottom:12px}
.ai-benefit-card .abc-head{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:#B4542A}
.ai-benefit-card .abc-head .ic{width:15px;height:15px;color:var(--brand)}
.ai-benefit-card .abc-guide{font-size:11px;color:#8A4A29;line-height:1.65;margin-top:7px}
.ai-benefit-card .abc-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.ai-benefit-card .abc-chip{background:#fff;border:1px solid #FFD9C7;color:#C4552A;border-radius:20px;padding:4px 10px;font-size:10px;font-weight:600}
.ai-benefit-card .abc-foot{font-size:9px;color:#C2764E;line-height:1.6;margin-top:9px}
.review-card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:11px;margin-bottom:9px;position:relative}
.review-card p{font-size:11px;line-height:1.75;color:var(--ink2);margin-bottom:9px}
.review-bar{display:flex;gap:6px;align-items:center}
.mini-btn{font-size:10px;font-weight:700;padding:5px 10px;border-radius:7px;border:1px solid var(--line);display:flex;align-items:center;gap:4px}
.mini-btn .ic{width:12px;height:12px}
.mini-btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}
.review-tag{position:absolute;top:9px;right:9px;font-size:9px;color:var(--green);background:#EAFBF3;padding:2px 6px;border-radius:5px;font-weight:700}

/* 福利页 */
.coupon{background:linear-gradient(120deg,#FF8A4C,#FF3D6E);border-radius:12px;padding:14px;color:#fff;display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;position:relative;overflow:hidden}
.coupon::before,.coupon::after{content:"";position:absolute;left:38%;width:14px;height:14px;background:#FAFBFD;border-radius:50%}
.coupon::before{top:-7px}.coupon::after{bottom:-7px}
.coupon-amount{font-size:26px;font-weight:800;line-height:1}
.coupon-amount small{font-size:12px}
.coupon-info b{font-size:12px;display:block}
.coupon-info small{font-size:9px;opacity:.9}
.coupon-btn{background:#fff;color:var(--brand);font-size:10px;font-weight:800;padding:6px 10px;border-radius:16px}
.benefit-card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 12px;display:flex;align-items:center;gap:10px;margin-bottom:9px}
.benefit-ico{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;flex:none}
.benefit-card b{font-size:11px;display:block}
.benefit-card small{font-size:9px;color:var(--muted)}
.benefit-card .mini-btn{margin-left:auto}
.wheel-wrap{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px;text-align:center;margin-top:4px}
.wheel{width:150px;height:150px;border-radius:50%;margin:0 auto 12px;position:relative;border:4px solid #fff;box-shadow:0 4px 18px rgba(0,0,0,.12);background:conic-gradient(#FF6A2B 0deg 60deg,#FFC300 60deg 120deg,#FF3D6E 120deg 180deg,#2E90FA 180deg 240deg,#12B76A 240deg 300deg,#FF8A4C 300deg 360deg);transition:transform 3.2s cubic-bezier(.15,.7,.2,1)}
.wheel-pointer{position:absolute;left:50%;top:-9px;transform:translateX(-50%);width:0;height:0;border-left:9px solid transparent;border-right:9px solid transparent;border-top:18px solid var(--ink);z-index:2}
.wheel-center{position:absolute;inset:38px;background:#fff;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:800;color:var(--brand);box-shadow:0 2px 8px rgba(0,0,0,.12)}
.wheel-labels{position:absolute;inset:0;pointer-events:none}
.wheel-labels span{position:absolute;font-size:9px;font-weight:800;color:#fff;transform:translate(-50%,-50%)}

/* ===== 商家后台 ===== */
.admin-content{flex:1;min-width:0;padding:26px 30px 60px;max-width:1500px}
#view-admin{display:none}
#view-admin.active{display:flex}
.sidebar{width:212px;flex:none;background:#fff;border-right:1px solid var(--line);min-height:calc(100vh - 64px);padding:20px 12px;display:flex;flex-direction:column;position:sticky;top:64px;height:calc(100vh - 64px)}
.sidebar-title{font-size:11px;color:var(--muted);font-weight:700;padding:0 12px 12px;letter-spacing:.5px}
.side-nav{display:flex;flex-direction:column;gap:4px;flex:1;overflow-y:auto}
.side-item{display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:9px;color:var(--ink2);font-weight:600;font-size:13px;transition:.16s;text-align:left}
.side-item:hover{background:#F5F7FA;color:var(--ink)}
.side-item.active{background:var(--brand-soft);color:var(--brand);font-weight:700}
.side-item .ic{width:17px;height:17px}
.sidebar-foot{display:flex;align-items:center;gap:9px;padding:12px;border-top:1px solid var(--line)}
.user-avatar{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;display:grid;place-items:center;font-weight:700}
.sidebar-foot b{font-size:12px;display:block}
.sidebar-foot small{font-size:10px;color:var(--muted)}

.page-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:22px;gap:16px}
.page-head h1{font-size:23px;letter-spacing:-.4px}
.page-head p{color:var(--muted);font-size:13px;margin-top:4px}
.page-actions{display:flex;gap:8px}
.btn{display:inline-flex;align-items:center;gap:6px;padding:9px 15px;border-radius:9px;font-weight:700;font-size:13px;transition:.16s}
.btn .ic{width:15px;height:15px}
.btn-primary{border:1px solid transparent}
.btn-white{background:#fff;border:1px solid var(--line);color:var(--ink2)}
.btn-white:hover{border-color:var(--brand);color:var(--brand)}
.btn-sm{padding:6px 11px;font-size:11px;border-radius:7px}
.btn-plain{background:#F2F4F8;color:var(--ink2)}
.btn-plain:hover{background:#E8ECF2}
.btn-danger{background:#FEF3F2;color:var(--red)}
.btn-green{background:#EAFBF3;color:var(--green)}

/* 指标卡 */
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:18px}
.stat-card{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:18px;box-shadow:var(--shadow);position:relative;overflow:hidden}
.stat-card::after{content:"";position:absolute;right:-18px;top:-18px;width:80px;height:80px;border-radius:50%;background:var(--tint,#FFF1EA);opacity:.7}
.stat-top{display:flex;justify-content:space-between;align-items:center;position:relative;z-index:1}
.stat-label{color:var(--muted);font-size:12px;font-weight:600}
.stat-ico{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;background:var(--tint,#FFF1EA);color:var(--c,var(--brand))}
.stat-ico .ic{width:16px;height:16px}
.stat-value{font-size:28px;font-weight:800;letter-spacing:-.6px;margin:8px 0 3px;position:relative;z-index:1}
.stat-delta{font-size:11px;color:var(--green);font-weight:700}
.stat-delta.down{color:var(--red)}

/* 通用面板 */
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:20px;margin-bottom:18px}
.panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.panel-title{font-size:15px;font-weight:800}
.panel-sub{color:var(--muted);font-size:11px;margin-top:2px}
.grid-2{display:grid;grid-template-columns:1.6fr 1fr;gap:18px}
.grid-2e{display:grid;grid-template-columns:1fr 1fr;gap:18px}

/* 折线图 / 条形 / 漏斗 */
.chart-svg{width:100%;height:210px;display:block}
.bar-row{display:flex;align-items:center;gap:10px;margin-bottom:13px}
.bar-name{width:82px;font-size:12px;color:var(--ink2);flex:none;display:flex;align-items:center;gap:6px}
.bar-track{flex:1;height:9px;background:#F2F4F8;border-radius:6px;overflow:hidden}
.bar-fill{height:100%;border-radius:6px;transition:width .6s}
.bar-val{width:42px;text-align:right;font-size:12px;font-weight:700;color:var(--ink2)}
.funnel-row{display:flex;align-items:center;gap:10px;margin-bottom:9px}
.funnel-bar{height:32px;border-radius:7px;display:flex;align-items:center;padding:0 12px;color:#fff;font-weight:700;font-size:12px;min-width:70px}
.funnel-label{font-size:12px;color:var(--ink2);width:74px;flex:none}

/* 表格 */
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse}
th{text-align:left;color:var(--muted);font-size:11px;font-weight:700;padding:10px 12px;background:#F8FAFC;white-space:nowrap}
td{padding:12px;border-bottom:1px solid var(--line);font-size:12px;vertical-align:middle}
tr:last-child td{border-bottom:none}
tbody tr:hover{background:#FCFDFE}
.cell-user{display:flex;align-items:center;gap:8px}
.cell-avatar{width:28px;height:28px;border-radius:50%;background:#F0F2F6;display:grid;place-items:center;font-size:11px;font-weight:700;color:var(--ink2);flex:none}
.badge{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:12px;font-size:10px;font-weight:700;white-space:nowrap}
.badge.green{background:#EAFBF3;color:var(--green)}
.badge.amber{background:#FFF6E5;color:var(--amber)}
.badge.blue{background:#EAF3FF;color:var(--blue)}
.badge.red{background:#FEF3F2;color:var(--red)}
.badge.gray{background:#F2F4F8;color:var(--muted)}
.pf-dot{width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:5px}

/* 表单（后台） */
.field{margin-bottom:16px}
.field label{display:block;font-size:12px;font-weight:700;margin-bottom:7px;color:var(--ink2)}
.field .hint{color:var(--muted);font-weight:400;font-size:11px;margin-left:6px}
.input,.textarea,.select{width:100%;border:1px solid var(--line);border-radius:9px;padding:10px 12px;font-size:13px;outline:none;background:#fff;transition:.16s}
.input:focus,.textarea:focus,.select:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(255,106,43,.08)}
.textarea{min-height:88px;resize:vertical;line-height:1.7}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}
.chip-lg{font-size:12px;padding:7px 13px;border-radius:8px;border:1px solid var(--line);background:#fff;color:var(--ink2)}
.chip-lg.on{background:var(--brand-soft);border-color:var(--brand);color:var(--brand);font-weight:700}
.switch{width:42px;height:23px;border-radius:14px;background:#D7DDE6;position:relative;transition:.2s;flex:none}
.switch::after{content:"";position:absolute;top:3px;left:3px;width:17px;height:17px;border-radius:50%;background:#fff;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.switch.on{background:var(--brand)}
.switch.on::after{left:22px}
.switch-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.switch-row:last-child{border-bottom:none}
.switch-row .sw-info{flex:1}
.switch-row b{font-size:13px;display:block}
.switch-row small{color:var(--muted);font-size:11px}

/* 门店卡片 */
.store-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.store-card{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:18px;box-shadow:var(--shadow);transition:.18s}
.store-card:hover{border-color:var(--brand);transform:translateY(-2px);box-shadow:0 8px 24px rgba(20,30,55,.1)}
.store-card .sc-top{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.store-card .sc-body{font-size:12px;color:var(--ink2);line-height:1.9}
.store-card .sc-body b{color:var(--ink)}
.sc-foot{display:flex;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.qr-mini{width:74px;height:74px;border-radius:8px;background:#fff;border:1px solid var(--line);display:grid;place-items:center;padding:4px;flex:none}
.qr-mini svg{width:100%;height:100%;display:block}

/* 平台链接卡片 */
.plink-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.plink-card{background:#fff;border:1px solid var(--line);border-radius:11px;padding:15px;transition:.18s}
.plink-card:hover{border-color:var(--c);box-shadow:0 6px 18px rgba(20,30,55,.07)}
.plc-top{display:flex;align-items:center;gap:6px;margin-bottom:5px}
.plc-top b{font-size:14px}
.plc-top .badge{margin-left:auto}
.plc-desc{font-size:11px;color:var(--muted);margin-bottom:10px}
.plink-card .input{font-size:12px}
.plc-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;flex-wrap:wrap}
.plc-default{font-size:11px;color:var(--muted);word-break:break-all;max-width:180px}
.plc-switches{display:flex;gap:18px;margin-top:11px}
.plc-sw{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:var(--ink2);cursor:pointer;user-select:none}
.plc-sw input{position:absolute;opacity:0;width:0;height:0}
.plc-track{width:34px;height:19px;border-radius:12px;background:#D5DAE3;position:relative;transition:.2s;flex:none}
.plc-track:after{content:"";position:absolute;top:2px;left:2px;width:15px;height:15px;border-radius:50%;background:#fff;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.plc-sw input:checked + .plc-track{background:var(--brand)}
.plc-sw input:checked + .plc-track:after{transform:translateX(15px)}
@media(max-width:760px){.plink-grid{grid-template-columns:1fr}}

/* AI角色卡 */
.role-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.role-card{background:#fff;border:1px solid var(--line);border-radius:11px;padding:14px;transition:.18s}
.role-card:hover{border-color:var(--brand)}
.role-ico{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;font-size:17px;margin-bottom:10px}
.role-card b{font-size:13px;display:block;margin-bottom:4px}
.role-card small{color:var(--muted);font-size:11px;display:block;line-height:1.6;margin-bottom:10px}

/* 动态流 */
.feed-item{display:flex;gap:10px;padding:10px 0;border-bottom:1px dashed var(--line)}
.feed-item:last-child{border-bottom:none}
.feed-ico{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;flex:none}
.feed-body{flex:1;min-width:0}
.feed-body b{font-size:12px}
.feed-body small{color:var(--muted);font-size:10px;display:block}

/* 空状态 / 提示条 */
.empty{padding:40px;text-align:center;color:var(--muted);font-size:13px}
.notice{background:#FFF8EB;border:1px solid #FDE9C8;border-radius:9px;padding:11px 14px;color:#946200;font-size:12px;line-height:1.7;margin-bottom:16px}
.notice .ic{width:15px;height:15px;vertical-align:-3px;margin-right:5px}

/* ===== 弹窗 & Toast ===== */
.modal-mask{position:fixed;inset:0;background:rgba(16,24,40,.45);display:grid;place-items:center;z-index:200;padding:20px;backdrop-filter:blur(2px)}
.modal{background:#fff;border-radius:16px;width:100%;max-width:480px;max-height:86vh;overflow:auto;box-shadow:var(--shadow-lg);animation:pop .2s ease-out}
@keyframes pop{from{transform:scale(.94) translateY(10px);opacity:0}to{transform:none;opacity:1}}
.modal-head{padding:18px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
.modal-head h3{font-size:16px}
.modal-body{padding:20px}
.modal-foot{padding:14px 20px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px}
.icon-btn{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;color:var(--muted)}
.icon-btn:hover{background:#F2F4F8}
#toast-root{position:fixed;top:78px;right:24px;z-index:300;display:flex;flex-direction:column;gap:8px}
.toast{background:#1D2433;color:#fff;padding:11px 16px;border-radius:10px;box-shadow:var(--shadow-lg);font-size:13px;display:flex;align-items:center;gap:8px;animation:slidein .25s ease-out;max-width:340px}
.toast .ic{width:16px;height:16px;color:#5BE0A0}
@keyframes slidein{from{transform:translateX(30px);opacity:0}to{transform:none;opacity:1}}

/* 评价后生成的礼品核销码 */
.gift-code-card{background:linear-gradient(135deg,#FFF6F0,#fff);border:1px solid #FFD9C7;border-radius:12px;padding:14px;margin-bottom:10px;box-shadow:0 3px 12px rgba(255,106,43,.07)}
.gcc-top{display:flex;align-items:center;gap:6px;font-size:12px}
.gcc-top b{flex:1}
.gcc-code{font-size:22px;font-weight:800;letter-spacing:3px;color:var(--brand);text-align:center;padding:8px 0 6px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.gcc-reward{font-size:11px;color:var(--muted);text-align:center;margin-bottom:10px;line-height:1.6}
.gift-code-card .mini-btn{width:100%}
.gcc-qr{display:flex;justify-content:center;padding:10px 0 2px}
.gcc-qr .qr-mini{background:#fff;border:2px solid #FFD9C7;border-radius:10px;box-shadow:0 2px 10px rgba(255,106,43,.1)}
.gcc-actions{display:flex;gap:8px;margin-top:8px}
.gcc-actions .mini-btn{flex:1;width:auto}
.gcc-proof-tip{background:#FFF6E5;border:1px solid #FFE0A6;border-radius:9px;padding:10px 11px;font-size:11px;color:#A55B0E;line-height:1.7;margin:10px 0 12px}
.proof-upload{display:flex;align-items:center;justify-content:center;gap:6px;cursor:pointer}
.proof-modal{text-align:center}
.proof-modal img{max-width:100%;max-height:70vh;border-radius:8px;display:block;margin:0 auto}

/* 响应式 */
@media(max-width:1000px){
  .customer-layout{grid-template-columns:1fr;gap:36px;padding-top:24px}
  .customer-aside{max-width:none}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .grid-2,.grid-2e{grid-template-columns:1fr}
  .store-grid,.role-grid{grid-template-columns:repeat(2,1fr)}
  .topbar{gap:12px;padding:0 14px}
  .brand{min-width:auto}
  .brand-text{font-size:15px}
  .store-select{max-width:130px}
}
@media(max-width:640px){
  .stat-grid,.store-grid,.role-grid,.form-grid{grid-template-columns:1fr}
  .sidebar{width:62px;padding:16px 8px}
  .side-item span{display:none}
  .sidebar-title,.sidebar-foot div:last-child{display:none}
  .topnav-btn{padding:8px 10px;font-size:12px}
}

/* 顾客专属链接：隐藏管理后台与导航，全屏只显示活动页 */
body.customer-only .topbar,
body.customer-only .topnav,
body.customer-only .top-actions,
body.customer-only .customer-aside,
body.customer-only #view-admin,
body.customer-only .phone-shadow,
body.customer-only .phone-notch,
body.customer-only .phone-status,
body.customer-only .phone-home{display:none!important}
body.customer-only .customer-layout{display:block;max-width:none;margin:0;padding:0}
body.customer-only .phone-wrap{display:block;width:100%}
body.customer-only .phone-frame{width:100%;height:auto;min-height:100vh;border-radius:0;padding:0;box-shadow:none;background:#FAFBFD}
body.customer-only .phone-screen{height:auto;min-height:100vh;border-radius:0;overflow:visible}
body.customer-only .cus-start,
body.customer-only .cus-app{min-height:100vh}
body.customer-only .cus-body{overflow:visible}
body.customer-only .view{min-height:100vh}
