/* =====================================================================
   代理品牌展示（v2.3，横版店招已下线）
   代理品牌位（图标+店铺名） / 首字图形 / 我的品牌页
   依赖 tokens.css 的 --color-* 变量，必须在 tokens.css 之后加载
   ===================================================================== */

/* ---- 代理品牌位：店铺Logo + 店铺名（页头/页脚统一形态，无图标退回首字图形） ---- */
.brand-agent {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 260px;
}

.brand-agent__icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
}

.brand-agent__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-agent__name {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 1px;
    color: var(--color-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 页脚品牌位：图标随 logo 高度走，名字稍大 */
.footer-brand .brand-agent__icon {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
}

.footer-brand .brand-agent__name {
    font-size: 24px;
}

/* 窄屏：图标和店铺名同步缩小，避免挤压搜索区 */
@media (max-width: 992px) {
    .brand-agent { gap: 8px; max-width: 170px; }
    .brand-agent__icon { flex-basis: 32px; width: 32px; height: 32px; border-radius: 8px; }
    .brand-agent__name { font-size: 18px; letter-spacing: 0; }
    .footer-brand .brand-agent__icon { flex-basis: 36px; width: 36px; height: 36px; }
    .footer-brand .brand-agent__name { font-size: 19px; }
}

/* ---- 移动端顶栏品牌位：店铺图标 + 店铺名 ----
   PC 顶栏不显示（PC 有自己的 .logo-wrapper 品牌位）；
   ≤992px 由 mobile.css 打开，与 .top-mobile-logo 同步显隐。
   整条限宽 + 店名省略号：店名再长也不能把右侧搜索/签到/菜单图标挤出去。
   注意：display:none 必须放 min-width 里 —— 页面若重复引入本文件（曾出现在 shop.html、
   user/brand.html），同级选择器按源序覆盖，会盖掉 mobile.css 的 display:inline-flex，
   表现就是移动端顶栏头像/店名整块消失。 */
.top-mobile-brand {
    align-items: center;
    gap: 6px;
    min-width: 0;
    /* 162px = 图标 24 + 间距 6 + 8 字店名 × 16px（字号见 __name），
       保证最长店名也能完整显示，同时不把右侧图标挤出顶栏 */
    max-width: 162px;
}

@media (min-width: 993px) {
    .top-mobile-brand {
        display: none;
    }

    /* PC 顶栏品牌位定宽：平台 logo 197px、代理店名 2~8 字宽度不等，
       不定宽会把右侧「数字产品即买即用」和竖分隔线推来推去。
       250px = 图标 44 + 间距 10 + 8 字店名(22px×8 + 字距 8) 的极限宽度。 */
    .logo-wrapper .logo-container {
        flex: 0 0 250px;
        width: 250px;
        min-width: 0;
    }

    /* 店铺名超长时在容器内省略，不再顶开平台标语 */
    .logo-wrapper .logo-container > a {
        display: inline-flex;
        align-items: center;
        max-width: 100%;
    }

    .logo-wrapper .brand-agent {
        max-width: 100%;
    }
}

.top-mobile-brand__icon {
    display: flex;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    overflow: hidden;
}

.top-mobile-brand__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 首字图形复用 .brand-mark 的底色，但 24px 小方框里要同步缩小字号/圆角 */
.top-mobile-brand .brand-mark {
    border-radius: 6px;
    font-size: 12px;
}

.top-mobile-brand__name {
    min-width: 0;
    /* 顶栏品牌名是移动端唯一的店铺标识，比正文大一档（14→16px），
       与 24px 图标搭配；再大就会挤压右侧搜索/签到/菜单一组图标 */
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    /* 与 PC 品牌位同色（品牌红），保证同一店铺在两端口径一致 */
    color: var(--color-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- 首字图形：无图标时的兜底（纯 CSS，不生成图片） ---- */
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
    user-select: none;
}

.bc-0 { background: #d8373e; }
.bc-1 { background: #3f7d6a; }
.bc-2 { background: #3f6da8; }
.bc-3 { background: #8a5bb8; }
.bc-4 { background: #c07a2e; }
.bc-5 { background: #4a5568; }

/* ---- 协议确认：提示文字勾选，规则名称独立打开全文 ---- */
.brand-agree {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.6;
}

.brand-agree .ck-box {
    cursor: pointer;
    margin-top: 2px;
}

.brand-agree__text label { cursor: pointer; }
.brand-rules-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--color-primary);
    font: inherit;
    cursor: pointer;
    text-align: left;
}
.brand-rules-link:hover { text-decoration: underline; }

/* 覆盖 commission.css 的 ".wf-tip span{color:primary;font-weight:600}"，保持提示文字为灰色常规字重 */
.wf-tip .brand-agree__text {
    color: var(--cm-text-3);
    font-weight: 400;
    cursor: default;
}

/* ---- 我的品牌页 ---- */










.brand-field {
    margin-bottom: 14px;
}

.brand-field label {
    display: block;
    font-size: 13px;
    color: var(--color-text-secondary, #666);
    margin-bottom: 6px;
}

.brand-field input[type="text"],
.brand-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid var(--color-border, #e5e5e5);
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-text-body, #333);
    outline: none;
}

.brand-field input[type="text"]:focus,
.brand-field textarea:focus {
    border-color: var(--color-primary);
}

.brand-field__hint {
    font-size: 12px;
    color: var(--color-text-tertiary, #999);
    margin-top: 5px;
}

.brand-candidates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.brand-candidate {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px dashed var(--color-primary-border, rgba(216, 55, 62, .3));
    background: #fff;
    color: var(--color-primary);
    font-size: 13px;
    cursor: pointer;
}

.brand-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.brand-status--on { background: #eef8f2; color: #237a4c; }
.brand-status--off { background: #f4f4f5; color: #71717a; }
.brand-status--pending { background: #fff7e6; color: #a86b00; }

/* ---- 店铺页 ---- */
/* 店铺页顶部不再单独放店铺信息卡：店名与图标由页头品牌位承担，
   页面直接从商品列表开始，避免同一屏出现两次店名。 */
.shop-owner-tip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--color-primary-bg, #fef5f5);
    border: 1px solid var(--color-primary-border, rgba(216, 55, 62, .18));
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--color-text-body, #333);
}

.shop-platform-note {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fafafa;
    font-size: 12px;
    color: var(--color-text-secondary, #666);
    line-height: 1.8;
}

/* ====================== 悬停微调 ====================== */
/* points.css 的 .task-item:hover（#fafafa）会经品牌页引入的 points.css 波及本页内容块，
   推广赚钱页没有这个效果，这里对齐去掉；用 .brand-main 限定，不影响积分页 */
.brand-main .task-item:hover {
    background: transparent;
}
/* tab 悬停同理，只保留文字变红 */
.user-tab-item:hover,
.user-tab-item.active:hover {
    background: transparent;
}

/* ====================== 店铺资料 tab：协议+提交按钮沉底 ====================== */
/* 左侧菜单把内容区撑高后表单显得短，协议与按钮悬在中间；
   brand-main（即 user-main，被 .user-content 行拉伸为菜单等高）纵向 flex，
   #tab-shop 与表单卡片逐级 flex:1 撑满，协议行 margin-top:auto 沉底。
   注意 #tab-shop 的 display:flex 依赖 brand.js 用 is-hidden 类切换显隐 */
.brand-main {
    display: flex;
    flex-direction: column;
}

.brand-main #brand-shop-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* is-hidden 隐藏态必须压过上面的 ID 选择器 flex（优先级 1-2-0 > 1-1-0），
   否则切到「申请记录」tab 时店铺资料表单不会被隐藏 */
.brand-main #brand-shop-content.is-hidden {
    display: none;
}

/* 只读展示 + 申请修改：已有店铺时表单默认收起，点「申请修改」再展开 */
.brand-main #brand-form-card.is-hidden {
    display: none;
}

.brand-main .withdraw-form-card {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.brand-main .withdraw-form-card .wf-tip--bottom {
    margin-top: auto;
}

/* ====================== 申请记录：复用反馈列表(cm-table/cm-row/status-badge)组件体系 ====================== */
/* 列模板：店铺名/状态/提交时间/说明/操作（表头与数据行同步覆盖，padding 对齐反馈页做法） */
.brand-main .order-table-header .order-table-header-inner,
.brand-main .brand-table .cm-row {
    grid-template-columns: 1.1fr 0.8fr 1.3fr 1.8fr 0.7fr;
    padding-left: 8px;
    padding-right: 8px;
}
/* 对齐反馈列表：整行居中，店铺名与"说明"两列左对齐（长文本易读） */
.brand-main .brand-table .cm-row > div {
    text-align: center;
}
.brand-main .brand-table .cm-row > .brand-cell-name,
.brand-main .brand-table .cm-row > .brand-cell-reason {
    text-align: left;
}
.brand-cell-name {
    font-weight: var(--font-weight-medium);
    color: var(--cm-text);
}
.brand-cell-reason {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-cell-none {
    color: #ccc;
}

/* 展开面板：初始隐藏（user.css 的 is-hidden 规则只作用于 .user-tab-content，这里单独定义） */
.brand-app-log-panel.is-hidden {
    display: none;
}
.brand-app-log-panel {
    margin: 0 8px 10px;
    padding: 10px 14px;
    background: #fafafa;
    border-radius: 8px;
}

/* 「动态」展开/收起链接（PC 行与移动端卡片共用） */
.brand-app-log-toggle {
    color: var(--color-primary, #D8373E);
    font-size: 12px;
    cursor: pointer;
}
.brand-app-log-toggle .brand-app-log-arrow {
    display: inline-block;
    margin-left: 3px;
    transition: transform 0.15s ease;
}
.brand-app-log-toggle.is-open .brand-app-log-arrow {
    transform: rotate(180deg);
}

/* ---------- 申请进度时间线（纵向时间轴：状态色图标 + 虚线连接 + 名称左/时间右） ---------- */
/* 面板：白底细边框卡片（替代原灰底大色块） */
.brand-app-log-panel {
    margin: 0 8px 10px;
    padding: 12px 16px 10px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
}

/* 标题栏：品牌红竖条 + 时钟图标 + 标题 + 条数 */
.brand-tl-head-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
    color: #333;
}
.brand-tl-head-bar::before {
    content: "";
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--color-primary);
}
.brand-tl-head-bar .fa-regular {
    color: #999;
    font-size: 13px;
}
.brand-tl-count {
    font-size: 12px;
    font-weight: var(--font-weight-regular);
    color: #999;
}

/* 节点行：按动作着浅色底，高度紧凑（约 52px） */
.brand-tl-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0;
    padding: 9px 14px;
    min-height: 52px;
    box-sizing: border-box;
    border-radius: 8px;
}
/* 连接线：相邻节点间穿过图标列中心的虚线（首个节点不画） */
.brand-tl-item:not(:first-child)::before {
    content: "";
    position: absolute;
    left: 26px;
    top: -12px;
    height: 12px;
    border-left: 1px dashed #d9d9d9;
}
.brand-tl-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 12px;
}
/* 状态配色：提交=蓝 / 通过与恢复=绿 / 拒绝=红 / 撤回与下架=灰（图标底+节点浅底同系） */
.brand-tl-blue .brand-tl-icon { background: #e3f2fd; color: #1565c0; }
.brand-tl-blue { background: #f5f9ff; }
.brand-tl-green .brand-tl-icon { background: #e8f5e9; color: #2e7d32; }
.brand-tl-green { background: #f6fbf5; }
.brand-tl-red .brand-tl-icon { background: #FCEBEB; color: #A32D2D; }
.brand-tl-red { background: #fdf6f6; }
.brand-tl-gray .brand-tl-icon { background: #f0f0f0; color: #757575; }
.brand-tl-gray { background: #f8f8f8; }

/* 左侧：动作名称 + 操作人 */
.brand-tl-main {
    flex: 1;
    min-width: 0;
}
.brand-tl-name {
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
    color: #333;
    line-height: 1.4;
}
.brand-tl-operator {
    margin-top: 2px;
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}
/* 右侧：时间（精确到秒）+ 描述，右对齐 */
.brand-tl-side {
    flex-shrink: 0;
    text-align: right;
    max-width: 45%;
}
.brand-tl-time {
    font-size: 12px;
    color: #999;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}
.brand-tl-remark {
    margin-top: 2px;
    font-size: 12px;
    color: #b3b3b3;
    line-height: 1.4;
    word-break: break-all;
}

/* ---------- 移动端卡片（对齐 feedback.css 的 .fb-card 做法：PC 隐藏，≤768px 二选一） ---------- */
.brand-card {
    display: none;
}

@media (max-width: 768px) {
    /* 隐藏 PC 表头与表格行，改由卡片承载（.brand-app-item 保留，展开面板继续可用） */
    .brand-main .order-table-header,
    .brand-main .brand-table .cm-row {
        display: none !important;
    }

    .brand-card {
        display: flex;
        flex-direction: column;
        gap: 6px;
        /* 项目无全局 border-box 重置，必须显式声明避免左右 padding 撑出容器 */
        box-sizing: border-box;
        width: 100%;
        margin-bottom: 10px;
        padding: 14px 16px;
        background: var(--cm-card);
        border-radius: var(--radius-xl);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    /* 头部：店铺名(左) + 状态徽标(右) */
    .brand-card-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .brand-card-title {
        flex: 1;
        min-width: 0;
        font-size: 15px;
        font-weight: var(--font-weight-semibold);
        color: var(--cm-text);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .brand-card-head .status-badge {
        flex-shrink: 0;
        padding: 2px 8px;
        font-size: 11px;
        font-weight: var(--font-weight-regular);
        border-radius: 10px;
    }

    /* 说明：固定 2 行高度，超出省略 */
    .brand-card-content {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: break-all;
        font-size: 13px;
        line-height: 1.5;
        color: var(--cm-text-2);
    }

    /* 底行：时间靠左(带时钟图标) + 动态入口靠右 */
    .brand-card-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .brand-card-time {
        font-size: 12px;
        color: var(--cm-text-3);
        white-space: nowrap;
        padding-left: 14px;
        position: relative;
    }
    .brand-card-time::before {
        content: "\f017";
        font-family: "Font Awesome 6 Free";
        font-weight: var(--font-weight-regular);
        font-size: 10px;
        color: var(--color-text-tertiary);
        position: absolute;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
    }
    .brand-card-foot .brand-app-log-toggle {
        flex-shrink: 0;
    }
}

/* ====================== 空状态：还没有店铺 ====================== */
/* 首次进入不直接摊开表单，先给插画 + 三步说明，点按钮才进入填写 */
.brand-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 34px;
    background: #fff;
    border: 1px solid #f2f2f2;
    border-radius: 14px;
}

.brand-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--color-primary-icon-bg);
    color: var(--color-primary);
    font-size: 36px;
}

/* 点「填写店铺资料」后引导收起，把位置让给表单 */
.brand-empty.is-hidden {
    display: none;
}

.brand-empty__title {
    margin: 16px 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #20232a;
}

.brand-empty__desc {
    margin: 0;
    font-size: 13px;
    color: #7a7a7a;
    line-height: 1.6;
    text-align: center;
}

.brand-empty__notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--color-primary-icon-bg);
    color: #b8403f;
    font-size: 12px;
    line-height: 1.4;
}

.brand-empty__btn {
    margin-top: 20px;
    padding: 11px 46px;
    border: 0;
    border-radius: 8px;
    background: var(--color-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.brand-empty__btn:hover {
    background: var(--color-primary-brand-button-hover);
}

/* 三步流程：填写资料 → 平台审核 → 店铺生效 */
.brand-empty__steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 420px;
    margin-top: 30px;
}

.brand-step {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.brand-step__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary-icon-bg);
    color: var(--color-primary);
    font-size: 15px;
}

.brand-step__label {
    font-size: 12px;
    color: #6b6b6b;
}

.brand-step__arrow {
    margin-top: 14px;
    color: #d6d6d6;
    font-size: 12px;
}

/* ====================== 填写表单 ====================== */
/* 表单卡片撑满剩余高度，协议与按钮靠 .wf-tip--bottom{margin-top:auto} 沉到卡片底部，
   这是 withdraw-form-card 的原生行为，不要再用 flex/ margin 覆盖它 */

.brand-req {
    color: var(--color-error);
}

.brand-optional {
    color: #a0a0a0;
    font-weight: 400;
}

/* 店铺名称下方的承接范围提示：左边界与输入框对齐（.wf-row label 固定 80px），
   负 margin-top 抵消 .wf-row 的 14px 下边距，让它贴住输入框像字段说明 */
.brand-name-note {
    margin: -6px 0 16px;
    padding-left: 80px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

/* 上传区与操作按钮均复用反馈表单：
   .fb-upload / .fb-upload-scroll / .fb-img-count / .fb-thumbs
   .fb-actions + .action-btn(.primary / .btn-cancel)
   品牌页不再自定义上传框与按钮样式，避免与 feedback.css 两套并存 */

/* ====================== 店铺资料：左「当前店铺」+ 右「最近一次申请」 ====================== */
.brand-panels {
    display: grid;
    /* 单列上下结构：上方「当前店铺」横条 + 下方「最近一次申请」整宽面板。
       原来 1fr 1fr 两栏时，左卡高度被右卡内容强行拉伸（grid 默认 align-items: stretch），
       再叠加 .brand-panel__actions 的 margin-top:auto，中间必然留出一大块空白。
       拆成上下两块后，各自高度只由自己内容决定。 */
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* 点「申请修改 / 填写店铺资料」后两栏面板收起，把整屏让给表单 */
.brand-panels.is-hidden {
    display: none;
}

.brand-panel {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 20px 22px 18px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
}

.brand-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
}

.brand-panel__title {
    font-size: 15px;
    font-weight: 700;
    color: #20232a;
}

.brand-panel__hint {
    font-size: 12px;
    color: #a6a6a6;
    text-align: right;
    line-height: 1.4;
}

.brand-panel__desc {
    margin: 12px 0 0;
    font-size: 13px;
    color: #6b6b6b;
    line-height: 1.7;
}

/* 按钮区靠 margin-top:auto 沉到卡片底部 */
.brand-panel__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 20px;
}

.brand-panel__empty {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px 0;
    color: #b3b3b3;
    font-size: 13px;
}

.brand-panel__empty i {
    font-size: 22px;
}

/* ---- 当前店铺摘要条：图标 + 店名 + 状态 + 右侧操作 ----
   替代原来的左卡片。横向一条，高度恒为 16+56+16 = 88px，
   不再随右侧「最近一次申请」的内容多少变化。
   视觉口径与 .brand-panel 保持一致（白底 / #f0f0f0 边 / 12px 圆角）。 */
.brand-empty__actions { display: flex; align-items: center; justify-content: center; gap: 10px; }
.brand-bar__empty .brand-more { margin-left: auto; }
.brand-more { position: relative; }
.brand-more__toggle { display: inline-flex; align-items: center; gap: 8px; }
.brand-more__menu[hidden] { display: none; }
.brand-more__menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 150px; padding: 6px; border: 1px solid var(--color-border-light); border-radius: var(--radius-md); box-shadow: 0 6px 20px rgba(0,0,0,.1); background: var(--color-bg-card); z-index: 20; }
.brand-more__menu > a, .brand-more__menu > button { display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; padding: 10px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--color-text-secondary); font: inherit; font-size: 13px; text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; }
.brand-more__menu > a:hover, .brand-more__menu > button:hover { background: var(--color-primary-bg); }
.brand-more__menu > .brand-more__danger { color: var(--color-primary); border-top: 1px solid var(--color-border-light); }
.brand-more__menu > .brand-more__platform { display: none; }
.brand-records-layer { border-radius: var(--radius-md); overflow: hidden; }
/* 仅记录区负责滚动，避免 Layer 的内容区因高度取整产生额外滚动条。 */
.brand-records-layer .layui-layer-content { height: auto !important; overflow: hidden; }
/* 预留标题栏及弹窗上下间距，小窗口中仍可滚动查看完整记录。 */
.brand-records-content { box-sizing: border-box; max-height: calc(100vh - 90px); overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
.brand-records-content .task-item { margin: 0; padding: 0; }
@media (max-width: 600px) {
    .brand-records-content .brand-tl-item { flex-wrap: wrap; }
    .brand-records-content .brand-tl-side { width: 100%; padding-left: 34px; text-align: left; }
}

.brand-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    box-sizing: border-box;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
}

.brand-bar__icon {
    display: flex;
    flex: 0 0 56px;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: #2b2f3a;
    color: #fff;
}

.brand-bar__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-bar__letter {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}

/* 信息区必须能收缩（min-width:0）：否则长店名会把右侧按钮挤出容器 */
/* 两行文字（店名行 + meta）整体与左侧 56px 图标垂直居中：min-height 兜住图标高度，
   行数变化时不会偏心 */
.brand-bar__info {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 56px;
}

.brand-bar__name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.brand-bar__name {
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #20232a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-bar__meta {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #a6a6a6;
}

/* 按钮组不参与收缩：宁可店名省略，也不让按钮折成竖排 */
.brand-bar__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.brand-bar__empty {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #b3b3b3;
}

.brand-bar__empty i {
    font-size: 16px;
}

/* ---- 按钮体系：口径与全站 .action-btn（积分「去绑定」）完全对齐 ----
   30px 高 / 8px 圆角 / 12px·500 / 内边距 6px 12px / 最小宽 60px / 主色实红描边。
   桌面与移动共用这一套，media query 里不再重复覆盖。 */
.brand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    min-width: 60px;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: none;
    font-size: var(--font-size-label);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.brand-btn--primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-bg-card);
}

.brand-btn--primary:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.brand-btn--outline {
    background: var(--color-bg-card);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.brand-btn--outline:hover {
    background: var(--color-primary-bg);
}

/* 「下架 / 撤回申请」是纯文字次级动作：不占最小宽，避免和无文字红框并排时抢焦点 */
.brand-btn--text {
    min-width: 0;
    padding: 6px 2px;
    color: var(--color-text-secondary);
}

.brand-btn--text:hover {
    color: var(--color-primary);
}

/* ---- 状态条：审核中 / 审核通过 / 审核未通过 / 已撤回 ---- */
.brand-banner--withdrawn { background: #f4f4f5; color: #71717a; }

.brand-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.brand-banner--pending {
    background: #fdf3e2;
    color: #a86b00;
}

.brand-banner--success {
    background: #e9f7ef;
    color: #1e874b;
}

.brand-banner--danger {
    background: #fdecec;
    color: #c0392b;
}

/* ---- 审核流程：纵向三点 ---- */
.brand-flow {
    margin-top: 16px;
}

.brand-flow__item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 18px;
}

.brand-flow__item:last-child {
    padding-bottom: 0;
}

.brand-flow__dot {
    box-sizing: border-box;
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    margin-top: 3px;
    border: 2px solid #dcdcdc;
    border-radius: 50%;
    background: #fff;
    position: relative;
    z-index: 1;
}

.brand-flow__item--active .brand-flow__dot {
    border-color: var(--color-primary);
    background: var(--color-primary);
}

/* 节点间连线：正对圆点中心 */
.brand-flow__item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 17px;
    bottom: 0;
    width: 1px;
    background: #ededed;
}

.brand-flow__body {
    flex: 1;
    min-width: 0;
}

.brand-flow__title {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

.brand-flow__sub {
    margin-top: 3px;
    font-size: 12px;
    color: #a6a6a6;
    line-height: 1.4;
}

.brand-flow__side {
    flex-shrink: 0;
    font-size: 12px;
    color: #a6a6a6;
}

/* ---- 审核意见 ---- */
.brand-note {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    background: #fafafa;
    font-size: 12px;
    color: #666;
    line-height: 1.7;
    word-break: break-all;
}

/* 空状态里的次要按钮（撤回申请） */
.brand-empty__btn--ghost {
    background: #fff;
    border: 1px solid var(--color-primary-outline);
    color: var(--color-primary);
}

.brand-empty__btn--ghost:hover {
    background: var(--color-primary-icon-bg);
}

@media (max-width: 768px) {
    /* 单列已是基础层默认（.brand-panels 只有一列），这里不再重复声明 */

    .brand-panel {
        padding: 16px;
    }

    /* 更多在名称行右侧，主要操作在摘要下方。 */
    .brand-bar {
        position: relative;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
    }

    .brand-bar__icon {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }

    .brand-bar__letter {
        font-size: 20px;
    }

    .brand-bar__name {
        font-size: 15px;
    }

    /* 操作行整行通栏并靠右对齐：主操作贴近右手拇指，同时与右上「更多」形成同侧视觉轴 */
    .brand-bar__actions {
        flex: 1 0 100%;
        order: 3;
        justify-content: flex-end;
    }

    .brand-bar__name-row {
        padding-right: 64px;
        min-height: 30px;
    }

    /* 「更多」吸在店名行右侧：卡片上内边距 14 + 信息区 2px 上偏移 = 16（去掉「当前店铺」kicker 后同步上移） */
    .brand-bar__actions > .brand-more {
        position: absolute;
        top: 16px;
        right: 16px;
    }

    .brand-bar__actions .brand-more__toggle {
        min-width: 0;
        padding: 6px 10px;
    }

    .brand-bar__actions .brand-more__toggle > i {
        display: none;
    }

    .brand-bar__platform {
        display: none;
    }

    .brand-more__menu > .brand-more__platform {
        display: flex;
    }

    .brand-panel__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .brand-panel__hint {
        text-align: left;
    }

    /* 按钮尺寸/配色已在基础层统一成 .action-btn 口径，这里不再重复覆盖 */

    /* 窄屏提示改整行通栏：80px 标签缩进会把这段长句挤成细长条 */
    .brand-name-note {
        margin: -4px 0 14px;
        padding-left: 0;
    }
}
.brand-file-upload { position: relative; cursor: pointer; }
.brand-file-upload input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#brand-icon-thumbs .fb-thumb img { object-fit: contain; }

/* 店铺主题选择，仅生效店铺可编辑。 */
.brand-theme-settings { position: relative; padding: 16px 20px; margin: 0; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-bg-card); }
.brand-theme-settings p { margin: 8px 0 16px; color: var(--color-text-secondary); }
.brand-theme-settings select:not([hidden]) { min-height: 40px; max-width: 100%; margin: 0 12px 12px; padding: 6px 12px; border: 1px solid var(--color-border-input); border-radius: var(--radius-sm); background: var(--color-bg-card); color: var(--color-text-body); }
#brand-theme-message { display: inline-block; margin: 8px; }

/* 紧凑主题下拉与店铺预览 */
.brand-theme-settings { display: grid; grid-template-columns: auto 160px auto minmax(0, 1fr); grid-template-areas: "title field save preview"; align-items: center; gap: 0 12px; }
.brand-theme-settings > h3 { grid-area: title; margin: 0 12px 0 0; font-size: 14px; font-weight: 600; line-height: 1.5; }
.brand-theme-field { grid-area: field; min-width: 0; display: flex; align-items: center; }
.brand-theme-dropdown { position: relative; width: 100%; min-width: 0; }
/* 这一行的高度口径与店铺条按钮（推广邀请 / 查看店铺）保持一致：
   统一交给 .brand-btn 的 30px，不再单独拔高到 36px。 */
.brand-theme-settings > .brand-btn,
.brand-theme-dropdown summary { box-sizing: border-box; }
.brand-theme-dropdown summary { position: relative; display: flex; align-items: center; box-sizing: border-box; min-height: 30px; padding: 0 34px 0 12px; border: 1px solid var(--color-primary); border-radius: var(--radius-md); background: var(--color-bg-card); color: var(--color-primary); font-size: var(--font-size-label); font-weight: var(--font-weight-medium); line-height: 1; cursor: pointer; list-style: none; transition: background-color 0.2s; }
.brand-theme-dropdown summary:hover { background: var(--color-primary-bg); }
.brand-theme-dropdown summary::-webkit-details-marker { display: none; }
.brand-theme-dropdown summary::after { content: ''; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; box-sizing: border-box; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.brand-theme-dropdown[open] summary { outline: 1px solid var(--color-primary); }
.brand-theme-dropdown[open] summary::after { transform: translateY(-30%) rotate(225deg); }
#brand-theme-current { display: flex; align-items: center; gap: 8px; }
#brand-theme-current::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--theme-dot); }
.brand-theme-options { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; width: 100%; padding: 6px 0; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg-card); box-shadow: 0 8px 24px #0002; }
.brand-theme-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 18px; border: 0; background: transparent; color: var(--color-text-body); font: inherit; text-align: left; cursor: pointer; }
.brand-theme-option:hover, .brand-theme-option[aria-pressed="true"] { background: var(--color-bg-page, #f1f5fa); }
.brand-theme-option[aria-pressed="true"]::after { content: '✓'; margin-left: auto; color: var(--color-primary); }
.brand-theme-dot { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }
.brand-theme-settings > .brand-btn { grid-area: save; white-space: nowrap; }
.brand-theme-preview { grid-area: preview; justify-self: end; min-width: 0; max-width: 100%; box-sizing: border-box; margin-left: 12px; border-left: 1px solid var(--color-border); padding-left: 24px; }
.brand-theme-preview-card { display: flex; align-items: center; gap: 12px; }
.brand-theme-preview-card img { flex: 0 0 48px; width: 48px; height: 48px; object-fit: contain; border-radius: 10px; }
.brand-theme-preview-card div { min-width: 0; }
.brand-theme-preview-label { display: block; color: var(--color-text-secondary); margin-bottom: 2px; font-size: 12px; line-height: 1.5; }
.brand-theme-preview-card strong { display: block; font-size: 20px; line-height: 1.4; overflow-wrap: anywhere; }
#brand-theme-message:empty { display: none; }
#brand-theme-message { grid-column: 1 / -1; margin: 12px 0 0; overflow-wrap: anywhere; }
/* 窄屏将预览独立成行，配色选择与保存操作保持并排。 */
@media (max-width: 768px) {
    .brand-theme-settings { padding: 16px; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title title" "field save" "preview preview"; gap: 12px; }
    .brand-theme-settings > h3 { margin: 0; }
    .brand-theme-preview { justify-self: stretch; max-width: none; margin: 4px 0 0; border-left: 0; border-top: 1px solid var(--color-border); padding: 12px 0 0; }
    .brand-theme-preview-card img { flex-basis: 40px; width: 40px; height: 40px; border-radius: 8px; }
    .brand-theme-preview-card strong { font-size: 16px; }
    #brand-theme-message { margin: 0; }
}
