/* ==========================================================================
   营销活动（PC端）+ 小程序端优惠券 - 增量样式
   基础控件（筛选栏 / 表格 / 弹窗 / 表单 / Tab）复用 .oldnew-module 既有样式，
   此处只补充「线下活动推广」新增的表单控件、分享码与详情页布局。
   ========================================================================== */

/* ===== 列表：主题色封面缩略图 ===== */
.mkt-module .mkt-thumb { display: block; width: 48px; height: 32px; border-radius: 2px; }

/* ===== 新增 / 编辑活动弹窗 ===== */
.mkt-module .modal.mkt-form-modal { width: 880px; }
.mkt-module .modal.mkt-form-modal .modal-body { max-height: calc(85vh - 120px); }

/* 定向导入：选择文件 + 文件名 + 下载模版 */
.mkt-module .mkt-import { display: flex; align-items: center; gap: 12px; }
.mkt-module .mkt-file-btn { position: relative; overflow: hidden; }
.mkt-module .mkt-file-btn input[type="file"] {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer; font-size: 0;
}
.mkt-module .mkt-file-name { font-size: 12px; color: #666; }

/* 活动时间段：单个边框内起止日期 */
.mkt-module .mkt-date-single {
    display: flex; align-items: center; gap: 10px;
    border: 1px solid #d9d9d9; border-radius: 4px; padding: 5px 10px; background: #fff;
}
.mkt-module .mkt-date-single input { flex: 1; border: none; outline: none; font-size: 13px; color: #333; background: transparent; }
.mkt-module .mkt-date-single span { color: #999; }

/* 活动图片选择器 */
.mkt-module .mkt-img-picker { display: flex; gap: 12px; flex-wrap: wrap; }
.mkt-module .mkt-img-item {
    position: relative; width: 104px; height: 104px; border-radius: 4px; overflow: hidden;
    border: 1px solid #e8e8e8; cursor: pointer; background: #fafafa;
}
.mkt-module .mkt-img-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkt-module .mkt-img-item:hover { border-color: #f5222d; }
.mkt-module .mkt-img-item.active { border-color: #f5222d; box-shadow: 0 0 0 2px rgba(245, 34, 45, .12); }
.mkt-module .mkt-img-cover { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #fff; font-size: 12px; }
.mkt-module .mkt-img-check {
    position: absolute; top: 0; right: 0; background: #52c41a; color: #fff;
    font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 0 0 0 6px;
}

/* 活动详情字数统计 */
.mkt-module .mkt-counter { text-align: right; font-size: 11px; color: #999; margin-top: 2px; }

/* 关联项目：内联选择面板 */
.mkt-module .mkt-picker-panel { border: 1px solid #e8e8e8; border-radius: 4px; padding: 14px; background: #fff; margin-top: 4px; }
.mkt-module .mkt-picker-title { font-size: 13px; font-weight: 500; color: #333; margin-bottom: 12px; }
.mkt-module .mkt-picker-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.mkt-module .mkt-picker-filter label { font-size: 13px; color: #333; white-space: nowrap; }
.mkt-module .mkt-picker-filter input, .mkt-module .mkt-picker-filter select {
    padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; width: 170px;
}
.mkt-module .mkt-picker-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; }

/* ===== 活动分享码弹窗 ===== */
.mkt-module .mkt-share-name { text-align: center; font-size: 16px; font-weight: 600; color: #333; margin-bottom: 18px; }
.mkt-module .mkt-share-qr { display: flex; justify-content: center; }
.mkt-module .mkt-share-qr canvas { border: 1px solid #e8e8e8; padding: 10px; background: #fff; }
.mkt-module .mkt-share-url { text-align: center; font-size: 11px; color: #999; margin-top: 10px; word-break: break-all; }

/* ===== 活动详情页 ===== */
.mkt-module .mkt-detail-grid { display: flex; gap: 28px; }
.mkt-module .mkt-detail-left { width: 260px; flex-shrink: 0; }
.mkt-module .mkt-detail-right { flex: 1; min-width: 0; }
.mkt-module .mkt-detail-img { width: 240px; height: 150px; margin-bottom: 14px; }
.mkt-module .mkt-mini-qr { vertical-align: middle; border: 1px solid #e8e8e8; background: #fff; }
.mkt-module .mkt-target-directed { color: #f5222d; font-weight: 500; }

/* ==========================================================================
   优惠券管理（PC端）：表单内联控件组 / 查看页 / 数据弹窗
   行容器仍用 .form-group + .radio-group，此处只加宽度与状态微调。
   ========================================================================== */
/* 与 .oldnew-module .form-control input 同权重，靠加载顺序覆盖 width:100% */
.mkt-module .form-control input.mktcp-xs, .mkt-module .form-control select.mktcp-xs { width: 92px; }
.mkt-module .form-control input.mktcp-sm, .mkt-module .form-control select.mktcp-sm { width: 150px; }
.mkt-module .form-control input.mktcp-md, .mkt-module .form-control select.mktcp-md { width: 260px; }
.mkt-module .form-control .mktcp-sm[disabled], .mkt-module .form-control .mktcp-md[disabled],
.mkt-module .form-control .mktcp-xs[disabled] { background: #fafafa; color: #999; }

/* 优惠券名称 + 优惠值同行 */
.mkt-module .mktcp-cols { display: flex; gap: 20px; align-items: flex-start; }
.mkt-module .mktcp-col { flex: 1; min-width: 0; }
.mkt-module .mktcp-col-value { flex: 1.2; }
.mkt-module .mktcp-inline { font-size: 13px; color: #333; white-space: nowrap; line-height: 30px; }
.mkt-module .mktcp-inline.required::before { content: '*'; color: #f5222d; margin-right: 4px; }
.mkt-module .mktcp-inline-ctl { display: flex; align-items: center; gap: 8px; }

/* 勾选 / 单选 + 内联控件行 */
.mkt-module .mktcp-checks { flex-wrap: wrap; gap: 8px 16px; }
.mkt-module .mktcp-chk { display: flex; align-items: center; gap: 4px; cursor: pointer; font-size: 13px; }
.mkt-module .mktcp-daterange { width: 300px; }
.mkt-module .mktcp-lock { color: #bbb; cursor: not-allowed; }
.mkt-module .mktcp-off { opacity: .45; }
.mkt-module .mktcp-err { font-size: 11px; color: #f5222d; margin-top: 3px; }
.mkt-module .mktcp-bad { border-color: #f5222d !important; }

/* 「支付渠道 / 月份达标规则」为本次调整新增项，用浅色块标出 */
.mkt-module .mktcp-newfields {
    border: 1px dashed #ffccc7; background: #fff7f7; border-radius: 4px; padding: 8px 10px; margin-top: 6px;
}

/* 查看页：基本信息双列 */
.mkt-module .mktcp-info-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.mkt-module .mktcp-usage { font-size: 13px; color: #333; line-height: 1.9; white-space: pre-wrap; }

/* 数据弹窗：统计卡 + 领取进度 */
.mkt-module .mktcp-stat-row { display: flex; gap: 12px; flex-wrap: wrap; }
.mkt-module .mktcp-stat {
    flex: 1; min-width: 116px; border: 1px solid #f0f0f0; border-radius: 4px;
    background: #fafafa; padding: 12px 14px; text-align: center;
}
.mkt-module .mktcp-stat b { display: block; font-size: 22px; line-height: 1.2; color: #333; }
.mkt-module .mktcp-stat span { display: block; font-size: 12px; color: #999; margin-top: 5px; }
.mkt-module .mktcp-progress { height: 8px; border-radius: 4px; background: #f0f0f0; overflow: hidden; margin: 14px 0 4px; }
.mkt-module .mktcp-progress i { display: block; height: 100%; background: #f5222d; border-radius: 4px; }

/* ==========================================================================
   小程序（C端）：卡券 / 优惠券 + 扫码领取
   ========================================================================== */
/* 主题色渐变封面（C 端独立定义；PC 端复用 .oldnew-module 下的 ldx-cover-*） */
.mkt-cover-red { background: linear-gradient(135deg, #ffb3b3, #f5222d); }
.mkt-cover-blue { background: linear-gradient(135deg, #b3d9ff, #1890ff); }
.mkt-cover-green { background: linear-gradient(135deg, #d9f7be, #52c41a); }
.mkt-cover-orange { background: linear-gradient(135deg, #ffe0b3, #fa8c16); }
.mkt-cover-pink { background: linear-gradient(135deg, #ffd6e7, #eb2f96); }

/* 抵消手机内容区内边距，让 C 端页面通栏铺满 */
.mp-coupon { position: relative; margin: -12px; height: calc(100% + 24px); }
.mp-coupon .mp-page {
    display: flex; flex-direction: column; height: 100%; background: #f5f6f8; overflow: hidden;
}
.mp-coupon .mp-head {
    background: linear-gradient(135deg, #ff6b6b, #f5222d); color: #fff;
    padding: 10px 12px 12px; flex-shrink: 0;
}
.mp-coupon .mp-nav { display: flex; align-items: center; height: 30px; }
.mp-coupon .mp-nav-title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.mp-coupon .mp-nav-side { width: 56px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: 12px; }
.mp-coupon .mp-scan {
    display: inline-flex; align-items: center; gap: 3px; background: rgba(255, 255, 255, .22);
    border-radius: 11px; padding: 3px 8px; font-size: 11px; cursor: pointer;
}
.mp-coupon .mp-tabs { display: flex; gap: 22px; justify-content: center; margin-top: 10px; }
.mp-coupon .mp-tab { font-size: 13px; color: rgba(255, 255, 255, .75); padding-bottom: 4px; cursor: pointer; }
.mp-coupon .mp-tab.active { color: #fff; font-weight: 600; border-bottom: 2px solid #fff; }
.mp-coupon .mp-body { flex: 1; overflow-y: auto; padding: 12px; }

/* 券卡片 */
.mp-coupon .cp-card {
    display: flex; background: #fff; border-radius: 10px; overflow: hidden; margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.mp-coupon .cp-left {
    width: 86px; flex-shrink: 0; color: #f5222d; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 12px 4px; position: relative;
    background: linear-gradient(180deg, #fff1f0, #fff);
}
.mp-coupon .cp-left::after {
    content: ''; position: absolute; right: 0; top: 8px; bottom: 8px;
    border-right: 1px dashed #ffd8d8;
}
.mp-coupon .cp-amount { font-size: 20px; font-weight: 700; line-height: 1.1; }
.mp-coupon .cp-unit { font-size: 10px; color: #ff7875; margin-top: 2px; }
.mp-coupon .cp-right { flex: 1; min-width: 0; padding: 12px; }
.mp-coupon .cp-name { font-size: 14px; font-weight: 600; color: #333; }
.mp-coupon .cp-desc { font-size: 11px; color: #999; margin-top: 3px; line-height: 1.5; }
.mp-coupon .cp-valid { font-size: 10px; color: #bbb; margin-top: 5px; }
.mp-coupon .cp-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.mp-coupon .cp-rule { font-size: 11px; color: #999; cursor: pointer; }
.mp-coupon .cp-use {
    font-size: 11px; color: #fff; background: #f5222d; border-radius: 12px; padding: 4px 12px; cursor: pointer;
}
.mp-coupon .cp-use.gray { background: #d9d9d9; color: #fff; cursor: default; }
.mp-coupon .cp-card.used { filter: grayscale(1); opacity: .62; }
.mp-coupon .cp-badge {
    position: absolute; top: 8px; right: 8px; font-size: 10px; color: #999;
    border: 1px solid #e8e8e8; border-radius: 8px; padding: 1px 6px; background: #fff;
}

/* 空状态 */
.mp-coupon .cp-empty { text-align: center; padding: 56px 0; color: #999; }
.mp-coupon .cp-empty img { width: 96px; height: 96px; object-fit: contain; opacity: .9; }
.mp-coupon .cp-empty div { font-size: 13px; margin-top: 10px; }

/* 身份切换（原型演示：不同手机号看到不同卡券包） */
.mp-coupon .mp-user {
    display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 8px;
    padding: 8px 10px; margin-bottom: 12px; font-size: 12px; color: #666;
}
.mp-coupon .mp-user b { color: #333; font-weight: 600; }
.mp-coupon .mp-user select {
    margin-left: auto; padding: 3px 6px; border: 1px solid #e0e0e0; border-radius: 4px;
    font-size: 11px; color: #333; background: #fff;
}
.mp-coupon .mp-bell { position: relative; font-size: 15px; cursor: pointer; }
.mp-coupon .mp-bell i {
    position: absolute; top: -4px; right: -6px; background: #fff; color: #f5222d;
    border-radius: 7px; min-width: 13px; height: 13px; font-size: 9px; font-style: normal;
    display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* C 端「优惠租房-活动列表」（线下推广活动按需求文档不在此展示） */
.mp-coupon .al-box { background: #fff; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.mp-coupon .al-title { font-size: 13px; font-weight: 600; color: #333; }
.mp-coupon .al-title span { display: block; font-size: 10px; color: #bbb; font-weight: 400; margin-top: 2px; }
.mp-coupon .al-item { display: flex; align-items: center; gap: 10px; border-top: 1px solid #f5f5f5; padding: 9px 0; }
.mp-coupon .al-main { flex: 1; min-width: 0; }
.mp-coupon .al-main b { display: block; font-size: 12px; color: #333; }
.mp-coupon .al-main em { display: block; font-size: 10px; color: #999; font-style: normal; line-height: 1.6; margin-top: 2px; }
.mp-coupon .al-main i { display: block; font-size: 10px; color: #bbb; font-style: normal; margin-top: 2px; }
.mp-coupon .al-btn {
    flex-shrink: 0; font-size: 11px; color: #fff; background: #f5222d; border-radius: 12px;
    padding: 4px 12px; cursor: pointer;
}
.mp-coupon .al-btn.gray { background: #d9d9d9; cursor: default; }

/* 扫码浮层 */
.mp-coupon .scan-mask {
    position: absolute; inset: 0; background: rgba(0, 0, 0, .88); z-index: 20;
    display: flex; flex-direction: column; color: #fff;
}
.mp-coupon .scan-head { display: flex; align-items: center; padding: 10px 12px; font-size: 15px; }
.mp-coupon .scan-box {
    flex: 1; margin: 18px 26px; border-radius: 12px; position: relative; overflow: hidden;
    background: radial-gradient(circle at 50% 45%, #3a3f4b, #14161b 72%);
}
.mp-coupon .scan-frame {
    position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%);
    width: 172px; height: 172px;
}
.mp-coupon .scan-frame span { position: absolute; width: 22px; height: 22px; border: 3px solid #f5222d; }
.mp-coupon .scan-frame span:nth-child(1) { left: 0; top: 0; border-right: none; border-bottom: none; }
.mp-coupon .scan-frame span:nth-child(2) { right: 0; top: 0; border-left: none; border-bottom: none; }
.mp-coupon .scan-frame span:nth-child(3) { left: 0; bottom: 0; border-right: none; border-top: none; }
.mp-coupon .scan-frame span:nth-child(4) { right: 0; bottom: 0; border-left: none; border-top: none; }
.mp-coupon .scan-line {
    position: absolute; left: 8px; right: 8px; top: 8px; height: 2px;
    background: linear-gradient(90deg, transparent, #ff4d4f, transparent);
    animation: mktScan 2.1s linear infinite;
}
@keyframes mktScan { 0% { top: 8px; } 50% { top: 160px; } 100% { top: 8px; } }
.mp-coupon .scan-tip { text-align: center; font-size: 12px; color: rgba(255, 255, 255, .72); margin: 4px 0 12px; }
.mp-coupon .scan-list { padding: 0 16px 18px; max-height: 42%; overflow-y: auto; }
.mp-coupon .scan-item {
    display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .08);
    border-radius: 8px; padding: 9px 11px; margin-bottom: 8px; font-size: 12px; cursor: pointer;
}
.mp-coupon .scan-item img { width: 34px; height: 34px; border-radius: 4px; object-fit: cover; }
.mp-coupon .scan-item .si-cover { display: block; width: 34px; height: 34px; border-radius: 4px; flex-shrink: 0; }
.mp-coupon .scan-item b { display: block; font-size: 12px; font-weight: 600; }
.mp-coupon .scan-item em { font-style: normal; font-size: 10px; color: rgba(255, 255, 255, .6); }
.mp-coupon .scan-item span { margin-left: auto; color: #ff7875; font-size: 11px; white-space: nowrap; }
.mp-coupon .scan-off { text-align: center; font-size: 12px; color: rgba(255, 255, 255, .55); padding: 10px 0 2px; cursor: pointer; }

/* 扫码后的活动详情（线下推广落地页） */
.mp-coupon .act-page { position: absolute; inset: 0; background: #f5f6f8; z-index: 18; display: flex; flex-direction: column; }
.mp-coupon .act-banner { position: relative; height: 168px; flex-shrink: 0; }
.mp-coupon .act-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-coupon .act-banner .act-cover { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 17px; font-weight: 600; }
.mp-coupon .act-banner .act-mask { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, 0) 46%); }
.mp-coupon .act-body { flex: 1; overflow-y: auto; padding: 0 12px 16px; margin-top: -22px; position: relative; }
.mp-coupon .act-card { background: #fff; border-radius: 10px; padding: 12px; }
.mp-coupon .act-title { font-size: 16px; font-weight: 700; color: #333; }
.mp-coupon .act-tag { display: inline-block; font-size: 10px; color: #f5222d; border: 1px solid #ffccc7; border-radius: 3px; padding: 0 4px; margin-left: 6px; vertical-align: 2px; }
.mp-coupon .act-sum { font-size: 12px; color: #666; line-height: 1.7; margin-top: 8px; }
.mp-coupon .act-time { font-size: 11px; color: #999; margin-top: 8px; }
.mp-coupon .act-section { background: #fff; border-radius: 10px; padding: 12px; margin-top: 10px; }
.mp-coupon .act-section h4 { font-size: 13px; color: #333; margin: 0 0 8px; }
.mp-coupon .act-coupon { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #f0f0f0; }
.mp-coupon .act-coupon:last-child { border-bottom: none; }
.mp-coupon .act-coupon .ac-amt { width: 66px; flex-shrink: 0; color: #f5222d; font-size: 15px; font-weight: 700; }
.mp-coupon .act-coupon .ac-amt i { font-size: 10px; font-style: normal; font-weight: 400; }
.mp-coupon .act-coupon .ac-name { font-size: 12px; color: #333; font-weight: 600; }
.mp-coupon .act-coupon .ac-desc { font-size: 10px; color: #999; margin-top: 2px; }
.mp-coupon .act-pics { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.mp-coupon .act-pics img { width: 108px; height: 76px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.mp-coupon .act-proj { font-size: 12px; color: #666; line-height: 2; }
.mp-coupon .act-foot { flex-shrink: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #f0f0f0; }
.mp-coupon .act-btn {
    display: block; width: 100%; border: none; border-radius: 22px; padding: 11px 0;
    font-size: 15px; font-weight: 600; color: #fff; background: linear-gradient(90deg, #ff7875, #f5222d); cursor: pointer;
}
.mp-coupon .act-btn.gray { background: #d9d9d9; color: #fff; cursor: default; }
.mp-coupon .act-fail {
    position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 30;
    background: rgba(0, 0, 0, .82); color: #fff; font-size: 13px; line-height: 1.6;
    padding: 14px 18px; border-radius: 8px; max-width: 78%; text-align: center;
}
