/* ==========================================================================
   PMC SaaS 后台样式表(替代 colors_and_type.css)
   设计系统:ad- 前缀类名 + CSS 变量
   ========================================================================== */

:root {
    /* 主色调 */
    --pmc-primary-700: #134e8f;
    --pmc-primary-600: #1a6fc4;
    --pmc-primary-500: #2585e0;
    --pmc-primary-50:  #e8f1fc;

    /* 功能色 */
    --pmc-success:   #16a34a;
    --pmc-warning:   #f59e0b;
    --pmc-danger:    #dc2626;
    --pmc-info:      #3b82f6;

    /* 中性色 */
    --pmc-foreground: #1f2937;
    --pmc-neutral-900: #111827;
    --pmc-neutral-700: #374151;
    --pmc-neutral-500: #6b7280;
    --pmc-neutral-400: #9ca3af;
    --pmc-neutral-300: #d1d5db;
    --pmc-neutral-200: #e5e7eb;
    --pmc-neutral-100: #f3f4f6;
    --pmc-neutral-50:  #f9fafb;

    /* 语义色 */
    --pmc-bg:      #F2F6FC;
    --pmc-card-bg: #ffffff;
    --pmc-border:  #e5e7eb;
    --pmc-input:   #d1d5db;
    --pmc-side-bg: #001529;

    /* 圆角 */
    --pmc-radius-small: 2px;
    --pmc-radius:       4px;
    --pmc-radius-lg:    8px;

    /* 字体 */
    --pmc-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --pmc-font-mono: "SF Mono", "Consolas", "Liberation Mono", "Courier New", monospace;

    /* 尺寸 */
    --pmc-side-width: 200px;
    --pmc-side-collapsed-width: 64px;
    --pmc-header-height: 50px;
}

/* ==========================================================================
   全局重置
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* 关键：彻底干掉页面级的滚动条 */
}

body {
    font-family: var(--pmc-font-sans);
    font-size: 14px;
    color: var(--pmc-foreground);
    background: var(--pmc-bg);
    line-height: 1.5;
}

/* ====== 整个布局外壳 + 右侧内容区  禁止横向溢出，把滚动限制在表格wrap内 ====== */
.ad-layout, .ad-body, .ad-topbar {
    overflow-x: hidden;
    max-width: 100vw;
    box-sizing: border-box;
}

a { color: var(--pmc-primary-600); text-decoration: none; }
a:hover { color: var(--pmc-primary-500); }

ul, ol { list-style: none; }

/* ==========================================================================
   布局
   ========================================================================== */
/* ========================================================
   ⚠️  FLEX 布局宽度防撑开「铁律」（横向滚动条的核心修复）
   flex:1 / display:flex 列容器的子项 必须 min-width:0，
   否则会被子元素（宽表格）撑破整个页面，导致出现外层滚动条，
   而表格容器内反而不出现滚动条。
   ======================================================== */
.ad-layout { display: flex; height: 100vh; min-width: 100vw; max-width: 100vw; overflow: hidden; box-sizing: border-box; }

.ad-side {
    width: var(--pmc-side-width);
    background: var(--pmc-side-bg);
    border-right: 1px solid var(--pmc-border);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
}

.ad-body {
    flex: 1;
    margin-left: var(--pmc-side-width);
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* 关键：让 flex:1 自动接管宽度，不要用固定的 width calc，否则折叠侧边栏时宽度不会自适应 */
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box;
}

.ad-header, .ad-topbar {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box;
}

/* ===== 标签页导航 ===== */
.ad-tabs {
    background: #ffffff;
    padding: 6px 16px;
    flex-shrink: 0;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ad-tabs-list {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    min-width: 0;
}
.ad-tabs-list::-webkit-scrollbar {
    display: none;
}
/* 关闭全部标签按钮（固定在最右侧） */
.ad-tabs-close-all {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #909399;
    cursor: pointer;
    border: 1px solid #dcdfe6;
    border-radius: 3px;
    background: #ffffff;
    transition: color .15s, background .15s, border-color .15s;
}
.ad-tabs-close-all:hover {
    color: #ffffff;
    background: #FB5E27;
    border-color: #FB5E27;
}
.ad-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #ffffff;
    border: 1px solid #dcdfe6;
    border-radius: 3px;
    font-size: 12px;
    line-height: 16px;
    color: #606266;
    cursor: pointer;
    flex-shrink: 0;
    max-width: 120px;
    white-space: nowrap;
    height: 22px;
    box-sizing: border-box;
}
.ad-tab:hover {
    border-color: #409EFF;
    color: #409EFF;
}
.ad-tab:hover .ad-tab-icon {
    color: #409EFF;
}
.ad-tab.active {
    border-color: #409EFF;
    color: #409EFF;
    font-weight: 500;
}
.ad-tab.active .ad-tab-icon {
    color: #409EFF;
}
.ad-tab .ad-tab-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}
.ad-tab .ad-tab-title {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}
.ad-tab.active .ad-tab-title {
    max-width: 90px;
}
.ad-tab .ad-tab-close {
    width: 12px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: 0.4;
    flex-shrink: 0;
    font-size: 9px;
    line-height: 1;
}
.ad-tab:hover .ad-tab-close,
.ad-tab.active .ad-tab-close {
    opacity: 0.5;
}
.ad-tab .ad-tab-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 2px;
}
.ad-tab.home-tab .ad-tab-close {
    display: none;
}

/* ===== 内容区 ===== */
.ad-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
    position: relative;
}

/* ===== 列表页布局 ===== */

/* 表格容器：横向可滚动 */
.ad-content .ad-table-wrap {
    overflow-x: auto !important;
    overflow-y: visible !important;
}
/* 非固定列页面：给 card-body 加左右 padding + 底部留白（与 L287 保持一致） */
.ad-content .ad-card:not(:has(.ad-table-outer-wrap)) .ad-card-body.no-pad {
    padding: 0 16px 12px 16px !important;
}
/* 非固定列页面：表格左右加竖线（所有没有 outer-wrap 的页面都需要） */
.ad-content .ad-card:not(:has(.ad-table-outer-wrap)) .ad-table-wrap {
    border-left: 1px solid #eceff3;
    border-right: 1px solid #eceff3;
}
/* 普通页面专属：没有 outer-wrap、没有 partner-table、没有横向滚动轨道，
   ad-table-wrap 需要自己画 border-top / border-bottom 封口 */
.ad-content .ad-card:not(:has(.ad-table-outer-wrap)):not(:has(.partner-table)) .ad-table-wrap {
    border-top: 1px solid #eceff3;
    border-bottom: 1px solid #eceff3;
}
/* partner-table 路线专属：border-bottom 交给轨道 border-top 封口，
   普通页面（码牌管理、用户列表等）没有横向轨道，需要 ad-table-wrap 自己画底线 */
.ad-content .ad-card:not(:has(.ad-table-outer-wrap)):has(.partner-table) .ad-table-wrap {
    border-bottom: 0;
}
/* partner-table 空态：无横向轨道（或轨道隐藏）时，ad-table-wrap 自己补底线封口 */
.ad-content .ad-card:not(:has(.ad-table-outer-wrap)):has(.partner-table) .ad-table-wrap:has(.ad-empty) {
    border-bottom: 1px solid #eceff3;
}
/* 固定列页面：外层容器左右各留 16px 间距（表格和盖布层一起缩进）+ 左右包边
   border-bottom 交给 ad-table-wrap 和 .ad-hscroll-track 分别承担（与 partner-table 路线对齐） */
.ad-content .ad-card:has(.ad-table-outer-wrap) .ad-table-outer-wrap {
    margin: 0 16px;
    border-left: 1px solid #eceff3;
    border-right: 1px solid #eceff3;
}

/* 卡片 + 卡片body 基础样式 */
.ad-card {
    background: var(--pmc-card-bg);
    margin-bottom: 16px;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
    overflow: hidden !important;
}
.ad-card-body { padding: 16px; min-width: 0 !important; max-width: 100% !important; width: 100% !important; box-sizing: border-box; overflow: hidden !important; }

/* 商家/商家分类页面：允许横向溢出到ad-table-wrap滚动（无ad-table-outer-wrap的页面） */
.ad-content .ad-card:not(:has(.ad-table-outer-wrap)) {
    overflow: visible !important;
}
.ad-content .ad-card:not(:has(.ad-table-outer-wrap)) .ad-card-body,
.ad-content .ad-card:not(:has(.ad-table-outer-wrap)) .ad-card-body.no-pad {
    overflow: visible !important;
}

.ad-logo {
    height: var(--pmc-header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
}
.ad-logo-img {
    width: 100%;
    max-width: 160px;
    height: auto;
    max-height: 40px;
    object-fit: contain;
}
.ad-logo-text { font-size: 15px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-align: center; line-height: 1.3; }
.ad-layout.collapsed .ad-logo .ad-logo-text.ad-logo-collapsed { font-size: 16px; max-width: 40px; }

/* 折叠/展开时的 logo 切换 */
.ad-logo-collapsed { display: none; }
.ad-logo-expanded { display: block; }
.ad-layout.collapsed .ad-logo-expanded { display: none; }
.ad-layout.collapsed .ad-logo-collapsed { display: block; }
.ad-layout.collapsed .ad-logo .ad-logo-collapsed {
    max-width: 40px;
}

/* ==========================================================================
   侧边栏导航
   ========================================================================== */
.ad-nav { padding: 8px 0; }

.ad-nav-item {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 40px;
    color: #B8C7CE;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s;
    gap: 10px;
}
.ad-nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ad-nav-item.active { color: #fff; }

.ad-nav-icon { display: inline-block; width: 16px; height: 16px; flex-shrink: 0; }

.ad-nav-item .ad-nav-arrow {
    display: inline-block;
    margin-left: auto;
    width: 14px; height: 14px;
    opacity: .4;
    transition: transform .2s, opacity .15s;
    flex-shrink: 0;
}
.ad-nav-item:hover .ad-nav-arrow { opacity: .7; }
.ad-nav-parent.open .ad-nav-arrow { transform: rotate(90deg); opacity: .8; }
.ad-nav-parent.active .ad-nav-arrow { transform: rotate(90deg); opacity: .8; }
/* 叶子菜单(无子菜单)激活时箭头也向下 */
.ad-nav-item.active:not(.ad-nav-parent) .ad-nav-arrow { transform: rotate(90deg); opacity: .8; }

.ad-nav-sub { overflow: hidden; display: none; background: #2C3B41; }
.ad-nav-parent.open + .ad-nav-sub { display: block; }
.ad-nav-sub .ad-nav-item { padding-left: 46px; font-size: 13px; height: 36px; color: #B8C7CE; }
.ad-nav-sub .ad-nav-item.active { color: #FFFFFF !important; }

/* ==========================================================================
   侧边栏折叠状态
   ========================================================================== */
.ad-layout.collapsed .ad-side {
    width: var(--pmc-side-collapsed-width);
    transition: width 0.25s ease;
}

.ad-layout.collapsed .ad-body {
    margin-left: var(--pmc-side-collapsed-width);
    transition: margin-left 0.25s ease;
}

.ad-layout.collapsed .ad-logo {
    padding: 0 8px;
}

.ad-layout.collapsed .ad-logo-img {
    max-width: 40px;
}

.ad-layout.collapsed .ad-nav-item span,
.ad-layout.collapsed .ad-nav-item .ad-nav-arrow {
    display: none;
}

.ad-layout.collapsed .ad-nav-item {
    justify-content: center;
    padding: 0;
    height: 48px;
}

.ad-layout.collapsed .ad-nav-parent.open + .ad-nav-sub {
    display: none;
}

.ad-layout.collapsed .ad-nav-item .ad-nav-icon {
    width: 20px;
    height: 20px;
}

/* 折叠时tooltip提示 */
.ad-layout.collapsed .ad-nav-item {
    position: relative;
}

.ad-layout.collapsed .ad-nav-item:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* 侧边栏正常状态过渡 */
.ad-side, .ad-body {
    transition: width 0.25s ease, margin-left 0.25s ease;
}

/* 折叠态：有子菜单的一级菜单项不再显示 tooltip（改由右侧浮层显示二级菜单） */
.ad-layout.collapsed .ad-nav-parent:hover::after {
    content: none;
}

/* ==========================================================================
   折叠态二级菜单浮层（悬停图标时在侧边栏右侧弹出）
   ========================================================================== */
.ad-nav-popover {
    position: fixed;
    z-index: 2100;
    min-width: 150px;
    max-width: 240px;
    max-height: 80vh;
    overflow-y: auto;
    background: #001529;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-2px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    -webkit-transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
/* 桥接区：覆盖侧边栏与浮层之间的 gap，防止鼠标穿越时 hover 断裂 */
.ad-nav-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: -2px;
    width: 2px;
    background: transparent;
    pointer-events: auto;
}
.ad-nav-popover.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}
.ad-nav-popover .ad-pop-item {
    display: block;
    padding: 0 16px;
    height: 36px;
    line-height: 36px;
    color: #B8C7CE;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.ad-nav-popover .ad-pop-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.ad-nav-popover .ad-pop-item.active {
    color: #FFFFFF;
    background: rgba(64, 158, 255, 0.18);
}
/* 蓝色侧栏主题 */
.ad-nav-popover.theme-blue {
    background: #409EFF;
    border-color: rgba(255, 255, 255, 0.2);
}
.ad-nav-popover.theme-blue .ad-pop-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.ad-nav-popover.theme-blue .ad-pop-item.active {
    color: #fff;
    background: rgba(0, 0, 0, 0.14);
}
/* 白色侧栏主题 */
.ad-nav-popover.theme-white {
    background: #ffffff;
    border-color: #dcdfe6;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.ad-nav-popover.theme-white .ad-pop-item {
    color: #374151;
}
.ad-nav-popover.theme-white .ad-pop-item:hover {
    background: #f0f2f5;
    color: #374151;
}
.ad-nav-popover.theme-white .ad-pop-item.active {
    color: #409EFF;
    background: #ecf5ff;
}

/* ==========================================================================
   商家分步向导
   ========================================================================== */
.ad-wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 40px 16px;
    background: #f7f8fa;
    border-bottom: 1px solid #e5e7eb;
}
.ad-wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.ad-wizard-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #909399;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}
.ad-wizard-step-label {
    font-size: 13px;
    color: #909399;
    transition: color 0.3s;
}
.ad-wizard-step.active .ad-wizard-step-num {
    background: #409EFF;
    color: #fff;
}
.ad-wizard-step.active .ad-wizard-step-label {
    color: #409EFF;
    font-weight: 600;
}
.ad-wizard-step.done .ad-wizard-step-num {
    background: #67C23A;
    color: #fff;
}
.ad-wizard-step.done .ad-wizard-step-label {
    color: #67C23A;
}
.ad-wizard-step-line {
    width: 60px;
    height: 2px;
    background: #e5e7eb;
    margin: 0 8px;
    margin-bottom: 22px;
}

/* ==========================================================================
   审核弹窗：只读详情展示
   ========================================================================== */
.ad-view-header-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px 20px;
    background: #f7f8fa;
    border-bottom: 1px solid #eef1f5;
    margin: 12px 32px 0;
    border-radius: 6px 6px 0 0;
}
.ad-view-header-info { flex: 1; min-width: 0; }
.ad-view-header-tags {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.ad-view-row {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dashed #f0f2f5;
    gap: 12px;
    font-size: 13px;
    line-height: 1.6;
}
.ad-view-row:last-child { border-bottom: none; }
.ad-view-row-2 {
    display: grid;
    grid-template-columns: 120px 1fr 120px 1fr;
    gap: 10px 16px;
    align-items: flex-start;
}
.ad-view-label {
    color: #909399;
    min-width: 110px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 4px;
}
.ad-view-row.ad-view-row-2 .ad-view-label { min-width: 120px; }
.ad-view-row .ad-view-value {
    color: #303133;
    flex: 1;
    word-break: break-all;
    min-width: 0;
}

.ad-view-row-images {
    align-items: flex-start;
    padding: 12px 0;
}

.ad-view-img-wrap {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 100%;
}
.ad-view-img-thumb {
    width: 112px !important;
    height: 84px !important;
    min-width: 112px;
    max-width: 112px;
    max-height: 84px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden !important;
    cursor: pointer;
    background: #f5f7fa;
    position: relative;
    transition: box-shadow 0.2s;
    flex: 0 0 auto;
}
.ad-view-img-thumb:hover { box-shadow: 0 2px 10px rgba(64,158,255,0.3); }
.ad-view-img-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    object-fit: cover;
    display: block;
}
.ad-view-img-thumb .ad-view-img-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    padding: 2px 4px;
    text-align: center;
}

.ad-view-shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 100px);
    gap: 12px;
}

.ad-view-idcard-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ad-view-idcard-item {
    width: 200px;
    height: 126px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: #f5f7fa;
    position: relative;
    transition: box-shadow 0.2s;
}
.ad-view-idcard-item:hover { box-shadow: 0 2px 10px rgba(64,158,255,0.3); }
.ad-view-idcard-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ad-view-idcard-item .ad-view-img-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    padding: 2px 4px;
    text-align: center;
}

/* 图片单元格（店铺信息 tab4） */
.ad-view-img-cell {
    width: 160px;
    height: 120px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: #f5f7fa;
    position: relative;
    display: inline-block;
}
.ad-view-img-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ad-view-img-cell .ad-view-img-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    padding: 2px 4px;
    text-align: center;
}

.ad-view-shop-grid .ad-view-img-thumb {
    width: 112px !important;
    height: 84px !important;
    min-width: 112px;
    max-width: 112px;
    max-height: 84px;
}

/* 门店图片上传网格 */
.ad-img-upload-grid {
    display: grid;
    grid-template-columns: repeat(4, 100px);
    gap: 12px;
}
.ad-img-upload-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}
.ad-img-upload-btn {
    width: 88px;
    height: 88px;
    border: 1px dashed #dcdfe6;
    border-radius: 4px;
    background: #fafafa;
    color: #8c939d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.ad-img-upload-btn:hover {
    border-color: #409EFF;
    color: #409EFF;
}
.ad-img-upload-preview {
    width: 88px;
    height: 88px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
.ad-img-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ad-img-upload-del {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.ad-img-upload-del:hover {
    background: rgba(255,0,0,0.8);
}
.ad-img-upload-label {
    font-size: 12px;
    color: #606266;
    white-space: nowrap;
}

/* 身份证上传组 */
.ad-idcard-upload-group {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}
.ad-idcard-upload-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.ad-idcard-upload-preview {
    width: 140px;
    height: 88px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
.ad-idcard-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ad-idcard-upload-item .ad-img-upload-btn {
    width: 140px;
    height: 88px;
}

/* 营业执照上传(兼容旧版) */
.ad-license-preview {
    position: relative;
    display: inline-block;
    margin-top: 8px;
}

/* ==========================================================================
   头部
   ========================================================================== */
.ad-header {
    height: var(--pmc-header-height);
    background: #fff;
    border-bottom: 1px solid var(--pmc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    flex-shrink: 0;
    z-index: 99;
}
.ad-header-left { display: flex; align-items: center; gap: 12px; }
.ad-header-right { display: flex; align-items: center; gap: 16px; }

.ad-header-divider {
    width: 1px;
    height: 18px;
    background: #e5e7eb;
    flex-shrink: 0;
}
.ad-refresh {
    width: 30px; height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8c8c8c;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.ad-refresh:hover {
    background: #f5f8ff;
    color: #1578FE;
}
.ad-crumb {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-size: 13px;
    min-width: 0;
}
.ad-crumb-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(0,0,0,0.65);
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.15s;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
a.ad-crumb-item:hover { color: #1578FE; }
.ad-crumb-item.current {
    color: rgba(0,0,0,0.88);
    font-weight: 500;
}
.ad-crumb-home { color: rgba(0,0,0,0.65); }
.ad-crumb-sep {
    color: #d1d5db;
    margin: 0 2px;
    user-select: none;
    flex-shrink: 0;
}

.ad-header-toggle {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
    position: relative;
}
.ad-header-toggle:hover { background: #f5f8ff; }
.ad-toggle-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    position: absolute;
    transition: opacity 0.2s;
}
.ad-toggle-expand { opacity: 1; }
.ad-toggle-collapsed { opacity: 0; }
.ad-layout.collapsed .ad-toggle-expand { opacity: 0; }
.ad-layout.collapsed .ad-toggle-collapsed { opacity: 1; }
.ad-header-link { font-size: 13px; color: var(--pmc-neutral-500); display: inline-flex; align-items: center; gap: 4px; }
.ad-header-link:hover { color: var(--pmc-primary-600); }
.ad-header-icon { width: 16px; height: 16px; object-fit: contain; }

/* 顶部背景色为 #001529 (black) 时，顶栏文字/图标统一为 #6b7280 */
.ad-header.theme-header-black,
.ad-header.theme-header-black .ad-crumb,
.ad-header.theme-header-black .ad-crumb-item,
.ad-header.theme-header-black .ad-crumb-item.current,
.ad-header.theme-header-black .ad-crumb-home,
.ad-header.theme-header-black .ad-crumb-sep,
.ad-header.theme-header-black .ad-refresh,
.ad-header.theme-header-black .ad-header-link,
.ad-header.theme-header-black .ad-user,
.ad-header.theme-header-black .ad-icon-btn,
.ad-header.theme-header-black .ad-icon-img,
.ad-header.theme-header-black svg,
.ad-header.theme-header-black svg * {
  color: #6b7280 !important;
  stroke: #6b7280;
  fill: none;
}
.ad-header.theme-header-black .ad-crumb-item { color: #6b7280 !important; }
.ad-header.theme-header-black .ad-crumb-item.current { color: #6b7280 !important; }
.ad-header.theme-header-black .ad-refresh { color: #6b7280 !important; }
.ad-header.theme-header-black .ad-header-link { color: #6b7280 !important; }
.ad-header.theme-header-black .ad-user { color: #6b7280 !important; }
.ad-header.theme-header-black .ad-icon-btn { color: #6b7280 !important; }
/* 链接 hover 时保持与浅色模式一致的主色高亮，不覆盖 */
.ad-header.theme-header-black a.ad-crumb-item:hover,
.ad-header.theme-header-black .ad-header-link:hover {
  color: var(--pmc-primary-600) !important;
}
.ad-header.theme-header-black .ad-refresh:hover {
  background: rgba(255,255,255,0.05);
  color: var(--pmc-primary-600) !important;
}
.ad-header.theme-header-black .ad-user span,
.ad-header.theme-header-black .ad-user span:nth-child(2),
.ad-header.theme-header-black .ad-user-wrap,
.ad-header.theme-header-black .ad-user-wrap span {
  color: #6b7280 !important;
}

/* 顶部背景色为 #1890FF (blue) 时，顶栏文字/图标统一为 #6b7280 */
.ad-header.theme-header-blue,
.ad-header.theme-header-blue .ad-crumb,
.ad-header.theme-header-blue .ad-crumb-item,
.ad-header.theme-header-blue .ad-crumb-item.current,
.ad-header.theme-header-blue .ad-crumb-home,
.ad-header.theme-header-blue .ad-crumb-sep,
.ad-header.theme-header-blue .ad-refresh,
.ad-header.theme-header-blue .ad-header-link,
.ad-header.theme-header-blue .ad-user,
.ad-header.theme-header-blue .ad-icon-btn,
.ad-header.theme-header-blue .ad-icon-img,
.ad-header.theme-header-blue svg,
.ad-header.theme-header-blue svg * {
  color: #6b7280 !important;
  stroke: #6b7280;
  fill: none;
}
.ad-header.theme-header-blue .ad-crumb-item { color: #6b7280 !important; }
.ad-header.theme-header-blue .ad-crumb-item.current { color: #6b7280 !important; }
.ad-header.theme-header-blue .ad-refresh { color: #6b7280 !important; }
.ad-header.theme-header-blue .ad-header-link { color: #6b7280 !important; }
.ad-header.theme-header-blue .ad-user { color: #6b7280 !important; }
.ad-header.theme-header-blue .ad-icon-btn { color: #6b7280 !important; }
.ad-header.theme-header-blue .ad-user span,
.ad-header.theme-header-blue .ad-user span:nth-child(2),
.ad-header.theme-header-blue .ad-user-wrap,
.ad-header.theme-header-blue .ad-user-wrap span {
  color: #6b7280 !important;
}
.ad-header.theme-header-blue a.ad-crumb-item:hover,
.ad-header.theme-header-blue .ad-header-link:hover {
  color: var(--pmc-primary-600) !important;
}
.ad-header.theme-header-blue .ad-refresh:hover {
  background: rgba(255,255,255,0.15);
  color: var(--pmc-primary-600) !important;
}

/* 侧栏背景色为蓝色 (#1890FF) 时，二级菜单背景改为 #8CC5FF */
.ad-side.theme-side-blue .ad-nav-sub,
.ad-side.theme-side-blue > .ad-nav .ad-nav-sub {
  background: #8CC5FF !important;
}
/* 侧栏背景色为白色 (#FFFFFF) 时，二级菜单背景改为 #D9D9D9 */
.ad-side.theme-side-white .ad-nav-sub,
.ad-side.theme-side-white > .ad-nav .ad-nav-sub {
  background: #D9D9D9 !important;
}
/* 白色侧栏：一级菜单（位于 .ad-nav-sub 之外）图标+文字颜色统一为 #374151（含 active 态） */
.ad-side.theme-side-white .ad-nav-item:not(.ad-nav-sub .ad-nav-item),
.ad-side.theme-side-white .ad-nav-item:not(.ad-nav-sub .ad-nav-item) span,
.ad-side.theme-side-white .ad-nav-item:not(.ad-nav-sub .ad-nav-item) .ad-nav-icon,
.ad-side.theme-side-white .ad-nav-item:not(.ad-nav-sub .ad-nav-item) .ad-nav-arrow,
.ad-side.theme-side-white .ad-nav-item:not(.ad-nav-sub .ad-nav-item) svg,
.ad-side.theme-side-white .ad-nav-item:not(.ad-nav-sub .ad-nav-item).active,
.ad-side.theme-side-white .ad-nav-item:not(.ad-nav-sub .ad-nav-item).active span,
.ad-side.theme-side-white .ad-nav-item:not(.ad-nav-sub .ad-nav-item).active .ad-nav-icon,
.ad-side.theme-side-white .ad-nav-item:not(.ad-nav-sub .ad-nav-item).active .ad-nav-arrow,
.ad-side.theme-side-white .ad-nav-item:not(.ad-nav-sub .ad-nav-item).active svg {
  color: #374151 !important;
  stroke: #374151;
}

.ad-icon-btn {
    display: inline-block;
    width: 20px; height: 20px;
    cursor: pointer;
    color: var(--pmc-neutral-500);
}
.ad-icon-btn:hover { color: var(--pmc-primary-600); }
.ad-icon-img {
    width: 16px !important;
    height: 16px !important;
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.2s;
    display: inline-block;
    vertical-align: middle;
}
.ad-icon-img:hover { opacity: 0.75; }

.ad-user {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.18s;
    position: relative;
    z-index: 1;
}
.ad-user-wrap.open .ad-user { background: transparent; }
.ad-user-wrap.open .ad-user-caret { transform: rotate(180deg); color: #1578FE; }

.ad-user-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0;
    border-radius: 6px;
    transition: background 0.18s;
}
.ad-user-wrap:hover { background: #f5f7fa; }
.ad-user-wrap.open { background: #f0f4ff; }
.ad-user-menu {
    position: fixed;
    top: calc(100% + 8px);
    right: 0;
    min-width: 150px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 6px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transform-origin: top right;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.ad-user-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.ad-user-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 40px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0,0,0,0.04);
}
.ad-user-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-radius: 4px;
    margin-bottom: 2px;
}
.ad-user-menu-item:last-child { margin-bottom: 0; }
.ad-user-menu-item:hover {
    background: #e6f4ff;
    color: #1890ff;
}
.ad-user-menu-item:hover .ad-um-icon { color: #1890ff; }
.ad-um-icon {
    color: #6b7280;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.ad-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--pmc-primary-600);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
img.ad-avatar {
    object-fit: contain;
    background: transparent;
}

.ad-user span:nth-child(2) {
    font-size: 12px;
    font-weight: 400;
    color: #666666;
}

/* ==========================================================================
   Toast 提示
   ========================================================================== */
.ad-toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10100; /* 高于签署弹窗(#dsSignMask z-index:10000)，保证错误提示在最顶层 */
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ad-toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    font-size: 14px;
    color: var(--pmc-foreground);
    animation: toastIn 0.3s ease;
    min-width: 200px;
}
.ad-toast.success { border-left: 4px solid #409EFF; }
.ad-toast.error { border-left: 4px solid #409EFF; }
.ad-toast.warning { border-left: 4px solid var(--pmc-warning); }
.ad-toast.info { border-left: 4px solid var(--pmc-info); }
.ad-toast-icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}
.ad-toast.success .ad-toast-icon { color: #409EFF; }
.ad-toast.error .ad-toast-icon { color: #409EFF; }
.ad-toast.warning .ad-toast-icon { color: var(--pmc-warning); }
.ad-toast.info .ad-toast-icon { color: var(--pmc-info); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Modal 弹窗
   ========================================================================== */
/* ==========================================================================
   Modal 弹窗（新版标准结构：<div class="ad-modal-mask"> → 内部 <div class="ad-modal">
   ========================================================================== */
.ad-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    animation: overlayFadeIn 0.2s ease;
    /* 左侧: 侧边栏宽度(200px展开/64px折叠) + 24px安全距离，跟随菜单折叠/展开自动调节；右侧: 24px边距 */
    padding: 0 24px 0 calc(var(--pmc-side-width) + 24px);
    box-sizing: border-box;
}
/* 菜单折叠: 侧边栏宽度变窄，弹窗随内容区自动居中左移 */
.ad-layout.collapsed ~ * .ad-modal-mask,
body:has(.ad-layout.collapsed) .ad-modal-mask {
    padding-left: calc(var(--pmc-side-collapsed-width) + 24px);
}
/* 窄屏(窗口宽度<1200px, 如笔记本/平板): 左右对称24px,避免整体右移后溢出 */
@media (max-width: 1199px) {
    .ad-modal-mask,
    body:has(.ad-layout.collapsed) .ad-modal-mask { padding: 0 24px; }
}
.ad-modal {
    background: #fff;
    border-radius: 10px;
    min-width: 360px;
    max-width: 100%;           /* 跟随父 mask flex 计算出的可用宽度 */
    max-height: 88vh;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
    animation: modalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    margin: auto;
    position: relative;
    box-sizing: border-box;
}
.ad-modal-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 24px 14px;
    border-bottom: 1px solid #f0f0f0;
}
.ad-modal-title,
.ad-modal-header span:first-child {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    line-height: 1.4;
}
.ad-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 22px;
    cursor: pointer;
    color: #94a3b8;
    line-height: 1;
    transition: all 0.15s;
    text-decoration: none;
}
.ad-modal-close:hover { color: #111827; background: #f3f4f6; }
.ad-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
}
.ad-modal-body::-webkit-scrollbar { width: 6px; }
.ad-modal-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.ad-modal-body::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
.ad-modal-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 14px 24px 18px;
    border-top: 1px solid #f0f0f0;
    background: #fafbfc;
}
/* 当 <form> 作为 .ad-modal 直接子元素、包裹 body + footer 时：承接 flex 链，确保 body 独立滚动、footer 不被弹窗 max-height 截断 */
.ad-modal > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    margin: 0;
}
/* 2 列表单栅格 */
.ad-form-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.ad-form-row > .ad-form-item { flex: 1 1 0; min-width: 0; }
.ad-input, .ad-select, textarea.ad-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 1.5;
    height: 36px;
    font-family: inherit;
}
textarea.ad-input { height: auto; min-height: 64px; resize: vertical; }
.ad-input:focus, .ad-select:focus, textarea.ad-input:focus {
    outline: none;
    border-color: #1578FE;
    box-shadow: 0 0 0 3px rgba(21, 120, 254, 0.10);
}
.ad-input::placeholder, textarea.ad-input::placeholder { color: #9ca3af; font-size: 13px; }
.ad-control { width: 100%; min-width: 0; }

/* 弹窗宽度档位（在模板里 style="width:xxx" 加 ad-modal 上即可，CSS 默认 min-width 360；常见档位补类） */
.ad-modal.size-s { width: 420px; }      /* 小:≤3 字段，如 重置密码 */
.ad-modal.size-m { width: 560px; }      /* 中:4~6 字段 2 列短 */
.ad-modal.size-l { width: 640px; }      /* 大:7~10 字段 2 列长 + 整行 */
.ad-modal.size-xl { width: 760px; }     /* 特大:10+ 字段，或长文本多 */
.ad-modal.size-xxl { width: 1000px; }   /* 超大:审核预览/多图展示 */
.ad-modal.size-table { width: 880px; }  /* 内嵌表格:管理员列表等 */

/* 向下兼容旧版结构（旧 ad-modal-overlay / ad-modal-dialog 等） */
.ad-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    animation: overlayFadeIn 0.2s ease;
    /* 与新版弹窗一致：跟随菜单折叠/展开自动调节左侧距离 */
    padding: 0 24px 0 calc(var(--pmc-side-width) + 24px);
    box-sizing: border-box;
}
/* 菜单折叠: 跟随内容区自动左移 */
.ad-layout.collapsed ~ * .ad-modal-overlay,
body:has(.ad-layout.collapsed) .ad-modal-overlay {
    padding-left: calc(var(--pmc-side-collapsed-width) + 24px);
}
@media (max-width: 1199px) {
    .ad-modal-overlay,
    body:has(.ad-layout.collapsed) .ad-modal-overlay { padding: 0 24px; }
}
/* 紧凑确认弹窗（参考图：顶部标题 + 横向图标文字按钮行，方形边角） */
.ad-modal.ad-modal-confirm {
    border-radius: 0 !important;
    min-width: 400px;
    max-width: 480px;
    padding: 0 !important;
    flex-direction: column !important;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12) !important;
    max-height: none !important;
    background: #fff;
    overflow: hidden;
    margin: auto !important;
}
.ad-modal-confirm-header {
    flex-shrink: 0;
    padding: 16px 22px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    line-height: 1.4;
    border-bottom: 1px solid #f0f0f0 !important;
    background: #fff !important;
    text-align: left !important;
}
.ad-modal-confirm-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    padding: 18px 22px 8px 22px !important;
    gap: 14px !important;
    background: #fff !important;
}
.ad-modal-confirm-icon {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    background: transparent !important;
    background-image: url('/static/admin/img/sys_jigngao.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center 1px !important;
    border-radius: 0 !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0;
    flex-shrink: 0;
    margin-top: 0;
    text-indent: -9999px;
    overflow: hidden;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.ad-modal-confirm-text {
    flex: 1 !important;
    min-width: 0;
    font-size: 14px !important;
    color: #333333 !important;
    line-height: 1.6 !important;
    text-align: left !important;
    padding: 0 0 0 0 !important;
    margin-left: -4px !important;
    border: 0 !important;
    background: transparent !important;
}
.ad-modal-confirm-footer {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0;
    padding: 8px 22px 18px 22px !important;
    border: 0 !important;
    background: #fff !important;
}
.ad-modal-confirm-footer .ad-modal-btn {
    min-width: 64px !important;
    height: 34px !important;
    padding: 0 18px !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    line-height: 1 !important;
}
.ad-modal-confirm-footer .ad-modal-btn.cancel { background: #fff !important; border-color: #dcdfe6 !important; color: #333333 !important; }
.ad-modal-confirm-footer .ad-modal-btn.cancel:hover { border-color: #1578FE !important; color: #1578FE !important; }
.ad-modal-confirm-footer .ad-modal-btn.confirm { background: #1578FE !important; color: #fff !important; border-color: #1578FE !important; }
.ad-modal-confirm-footer .ad-modal-btn.confirm:hover { background: #1068e0 !important; border-color: #1068e0 !important; }
.ad-modal-confirm-footer .ad-modal-btn.confirm.danger { background: #1578FE !important; border-color: #1578FE !important; }
.ad-modal-confirm-footer .ad-modal-btn.confirm.danger:hover { background: #1068e0 !important; border-color: #1068e0 !important; }
.ad-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 10px;
    width: 520px;
    max-width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
}
.ad-modal-btn {
    min-width: 80px;
    padding: 8px 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    height: 36px;
    line-height: 22px;
}
.ad-modal-btn.cancel { background: #fff; border-color: #d9d9d9; color: #333333; }
.ad-modal-btn.cancel:hover { border-color: #1578FE; color: #1578FE; }
.ad-modal-btn.confirm { background: #1578FE; color: #fff; border-color: #1578FE; }
.ad-modal-btn.confirm:hover { background: #3b8ffe; border-color: #3b8ffe; }
.ad-modal-btn.confirm.danger { background: #1578FE; border-color: #1578FE; }
.ad-modal-btn.confirm.danger:hover { background: #3b8ffe; border-color: #3b8ffe; }

/* ==========================================================================
   表单
   ========================================================================== */
.ad-form-item { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.ad-label {
    font-size: 13px;
    color: var(--pmc-neutral-500);
    white-space: nowrap;
}
.ad-label.required::before { content: "* "; color: var(--pmc-danger); }

.ad-control { display: flex; align-items: center; gap: 8px; }
.ad-control > .ad-input, .ad-control > .ad-select { flex: none; width: 100%; min-width: 0; }
.ad-control .ad-input-group { flex: 0 0 auto; }
.ad-control .ad-input-group > .ad-input { flex: 1 1 auto; min-width: 0; width: auto; }
.ad-control .ad-hint { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ad-input, .ad-select {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--pmc-input);
    border-radius: var(--pmc-radius-small);
    font-size: 14px;
    color: var(--pmc-foreground);
    background: #fff;
    outline: none;
    transition: border-color .15s;
    font-family: var(--pmc-font-sans);
}
.ad-input:focus, .ad-select:focus { border-color: var(--pmc-primary-500); }
.ad-input::placeholder { color: var(--pmc-neutral-400); }

/* 下拉选择框：去掉原生箭头，换成自定义箭头，精确控制与右边框间距 */
.ad-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("/static/admin/img/chevron-down.png");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px;
    cursor: pointer;
}
.ad-select::-ms-expand { display: none; }

/* ==========================================================================
   自定义下拉组件（替代原生 select，精确控制悬停/选中颜色）
   ========================================================================== */
.ad-custom-select {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    outline: none;
}
.ad-custom-select:focus-visible .ad-custom-select-trigger {
    border-color: #409EFF;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, .2);
}
.ad-custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #606266;
    box-sizing: border-box;
    user-select: none;
    transition: border-color .2s;
}
.ad-custom-select-trigger:hover { border-color: #c0c4cc; }
.ad-custom-select.open .ad-custom-select-trigger {
    border-color: #409EFF;
}
.ad-custom-select-trigger-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ad-custom-select-trigger-arrow {
    position: relative;
    flex: none;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    opacity: .6;
    transition: opacity .2s;
}
.ad-custom-select-trigger-arrow::before,
.ad-custom-select-trigger-arrow::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform .25s cubic-bezier(.4,.0,.2,1), opacity .2s cubic-bezier(.4,.0,.2,1);
}
/* 关闭状态：chevron-down 可见，chevron-up 隐藏 */
.ad-custom-select-trigger-arrow::before {
    background-image: url('/static/admin/img/chevron-down.png');
    opacity: 1;
    transform: rotate(0deg);
}
.ad-custom-select-trigger-arrow::after {
    background-image: url('/static/admin/img/chevron-up.png');
    opacity: 0;
    transform: rotate(90deg);
}
/* 打开状态：chevron-down 淡出旋转 90°，chevron-up 淡入旋转归位 */
.ad-custom-select.open .ad-custom-select-trigger-arrow {
    opacity: 1;
}
.ad-custom-select.open .ad-custom-select-trigger-arrow::before {
    opacity: 0;
    transform: rotate(-90deg);
}
.ad-custom-select.open .ad-custom-select-trigger-arrow::after {
    opacity: 1;
    transform: rotate(0deg);
}
.ad-custom-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
    z-index: 9999;
}
.ad-custom-select.open .ad-custom-select-options { display: block; }
.ad-custom-select-option {
    padding: 0 12px;
    height: 34px;
    line-height: 34px;
    font-size: 14px;
    color: #606266;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ad-custom-select-option:hover {
    background-color: #409EFF;
    color: #fff;
}
.ad-custom-select-option.selected {
    /* 和原生 select 一致：打开后选中项本身就高亮 */
    background-color: #409EFF;
    color: #fff;
}
.ad-custom-select-option.active-hover {
    /* 键盘上下键移动时的高亮（同鼠标 hover 颜色） */
    background-color: #409EFF;
    color: #fff;
}

/* 下拉面板在弹窗内展开时传送至 body：fixed 定位，避免被弹窗 .ad-modal-body 的 overflow 裁切 */
.ad-select-portal {
    position: fixed;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 10001;
    display: block;
    box-sizing: border-box;
    padding: 0;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
    /* 选项超出可用高度时面板内部滚动，任何选项都滚得到、选得到 */
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #c3cad6 transparent;
}
.ad-select-portal::-webkit-scrollbar { width: 8px; height: 8px; }
.ad-select-portal::-webkit-scrollbar-track { background: transparent; }
.ad-select-portal::-webkit-scrollbar-thumb {
    background: #c3cad6;
    border-radius: 6px;
    border: 2px solid #fff;
}
.ad-select-portal::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.ad-input-group { display: flex; align-items: center; }

.ad-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    cursor: pointer;
}
.ad-checkbox input { width: 14px; height: 14px; }

/* ==========================================================================
   按钮
   ========================================================================== */
.ad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    padding: 0 16px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: #fff;
    color: #606266;
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    font-family: var(--pmc-font-sans);
}
.ad-btn:hover {
    border-color: #409EFF;
    color: #409EFF;
    background-color: #fff;
}
.ad-btn:hover [data-lucide],
.ad-btn:hover svg {
    color: #409EFF !important;
    stroke: #409EFF !important;
}
.ad-btn.ad-btn-reset,
a.ad-btn.ad-btn-reset {
    background: #fff;
    border: 1px solid #dcdfe6;
    color: #606266;
}
.ad-btn.ad-btn-reset:hover,
a.ad-btn.ad-btn-reset:hover {
    border-color: #409EFF !important;
    color: #409EFF !important;
}
.ad-btn.ad-btn-reset:hover [data-lucide],
a.ad-btn.ad-btn-reset:hover [data-lucide],
.ad-btn.ad-btn-reset:hover svg,
a.ad-btn.ad-btn-reset:hover svg {
    color: #409EFF !important;
    stroke: #409EFF !important;
}

/* 新增按钮：白底 + 灰框 + 灰字（默认），hover 保持全局蓝色统一 */
.ad-btn.ad-btn-add,
a.ad-btn.ad-btn-add,
button.ad-btn.ad-btn-add {
    background: #fff !important;
    border: 1px solid #dcdfe6 !important;
    color: #606266 !important;
}
.ad-btn.ad-btn-add [data-lucide],
a.ad-btn.ad-btn-add [data-lucide],
button.ad-btn.ad-btn-add [data-lucide],
.ad-btn.ad-btn-add svg,
a.ad-btn.ad-btn-add svg,
button.ad-btn.ad-btn-add svg {
    color: #606266 !important;
    stroke: #606266 !important;
}
/* hover：沿用全局蓝 hover（边框/文字/图标 #409EFF）—— 如需单独覆盖再加 */
.ad-btn.ad-btn-add:hover,
a.ad-btn.ad-btn-add:hover,
button.ad-btn.ad-btn-add:hover {
    border-color: #409EFF !important;
    color: #409EFF !important;
    background: #fff !important;
}
.ad-btn.ad-btn-add:hover [data-lucide],
a.ad-btn.ad-btn-add:hover [data-lucide],
button.ad-btn.ad-btn-add:hover [data-lucide],
.ad-btn.ad-btn-add:hover svg,
a.ad-btn.ad-btn-add:hover svg,
button.ad-btn.ad-btn-add:hover svg {
    color: #409EFF !important;
    stroke: #409EFF !important;
}

/* 搜索按钮 hover：图标/文字保持白色（和底色不变） */
.ad-btn.ad-btn-search,
a.ad-btn.ad-btn-search,
button.ad-btn.ad-btn-search {
    background: #409EFF !important;
    border-color: #409EFF !important;
    color: #fff !important;
}
.ad-btn.ad-btn-search [data-lucide],
a.ad-btn.ad-btn-search [data-lucide],
button.ad-btn.ad-btn-search [data-lucide],
.ad-btn.ad-btn-search svg,
a.ad-btn.ad-btn-search svg,
button.ad-btn.ad-btn-search svg {
    color: #fff !important;
    stroke: #fff !important;
}
.ad-btn.ad-btn-search:hover,
a.ad-btn.ad-btn-search:hover,
button.ad-btn.ad-btn-search:hover {
    background: #409EFF !important;
    border-color: #409EFF !important;
    color: #fff !important;
}
.ad-btn.ad-btn-search:hover [data-lucide],
a.ad-btn.ad-btn-search:hover [data-lucide],
button.ad-btn.ad-btn-search:hover [data-lucide],
.ad-btn.ad-btn-search:hover svg,
a.ad-btn.ad-btn-search:hover svg,
button.ad-btn.ad-btn-search:hover svg {
    color: #fff !important;
    stroke: #fff !important;
}

/* 删除按钮 hover：图标/文字保持白色（和底色不变） */
.ad-btn.ad-btn-delete,
a.ad-btn.ad-btn-delete,
button.ad-btn.ad-btn-delete {
    background: #FB5E27 !important;
    border-color: #FB5E27 !important;
    color: #fff !important;
}
.ad-btn.ad-btn-delete [data-lucide],
a.ad-btn.ad-btn-delete [data-lucide],
button.ad-btn.ad-btn-delete [data-lucide],
.ad-btn.ad-btn-delete svg,
a.ad-btn.ad-btn-delete svg,
button.ad-btn.ad-btn-delete svg {
    color: #fff !important;
    stroke: #fff !important;
}
.ad-btn.ad-btn-delete:hover,
a.ad-btn.ad-btn-delete:hover,
button.ad-btn.ad-btn-delete:hover {
    background: #FB5E27 !important;
    border-color: #FB5E27 !important;
    color: #fff !important;
}
.ad-btn.ad-btn-delete:hover [data-lucide],
a.ad-btn.ad-btn-delete:hover [data-lucide],
button.ad-btn.ad-btn-delete:hover [data-lucide],
.ad-btn.ad-btn-delete:hover svg,
a.ad-btn.ad-btn-delete:hover svg,
button.ad-btn.ad-btn-delete:hover svg {
    color: #fff !important;
    stroke: #fff !important;
}

.ad-btn-primary {
    background: #409EFF;
    border-color: #409EFF;
    color: #fff;
}
.ad-btn-primary:hover { background: #337ecc; border-color: #337ecc; color: #fff; }

.ad-btn-lg { height: 40px; padding: 0 20px; font-size: 15px; }
.ad-w-full { width: 100%; }

.ad-btn-link {
    color: var(--pmc-primary-600);
    cursor: pointer;
    font-size: 13px;
    padding: 0 4px;
}
.ad-btn-link:hover { color: var(--pmc-primary-500); }
.ad-btn-link.danger { color: var(--pmc-danger); }
.ad-btn-link.danger:hover { color: #b91c1c; }

/* ==========================================================================
   卡片 & 表格
   ========================================================================== */
/* 773-778 重复定义 —— 更新为与L133一致，确保CSS优先级覆盖正确 */
.ad-card {
    background: var(--pmc-card-bg);
    margin-bottom: 16px;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
    overflow: hidden !important;
}
.ad-card-body {
    padding: 16px;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
    overflow: hidden !important;
}
.ad-card-body.no-pad {
    padding: 0 0 12px 0;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
    overflow: visible !important;
}

/* 固定列页面：允许纵向溢出（下拉菜单不被裁剪） */
/* CSS规范：overflow-x:hidden + overflow-y:visible 时 visible 会被当作 auto 处理！
   所以必须同时设置 overflow: visible 才能真正允许纵向溢出 */
.ad-content .ad-card:has(.ad-table-outer-wrap) {
    overflow: visible !important;
}
.ad-content .ad-card:has(.ad-table-outer-wrap) .ad-card-body,
.ad-content .ad-card:has(.ad-table-outer-wrap) .ad-card-body.no-pad {
    overflow: visible !important;
}
/* 横向滚动仍由 .ad-table-wrap 负责，恢复其 overflow-x */
.ad-content .ad-card:has(.ad-table-outer-wrap) .ad-table-wrap {
    overflow-x: auto !important;
    /* overflow-y: visible + overflow-x: auto 时 visible 会被规范计算为 auto，
       导致浏览器预留纵向滚动条 gutter（~15px），在表格底部和轨道之间挤出缝隙。
       固定列页面下拉菜单在 #stickyColWrap（outer-wrap 外部），不依赖这里的 visible。 */
    overflow-y: hidden !important;
    /* border-bottom 交给轨道 border-top 代替，统一正序布局：
       表格底部无线 → 轨道紧贴 outer-wrap 底部 → 轨道 border-top 就是表格底线位置 */
    border-bottom: 0 !important;
}

.ad-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
}
/* 卡片内工具栏减小上下内边距 */
.ad-card .ad-toolbar {
    padding: 4px 16px 8px 16px;
}
.ad-toolbar-left { display: flex; gap: 8px; align-items: center; }
.ad-toolbar-right { display: flex; gap: 8px; align-items: center; }

.ad-table-wrap {
    /* ================  强制触发横向滚动条的 5 条铁律  ================ */
    display: block;
    width: 100% !important;           /* ① 滚动画廊宽度 = 父容器(内容区)100% */
    max-width: 100% !important;       /* ② 绝对不让wrap溢出父容器 */
    box-sizing: border-box;           /* ③ padding算在100%内 */
    overflow-x: auto !important;      /* ④ 溢出就横向滚动 */
    overflow-y: visible;              /* 垂直方向不动 */
    -webkit-overflow-scrolling: touch;
    /* ============================================================
       🔴 关键：滚动容器上不能加 position: relative/static以外的定位！
       否则内部 sticky td 的 containing block 会计算错误，sticky失效！
       ============================================================ */
    /* 横向滚动条样式已统一移至 admin-hscroll.css */
}

/* ================  表格自适应宽度，溢出时横向滚动  ================ */
.ad-table {
    width: auto !important;
    min-width: 100%;
    max-width: none !important;
    border-collapse: collapse;           /* collapse:单元格边框合并为一条，分割线永远对齐，不再需要fixed高度 */
    border-spacing: 0;
    font-size: 13px;
    table-layout: auto;
    color: #4b5563;
}
.ad-table th {
    background: #f5f7fa !important;            /* 参考图：表头浅灰色背景 */
    border-bottom: 1px solid #e3e6eb;          /* 表头底边线 */
    border-right: 1px solid #eceff3;           /* 列间竖线 */
    padding: 10px 12px !important;             /* 表头与内容统一上下留白10px */
    text-align: left;
    font-weight: 500;                          /* 字重500中等 */
    color: #6b7280 !important;                 /* 表头字体 */
    white-space: nowrap;
    position: relative;
    vertical-align: middle;
    line-height: 1.5;
}
.ad-table tbody td {                         /* 仅作用 tbody 内 td，保证表头不变；按内容自适应高度 */
    border-bottom: 1px solid #e7eaef;        /* 行底分割线 */
    border-right: 1px solid #eceff3;         /* 列间竖线 */
    padding: 12px 12px !important;           /* 上下 12px 留白，内容越多行自然越高；上下留白完全一致 */
    color: #374151;
    background: #fff;
    white-space: nowrap;
    vertical-align: middle;                  /* 所有列内容垂直居中：文字/图片/按钮同一中心线 */
    line-height: 1.5;                        /* 文字行间距紧凑，不强行撑高单元格 */
}
/* 末行 td 去掉底边 —— 由轨道 border-top 统一封口 */
.ad-table tbody tr:last-child td { border-bottom: 0; }
/* 末列去掉竖线，避免与容器边缘重叠 */
.ad-table th:last-child,
.ad-table tbody td:last-child {
    border-right: 0;
}
/* 图片列：图片自带高度，不破坏行自适应 */
.ad-table td img[style*="width:120px"] {
    display: block;
    flex-shrink: 0;
}
.ad-table td .img-placeholder {
    display: block;
    width: 120px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 4px;
}
/* 无ad-table-outer-wrap的页面（商家等）允许单元格文字换行 */
.ad-card:not(:has(.ad-table-outer-wrap)) .ad-table tbody td {
    white-space: normal;
}
.ad-table td.ad-text-mono,
.ad-table td.ad-checkbox-cell,
.ad-table td.ad-table-col-link,
.ad-table td.ad-text-muted {
    white-space: nowrap;
}
/* 复选框列左对齐：与工具栏按钮左对齐 */
.ad-table th.ad-checkbox-cell,
.ad-table td.ad-checkbox-cell {
    padding-left: 16px !important;
    padding-right: 12px !important;
}
.ad-table-striped tbody tr:nth-child(even) td { background: #ffffff !important; }   /* 参考图：无斑马条条纹，偶行也纯白 */
.ad-table tbody tr:hover td { background: #f6f8fb !important; }                    /* 参考图悬停：极浅蓝灰白 #f6f8fb */

/* ========================================================================
   操作列固定（终极版 v2 绝对兜底）—— 彻底锁定中间祖先，防止 containing block 计算错
   1) sticky 放在 <div.col-sticky-inner> (block)  上
   2) 所有中间祖先(table/thead/tbody/tr) 强制 position:static + overflow:visible
      + transform:none + filter:none（彻底不让任何一层抢走 sticky 的 containing block）
   ======================================================================== */
/* 👇👇👇 最关键：sticky 元素到滚动容器之间的 所有中间祖先 全部锁死干净 —— 不含任何transform/overflow/filter */
.ad-table,
.ad-table thead,
.ad-table tbody,
.ad-table tr {
    position: static !important;
    overflow: visible !important;
    transform: none !important;
    filter: none !important;
    perspective: none !important;
    will-change: auto !important;
    contain: layout style !important;   /* contain:size会改变containing block，改成 layout style 安全 */
    isolation: auto !important;         /* 中间祖先不准建层叠上下文，否则 sticky z-index 会出问题 */
}

/* 第1层：<th>/<td> 本身的作用 —— 给 min-width:220px 的占位 + 背景色（不参与sticky/遮缝，全部给inner和遮板） */
.ad-table .col-sticky-action {
    position: static !important;
    right: auto !important;
    z-index: 1;
    background: #ffffff;
    background-clip: padding-box;
    border-left: 0;
    border-right: 0;                          /* 固定操作列右侧不显示竖线（盖布层覆盖） */
    white-space: nowrap;
    min-width: 220px;
    width: 220px !important;              /* 固定操作列宽度，不让 table-layout:auto 计算乱伸缩 */
    padding: 0 !important;
    isolation: isolate;
    /* td 本身也强制锁死，不准有任何transform/filter/overflow */
    overflow: visible !important;
    transform: none !important;
    filter: none !important;
}

/* ══════════════════════════════════════════════════════════════════════
   🔴🔴🔴 【终极物理外延遮缝板（对截图两处漏缝100%生效）】
   思路：操作列本身 = 220px宽 sticky right:0 钉在视口最右
         再在操作列左边外延 20px 画一块【独立的 sticky 遮板】
         → right:220px (钉在"操作列的最左边线处") width:20px height:100%
   两块板子首尾相连 = 240px 的完整实色盖布，
   任何左侧滑来的文字/图片/下划线/像素边框 必先经过这20px遮板，零漏缝！
   （不用z-index负数/伪元素absolute定位，和操作列一样 sticky 钉住，物理拼接不依赖层叠计算）
   ══════════════════════════════════════════════════════════════════════ */
.ad-table .col-sticky-action::after {
    content: "";
    display: block;
    position: sticky;
    right: 220px;
    width: 20px;
    height: 100%;
    min-height: 42px;
    margin-top: 0;
    margin-bottom: 0;
    margin-right: -220px;
    margin-left: -20px;
    pointer-events: none;
    z-index: 24;
    background: #ffffff;
    background-clip: padding-box;
    box-shadow: -8px 0 14px -6px rgba(0,0,0,0.15);
    isolation: isolate;
    border-right: 0;
    float: left;
}

/* 第2层：真正 sticky 的 block 元素 —— 钉在 ad-table-wrap 的滚动视口最右边 */
/* ⚠️ 注意：此方案已被下方"彻底禁用所有旧方案"规则覆盖（!important），
   真正生效的是 #stickyColWrap 盖布方案（.stc-slab / .stc-inner） */
.col-sticky-inner {
    position: sticky;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100% !important;
    min-height: 42px;
    padding: 10px 12px 10px 12px;
    box-sizing: border-box;
    background: #ffffff;
    background-clip: padding-box;
    z-index: 25;
    transform: translateZ(0);
    backface-visibility: hidden;
    border-left: 1px solid #eceff3;
    isolation: isolate;
}

/* ══════════════════════════════════════════════════════════════════════
   🔴🔴🔴 【遮缝 3 层 + 背景色三色同步全联动】
   组成：
     [20px外延遮板::after] —— sticky right:220px z24（盖左边滑过来的内容，防漏缝）
     [1px边线border-left]
     [220px操作列inner  ] —— sticky right:0   z25（按钮所在真正操作区）
   表头 / 数据行 / 悬停行 / 斑马条偶行 —— 所有背景色必须::after 和 inner 两块**100%同步**，否则就出漏缝黑线
   ══════════════════════════════════════════════════════════════════════ */
/* ─────────────────── 表头行 ─────────────────── */
.ad-table th.col-sticky-action .col-sticky-inner {
    background: #fafbfc !important;
    z-index: 26;
    min-height: 40px;
    padding: 8px 12px !important;
    font-weight: 500;
    color: #6b7280;
    box-shadow: inset 0 -1px 0 #e3e6eb !important;  /* 表头底边线用 inset shadow */
}
/* 表头行的底部线用深色 */
.ad-table th.col-sticky-action .col-sticky-inner::after {
    background: #e3e6eb !important;
}
.ad-table th.col-sticky-action::after {           /* 表头 外延遮板：浅灰#fafbfc + 更矮40px */
    background: #fafbfc !important;
    min-height: 40px;
    z-index: 25;
    box-shadow: -8px 0 14px -6px rgba(0,0,0,0.15), inset 0 -1px 0 #e3e6eb !important;
}

/* ─────────────────── 数据行（白 / 偶行白） ─────────────────── */
/* 数据行默认背景白（::after和.col-sticky-inner都保持默认#ffffff白）*/
.ad-table-striped tbody tr:nth-child(even) td.col-sticky-action .col-sticky-inner,
.ad-table-striped tbody tr:nth-child(even) td.col-sticky-action::after {
    background: #ffffff !important;                /* 偶行全白（已关闭斑马条，保持白）*/
}

/* ─────────────────── 悬停行：极浅蓝灰白#f6f8fb 双板同步 ─────────────────── */
.ad-table tbody tr:hover td.col-sticky-action .col-sticky-inner,
.ad-table tbody tr:hover td.col-sticky-action::after {
    background: #f6f8fb !important;
}

/* ::before 不再使用 */
.col-sticky-inner::before {
    display: none !important;
    content: none;
}

.ad-table-col-link {
    white-space: nowrap;
    line-height: inherit; /* 跟随 tbody td 的 line-height:1.5，内容决定高度 */
}
.ad-table-col-link > .ad-table-col-link-inner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    vertical-align: middle;
    line-height: normal;
}
.ad-table-col-link .ad-btn-link {
    margin-right: 0;
    color: #409EFF !important;                 /* 审核/编辑/更多 统一蓝色 #409EFF */
    padding: 0 3px;
}
.ad-table-col-link .ad-btn-link:hover         { color: #409EFF !important; text-decoration: none; }
.ad-table-col-link .ad-btn-link.danger        { color: #dc2626 !important; }   /* 禁用/删除类红色按钮，保留红 */
.ad-table-col-link .ad-btn-link.danger:hover  { color: #b91c1c !important; }
.ad-cell-num { font-family: var(--pmc-font-mono); text-align: center !important; }
.ad-table th.ad-cell-num { text-align: center !important; }

/* ═══════════════════════════════════════════════════════════════════════
   🔴🔴🔴 【操作列固定 - 终极V2方案 CSS】
   配套 HTML 结构：
     <div id="propTableOuterWrap" style="position:relative">  <-- 参照物
       <div id="propTableWrap">                                <-- 滚动容器
         <table>...</table>
       </div>
       <div id="stickyColWrap">                               <-- 固定列容器
         <div class="stc-slab">...</div>                      <-- 每一行的盖布
       </div>
     </div>
   ═══════════════════════════════════════════════════════════════════════ */

/* ───────── [0] 外层参照物 ───────── */
.ad-table-outer-wrap { position: relative !important; }

/* 取消滚动容器的 relative（现在外层做参照物） */
.ad-table-wrap { position: static !important; }

/* ───────── [1] 原占位 th/td：保留宽度，内容彻底隐藏 ───────── */
.ad-table .col-sticky-action.col-sticky-placeholder,
.ad-table .col-sticky-action.col-sticky-placeholder * {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.ad-table .col-sticky-action.col-sticky-placeholder {
    position: static !important;
    min-width: 220px;
    width: 220px !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    transform: none !important;
    filter: none !important;
    border-left: 0 !important;
    border-right: 0 !important;
}
.ad-table .col-sticky-action.col-sticky-placeholder .col-sticky-inner { display: none !important; }

/* ───────── 彻底禁用所有 旧方案 ───────── */
.ad-table .col-sticky-action::after,
.ad-table th.col-sticky-action::after {
    display: none !important;
    content: none !important;
}
.col-sticky-inner {
    position: static !important;
    transform: none !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    z-index: 1 !important;
    float: none !important;
    box-shadow: none !important;
    border-left: 0 !important;
    width: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
}
.col-sticky-inner::before,
.col-sticky-inner::after { display: none !important; content: none !important; }

/* ───────── [2] 固定列容器（在外层容器右侧） ───────── */
#stickyColWrap,
#storeStickyColWrap,
#mchStickyColWrap {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    z-index: 50;
    pointer-events: none;
    overflow: visible;
    background: transparent;
}

/* Portal 下拉菜单样式 - 脱离DOM层级直接挂到body */
.ad-menu-portal {
    position: fixed !important;
    display: block !important;
    visibility: visible !important;
    z-index: 99999 !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
    animation: adMenuFadeIn 0.12s ease-out;
}
@keyframes adMenuFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ───────── [3] 每一行的盖布（.stc-slab） ───────── */
.stc-slab {
    position: absolute;
    right: 0;
    top: 0;
    width: 220px;
    box-sizing: border-box;
    z-index: 51;
    pointer-events: auto;
    /* 行底横线由 ::after 伪元素绘制（z-index 高于 .stc-inner，避免被背景遮挡）；
       外阴影放在左边缘 */
    box-shadow: -6px 0 12px -4px rgba(0,0,0,0.1);
    overflow: visible;
}
/* 每一行盖布的底部横线（伪元素绘制，必可见） */
.stc-slab::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #e7eaef;
    z-index: 55;
    pointer-events: none;
}
/* 最后一行盖布不画底部横线 —— 轨道 border-top 统一封口 */
.stc-slab:last-child::after {
    display: none !important;
}
/* 滚动到最右端或无溢出时，隐藏盖布层外阴影（保留 ::after 行底横线） */
#stickyColWrap.stc-no-shadow .stc-slab,
#mchStickyColWrap.stc-no-shadow .stc-slab,
#storeStickyColWrap.stc-no-shadow .stc-slab,
.mch-sticky-col-wrap.stc-no-shadow .stc-slab {
    box-shadow: none !important;
}

/* 盖布内部操作区 */
.stc-inner {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;           /* 宽度充满 .stc-slab (220px) */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 8px 12px;
    border-left: 1px solid #eceff3;
    /* 行底边线由 .stc-slab 提供，避免双线重叠 */
    overflow: visible;    /* 关键修复：改为 visible，防止下拉菜单（如"更多"）被裁剪 */
}

/* 表头盖布 */
.stc-slab[data-stc="header"] .stc-inner {
    background: #f5f7fa !important;
    font-weight: 500;
    color: #6b7280;
}
/* 表头盖布底边线与普通表头一致（深色横线，由 ::after 绘制） */
.stc-slab[data-stc="header"]::after {
    background: #e3e6eb;
}

/* 行悬停同步 */
.stc-slab.is-hover .stc-inner { background: #f6f8fb !important; }

/* 盖布内部链接保持原样式 */
.stc-inner > .ad-table-col-link {
    width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* ==========================================================================
   渠道商列表 —— 简化版CSS固定操作列（使用 position:sticky）
   ========================================================================== */
.partner-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: max-content !important;
    min-width: 100% !important;
}
.partner-table thead,
.partner-table tbody,
.partner-table tr {
    contain: auto !important;
    isolation: auto !important;
    position: static !important;
    overflow: visible !important;
    transform: none !important;
    filter: none !important;
}
.partner-table th.partner-sticky-col,
.partner-table td.partner-sticky-col {
    position: sticky !important;
    right: 0 !important;
    z-index: 10;
    background: #ffffff !important;
    box-shadow: -6px 0 12px -4px rgba(0,0,0,0.1);
    min-width: 180px;
    width: 180px !important;
    padding: 10px 12px !important;
    contain: auto !important;
    isolation: auto !important;
}
.partner-table th.partner-sticky-col {
    background: #fafbfc !important;
    z-index: 11;
}
.partner-table tbody tr:nth-child(even) td.partner-sticky-col {
    background: #ffffff !important;
}
.partner-table tbody tr:hover td.partner-sticky-col {
    background: #f6f8fb !important;
}
.partner-table td.partner-sticky-col .ad-table-col-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    white-space: nowrap;
}
/* 渠道商操作列：滚动到最右端或无溢出时去掉左侧阴影，与 stc-no-shadow 类配合 */
.partner-table th.partner-sticky-col.stc-no-shadow,
.partner-table td.partner-sticky-col.stc-no-shadow {
    box-shadow: none !important;
}

/* ==========================================================================
   标签
   ========================================================================== */
.ad-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--pmc-radius-small);
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
}
.ad-tag-success { background: #dcfce7; color: #166534; }
.ad-tag-warning { background: #fef3c7; color: #92400e; }
.ad-tag-danger  { background: #fee2e2; color: #991b1b; }
.ad-tag-error   { background: #fee2e2; color: #991b1b; }
.ad-tag-info    { background: #dbeafe; color: #1e40af; }

/* 状态标签可点击切换（指针 + 悬停反馈） */
a.ad-status-toggle {
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s ease, transform .15s ease;
}
a.ad-status-toggle:hover { opacity: .75; transform: translateY(-1px); }
a.ad-status-toggle:active { transform: translateY(0); }

/* 审核流程展示（横向步骤） */
.ad-audit-flow {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
}
.ad-audit-flow .ad-flow-step {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #c0c4cc;
}
.ad-audit-flow .ad-flow-step + .ad-flow-step::before {
    content: "";
    width: 14px;
    height: 1px;
    margin: 0 4px;
    background: #d9dce0;
}
.ad-audit-flow .ad-flow-step.ad-flow-done {
    color: #909399;
}
.ad-audit-flow .ad-flow-step.ad-flow-active {
    color: #E6A23C;
    font-weight: 600;
}
.ad-audit-flow .ad-flow-step.ad-flow-fail {
    color: #F56C6C;
    font-weight: 600;
}

/* ==========================================================================
   企业/物业公司 Logo 首字标识（仿后台统一风格）
   ========================================================================== */
.ad-merchant-logo {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 8px;
    background: linear-gradient(135deg, var(--pmc-primary-500), var(--pmc-primary-700));
    color: #fff; font-weight: 600; font-size: 15px; letter-spacing: 0;
}

/* 法人/企业副信息块 */
.ad-legal-info { display: flex; flex-direction: column; gap: 3px; }
.ad-legal-name { font-weight: 500; color: #1f2937; font-size: 13px; line-height: 1.4; }
.ad-legal-id { color: #9ca3af; font-size: 12px; line-height: 1.4; }

/* 物业公司联系人标签样式 */
.ad-legal-tag {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  color: #0d9488;
  background: #ccfbf1;
  border-radius: 3px;
  margin-top: 1px;
  line-height: 1.4;
}

/* 查看营业执照链接（出现在"物业公司信息"列底部） */
.ad-link-license {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  font-size: 12px;
  color: #409EFF;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}
.ad-link-license:hover { color: #337ecc; text-decoration: underline; }

/* 商家信息复合列 */
.ad-company-info { display: flex; flex-direction: column; gap: 3px; }
.ad-company-name { font-weight: 500; color: #1f2937; font-size: 13px; line-height: 1.4; }
.ad-company-code { font-size: 12px; line-height: 1.4; }
.ad-legal-mobile { font-size: 12px; line-height: 1.4; }

/* 文本链接（兼容现有模板中 ad-text-link 写法，统一走 ad-btn-link 视觉） */
.ad-text-link,
.ad-link-primary {
    color: var(--pmc-primary-600); font-size: 13px; text-decoration: none;
    padding: 0 4px;
}
.ad-text-link:hover { text-decoration: underline; }
.ad-text-link.danger,
.ad-link-danger { color: #dc2626; }
/* "更多 ▾" 链接:用图片作下拉箭头(替换原 ▾ 字符,改用 /static/admin/img/sys_down.png) */
.ad-link-more { display: inline-flex; align-items: center; gap: 3px; }
.ad-link-more::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background: url('/static/admin/img/sys_down.png') no-repeat center / contain;
  opacity: .7;
}

/* 简易内联下拉（更多 ▾ 菜单） */
.ad-dropdown { position: relative; display: inline-block; }
.ad-dropdown-inline { display: inline-flex; }
.ad-dropdown-menu {
    display: none; position: absolute; right: 0; top: 100%;
    min-width: 140px; margin-top: 4px;
    background: #fff; border: 1px solid var(--pmc-border); border-radius: var(--pmc-radius);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); z-index: 99; padding: 4px 0;
    list-style: none;
}
.ad-dropdown-menu li a {
    display: block; padding: 6px 12px; font-size: 13px; color: var(--pmc-neutral-700);
    text-decoration: none; line-height: 1.5;
}
.ad-dropdown-menu li a:hover { background: var(--pmc-neutral-100); color: var(--pmc-primary-600); }
.ad-dropdown[data-trigger="click"].open > .ad-dropdown-menu,
.ad-dropdown:hover > .ad-dropdown-menu:not(.ad-menu-colored) { display: block; }

/* =====================================================
   彩色按钮下拉菜单（物业/商户-更多 按钮组）
   - 5 个全宽彩色按钮垂直排列
   - 与图二保持一致：青绿/蓝/橙/黄绿/灰
   - 点击"更多"时由 JS 给 ul 加 inline style 强制显示 + position:fixed + z-index 最高
   - 这里不加 !important,确保 JS inline style 能覆盖(外部 !important 优先级 > inline 普通声明)
   ===================================================== */
.ad-dropdown-menu.ad-menu-colored {
    display: none;
    min-width: 140px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--pmc-border);
    border-radius: var(--pmc-radius);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    list-style: none;
}
.ad-dropdown-menu.ad-menu-colored li { list-style: none; }
.ad-dropdown-menu.ad-menu-colored li a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 6px;
    padding: 8px 14px;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    color: #fff !important;
    border-radius: 4px;
    text-decoration: none;
    transition: filter .15s ease, transform .15s ease;
    background: #909399;
}
.ad-dropdown-menu.ad-menu-colored li:last-child a { margin-bottom: 0; }
.ad-dropdown-menu.ad-menu-colored li a:hover { filter: brightness(1.08); color: #fff !important; }
.ad-dropdown-menu.ad-menu-colored li a:active { transform: scale(0.98); }
/* 颜色：青绿/蓝/青/橙/黄绿/黄/灰 */
.ad-dropdown-menu.ad-menu-colored li a.menu-c-teal    { background: #1ABC9C; }
.ad-dropdown-menu.ad-menu-colored li a.menu-c-blue    { background: #1578FE; }
.ad-dropdown-menu.ad-menu-colored li a.menu-c-cyan    { background: #13C2C2; }
.ad-dropdown-menu.ad-menu-colored li a.menu-c-orange  { background: #F56C2C; }
.ad-dropdown-menu.ad-menu-colored li a.menu-c-lime    { background: #8BC34A; }
.ad-dropdown-menu.ad-menu-colored li a.menu-c-yellow  { background: #F7BA1E; color: #fff !important; }
.ad-dropdown-menu.ad-menu-colored li a.menu-c-gray    { background: #909399; }

/* =====================================================
   下拉菜单 - CSS原生跟随方案
   - 菜单保持在DOM原位,用position:absolute相对.ad-dropdown容器
   - 原生滚动自动跟随:菜单在tr内,表格滚动时菜单自然跟随按钮移动
   - .open类控制显示,.flip-up类控制向上展开
   ===================================================== */
.ad-dropdown.open > .ad-dropdown-menu.ad-menu-colored {
    display: block !important;
    position: absolute !important;
    right: 0;
    top: 100%;
    margin-top: 4px;
    z-index: 1000;
}
.ad-dropdown.open.flip-up > .ad-dropdown-menu.ad-menu-colored {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 4px;
}
/* 确保下拉菜单在sticky列容器中可见 */
.ad-table-outer-wrap .stc-inner {
    overflow: visible !important;
}

/* 兼容原模板 ad-search-input 写法，统一使用 ad-input 视觉 */
.ad-search-input {
    height: 32px; padding: 0 10px;
    border: 1px solid #e5e7eb; border-radius: 2px;
    font-size: 13px; outline: none; background: #fff;
}
.ad-search-input:focus { border-color: var(--pmc-primary-500, #3b82f6); }

/* 兼容原模板 form-input / form-group 的大表单（弹窗内） */
.ad-form-input {
    width: 100%; height: 34px; padding: 0 10px;
    border: 1px solid var(--pmc-border); border-radius: var(--pmc-radius-small);
    font-size: 13px; box-sizing: border-box; background: #fff; outline: none;
}
textarea.ad-form-input { height: auto; padding: 6px 10px; line-height: 1.6; }
select.ad-form-input { cursor: pointer; }

/* 表格中物业公司数字信息等宽 */
.wyc-code { font-family: var(--pmc-font-mono); font-weight: 600; color: var(--pmc-neutral-500); }

/* ==========================================================================
   分页
   ========================================================================== */
.ad-pagination {
    padding: 12px 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}
.ad-page-info { font-size: 13px; color: var(--pmc-neutral-500); margin-right: 8px; }
.ad-page {
    min-width: 32px; height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--pmc-neutral-300);
    border-radius: var(--pmc-radius-small);
    font-size: 13px;
    cursor: pointer;
    padding: 0 8px;
}
.ad-page:hover { border-color: #409EFF; color: #409EFF; }
.ad-page.active { background: #409EFF; border-color: #409EFF; color: #fff; }
.ad-page.disabled { color: var(--pmc-neutral-400); cursor: not-allowed; }
.ad-page-jumper { font-size: 13px; color: var(--pmc-neutral-500); margin-left: 8px; display: inline-flex; align-items: flex-start; justify-content: flex-start; gap: 4px; height: 32px; line-height: 32px; padding: 0; margin-top: 0; margin-bottom: 0; }
.ad-page-jumper > * { align-self: flex-start; }
.ad-page-jumper .ad-input,
.ad-page-jumper input.ad-input,
.ad-page-jumper input[type="text"].ad-input,
.ad-page-jumper input[type="number"].ad-input {
    width: 50px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 6px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    -webkit-padding-before: 0 !important;
    -webkit-padding-after: 0 !important;
    line-height: 28px !important;
    box-sizing: border-box !important;
    vertical-align: top !important;
    text-align: center !important;
    margin: 0 !important;
    margin-top: -1px !important;
    margin-bottom: 0 !important;
    font-size: 13px !important;
    appearance: none !important;
    -moz-appearance: none !important;
    -webkit-appearance: none !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
}
.ad-page-jumper input::-webkit-outer-spin-button,
.ad-page-jumper input::-webkit-inner-spin-button { -webkit-appearance: none !important; margin: 0 !important; }
.ad-page-jumper input[type=number] { -moz-appearance: textfield !important; appearance: textfield !important; }
.ad-pagination { padding: 12px 0 20px 0 !important; align-items: flex-start !important; flex-wrap: nowrap !important; overflow: hidden !important; box-sizing: border-box !important; width: 100% !important; justify-content: flex-end !important; margin-left: auto !important; }
.ad-pagination .ad-page,
.ad-pagination .ad-page-info {
    align-self: flex-start;
    flex-shrink: 0;
}
.ad-pagination > * { vertical-align: top !important; }
.ad-pagination ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.ad-pagination li { display: inline-block; }
.ad-pagination a, .ad-pagination span {
    display: inline-block;
    min-width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    padding: 0 6px;
    border: 1px solid var(--pmc-border, #e5e7eb);
    border-radius: 2px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
}
.ad-pagination a:hover { border-color: #409EFF; color: #409EFF; }
.ad-pagination .active span, .ad-pagination .active a {
    background: #409EFF;
    color: #fff;
    border-color: #409EFF;
}
.ad-pagination .disabled a { color: #ccc; cursor: not-allowed; }

/* ==========================================================================
   登录页
   ========================================================================== */
/* ==========================================================================
   登录页 - 左右分栏布局
   ========================================================================== */
.ad-login-wrap {
    min-height: 100vh;
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
}
.ad-login-left {
    flex: 0 0 45%;
    width: 45%;
    min-height: 100vh;
    background-image: url('/static/admin/img/bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
}
.ad-login-left-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.15) 100%);
}
.ad-login-right {
    flex: 1;
    min-height: 100vh;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.ad-login-form {
    width: 100%;
    max-width: 440px;
}
.ad-login-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 48px;
}
.ad-login-brand-img {
    width: 53px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}
.ad-login-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1890ff, #13c2c2 50%, #52c41a);
    border-radius: 50%;
    color: #fff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
    flex-shrink: 0;
}
.ad-login-brand-icon i {
    width: 20px;
    height: 20px;
}
.ad-login-brand-text {
    font-size: 30px;
    font-weight: 700;
    color: #666666;
    line-height: 32px;
}
.ad-login-field {
    display: flex;
    align-items: center;
    width: 100%;
    height: 44px;
    border: 1px solid #e4e7eb;
    border-radius: 6px;
    margin-bottom: 16px;
    padding: 0 14px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .2s;
}
.ad-login-field:focus-within {
    border-color: #1a6fc4;
    box-shadow: 0 0 0 2px rgba(26, 111, 196, 0.1);
}
.ad-login-field-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #909399;
    margin-right: 10px;
    flex-shrink: 0;
}
.ad-login-input {
    flex: 1;
    min-width: 0;
    height: 42px;
    line-height: 42px;
    border: 0;
    outline: none;
    padding: 0;
    background: transparent;
    font-size: 14px;
    color: #1f1f1f;
    font-family: inherit;
}
.ad-login-input::placeholder {
    color: #b4b9c2;
}
.ad-login-captcha {
    width: 100px;
    height: 32px;
    margin-left: 10px;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    object-fit: cover;
}
.ad-login-extra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 28px 0;
    font-size: 13px;
}
.ad-login-forgot {
    color: #1578FE;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}
.ad-login-forgot:hover {
    color: #3b8ffe;
    text-decoration: underline;
}
.ad-login-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #646a73;
    cursor: pointer;
    font-weight: 400;
    user-select: none;
}
.ad-login-checkbox input {
    margin: 0;
    cursor: pointer;
    accent-color: #1a6fc4;
}
.ad-login-forget {
    color: #1a6fc4;
    text-decoration: none;
    font-size: 13px;
}
.ad-login-forget:hover {
    color: #134e8f;
    text-decoration: underline;
}
.ad-login-submit {
    width: 100%;
    height: 46px;
    line-height: 46px;
    background: #409EFF;
    color: #fff;
    border: 0;
    border-radius: 23px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s;
    padding: 0;
}
.ad-login-submit:hover {
    background: #337ecc;
}
.ad-login-submit:disabled {
    background: #a0cfff;
    cursor: not-allowed;
}
@media (max-width: 900px) {
    .ad-login-left { display: none; }
    .ad-login-right { flex: 1; width: 100%; }
}

/* ==========================================================================
   工具类
   ========================================================================== */
.ad-text-sm { font-size: 13px; }
.ad-text-muted { color: var(--pmc-neutral-500); }
.ad-text-danger { color: var(--pmc-danger); }
.ad-text-success { color: var(--pmc-success); }
.ad-text-warning { color: var(--pmc-warning); }
.ad-flex-between { display: flex; align-items: center; justify-content: space-between; }
.ad-flex { display: flex; align-items: center; }
.ad-flex-center { display: flex; align-items: center; justify-content: center; }
.ad-gap-8 { gap: 8px; }
.ad-gap-12 { gap: 12px; }
.ad-gap-16 { gap: 16px; }
.ad-mb-16 { margin-bottom: 16px; }
.ad-mt-8 { margin-top: 8px; }
.ad-mt-16 { margin-top: 16px; }
.ad-mt-24 { margin-top: 24px; }
.ad-row { display: flex; gap: 16px; }
.ad-col-3 { flex: 1; }
.ad-col-4 { flex: 1; }
.ad-col-8 { flex: 2; }

/* 文本工具类 */
.ad-text-mono { font-family: var(--pmc-font-mono); }
.ad-text-bold { font-weight: 700; }
.ad-text-lg { font-size: 16px; }
.ad-text-primary { color: var(--pmc-primary-600); }
.ad-text-info { color: var(--pmc-info); }
.ad-text-error { color: var(--pmc-danger); }

/* 表格补充类 */
.ad-checkbox-cell { width: 40px; text-align: center; }
.ad-checkbox-cell input { vertical-align: middle; }

/* 标签扩展 */
.ad-tag-primary { background: #dbeafe; color: #1e40af; }
.ad-tag-default { background: var(--pmc-neutral-100); color: var(--pmc-neutral-700); }
.ad-tag-error { background: #fee2e2; color: #991b1b; }

/* 按钮补充 */
.ad-btn-normal { background: var(--pmc-neutral-100); color: var(--pmc-neutral-700); border-color: var(--pmc-neutral-300); }

/* 卡片扩展 */
.ad-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--pmc-border);
}
.ad-card-header .ad-card-title { font-size: 15px; font-weight: 600; }
.ad-card-extra { font-size: 13px; color: var(--pmc-neutral-500); }
.no-pad { padding: 0 0 12px 0 !important; }

/* 统计卡片 */
.ad-stat-card {
    display: flex; align-items: center; gap: 12px;
    padding: 16px; background: #fff; border-radius: var(--pmc-radius); border: 1px solid var(--pmc-border);
}
.ad-stat-icon {
    width: 40px; height: 40px; border-radius: var(--pmc-radius);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ad-stat-label { font-size: 13px; color: var(--pmc-neutral-500); margin-bottom: 4px; }
.ad-stat-value { font-size: 20px; font-weight: 700; font-family: var(--pmc-font-mono); }
.ad-stat-foot { font-size: 12px; color: var(--pmc-neutral-400); margin-top: 4px; }

/* 切换开关 */
.ad-switch {
    display: inline-flex; align-items: center; cursor: pointer; gap: 6px;
}
.ad-switch input[type="checkbox"] { width: 36px; height: 20px; appearance: none; border-radius: 10px; background: var(--pmc-neutral-300); position: relative; cursor: pointer; transition: background .2s; }
.ad-switch input[type="checkbox"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.ad-switch input[type="checkbox"]:checked { background: var(--pmc-primary-600); }
.ad-switch input[type="checkbox"]:checked::after { transform: translateX(16px); }

/* 其他补充 */
.ad-section-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; color: var(--pmc-foreground); }
.ad-form-row { display: flex; gap: 16px; }
.ad-input-append { display: flex; align-items: center; white-space: nowrap; flex-shrink: 0; }
.ad-hint { font-size: 12px; color: var(--pmc-neutral-400); margin-top: 4px; }
.ad-textarea { min-height: 80px; padding: 8px 10px; line-height: 1.5; resize: vertical; }

/* 密码框内显示/隐藏眼睛图标(管理端小程序设置 AppSecret) */
.mp-secret-wrap { position: relative; }
.mp-secret-wrap .ad-input { width: 100%; padding-right: 36px; box-sizing: border-box; }
.mp-secret-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 34px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
}
.mp-secret-toggle:hover { color: #409EFF; }
.mp-secret-toggle svg { width: 17px; height: 17px; }

/* ==========================================================================
   Dashboard 专用样式
   ========================================================================== */
/* Dashboard 专用样式：页面背景纯白（仅工作台页生效） */
.ad-content:has(> .dash-kpi-row) { background: #ffffff; }
.dash-kpi-row { display: flex; gap: 40px; justify-content: space-between; margin-bottom: 28px; }
.dash-kpi-card {
    flex: 1 1 0; min-width: 0; max-width: 300px; height: 82px;
    background: #E9F1E5; border: none;
    border-radius: 10px; padding: 8px 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.dash-kpi-label { font-size: 15px; line-height: 1.2; color: #333333; margin-bottom: 8px; }
.dash-kpi-val { font-size: 22px; line-height: 1.2; font-weight: 500; font-family: var(--pmc-font-mono); color: #333333; }

.dash-section { background: #fff; margin-bottom: 4px; }
.dash-ov-row { display: flex; flex-direction: column; padding: 4px 0 20px; border-bottom: 1px solid #ECECEC; position: relative; }
/* 缴费概览与抵扣金概览之间：唯一一条贯穿竖线（62.5% = 5/8 分割位） */
.dash-ov-row::before { content: ''; position: absolute; left: 62.5%; top: 40%; bottom: 14%; width: 1px; background: var(--pmc-border); }
.dash-ov-titles { display: flex; }
.dash-ov-titles .dash-ov-group-title { padding: 0 20px 24px; font-size: 15px; font-weight: 600; color: #333333; }
.dash-ov-titles .dash-ov-group-title:first-child { flex: 5; }
.dash-ov-titles .dash-ov-group-title:last-child { flex: 3; padding-left: 32px; }
.dash-ov-items { display: flex; padding-top: 4px; }
.dash-ov-item { flex: 1; text-align: left; padding: 8px 16px 12px 16px; }
.dash-ov-item:nth-child(n+6) { flex: 1; padding: 8px 16px 12px 16px; }
.dash-ov-item .dash-ov-label { font-size: 13px; color: #555555; margin-bottom: 10px; white-space: nowrap; }
.dash-ov-item .dash-ov-val { font-size: 20px; font-weight: 400; font-family: var(--pmc-font-mono); color: #333333; }

.dash-chart-row { display: flex; }
.dash-chart-group { flex: 1; min-width: 0; }
.dash-chart-toolbar { display: flex; justify-content: flex-end; padding: 14px 12px 0; }
.dash-chart-header {
    height: 44px; padding: 0 18px;
    display: flex; align-items: center; justify-content: space-between;
}
.dash-chart-header .dash-chart-title { font-size: 15px; font-weight: 600; color: #333333; }
.dash-chart-header .dash-chart-select {
    font-size: 13px; color: var(--pmc-neutral-500);
    border: 1px solid var(--pmc-border); border-radius: 4px;
    padding: 5px 12px; background: #fff; cursor: pointer; outline: none;
}
.dash-chart-toolbar .dash-chart-select {
    font-size: 13px; color: #555555;
    border: 1px solid #DCDFE6; border-radius: 6px;
    min-width: 160px; padding: 7px 32px 7px 14px; background-color: #fff; cursor: pointer; outline: none;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' fill='none' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    text-align: center; text-align-last: center;
}
.dash-chart-body { padding: 0 12px 12px; }
.dash-chart-canvas { width: 100%; height: 280px; }

.dash-bottom { display: flex; align-items: flex-start; gap: 24px; padding: 4px 0 8px; }
.dash-todo { flex: 13; min-width: 0; margin-bottom: 0; }
.dash-todo-title { font-size: 15px; font-weight: 600; padding: 0 0 14px; color: #333333; }
.dash-todo-grid { display: flex; }
.dash-todo-item { flex: 1; text-align: left; padding: 16px 8px 16px 12px; }
.dash-todo-item .dash-todo-label { font-size: 14px; color: #666; margin-bottom: 12px; white-space: nowrap; }
.dash-todo-item .dash-todo-num { font-size: 32px; font-weight: 700; font-family: var(--pmc-font-mono); color: #2F86F6; line-height: 1.1; }

.dash-app { flex: 9; min-width: 0; border-left: none; padding-left: 40px; }
.dash-app-title { font-size: 14px; font-weight: 400; padding: 0 0 14px; color: #666; margin-top: 51px; }
.dash-app-main { display: flex; align-items: center; gap: 24px; }
.dash-app-list { flex: 1; min-width: 0; list-style: none; margin: 0; padding: 0; }
.dash-app-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #444; margin-bottom: 14px; }
.dash-app-list li:last-child { margin-bottom: 0; }
.dash-app-icon { display: inline-block; width: 16px; height: 16px; color: #555; flex-shrink: 0; }
.dash-qr { width: 136px; height: 136px; flex-shrink: 0; border: none; border-radius: 10px; overflow: hidden; padding: 0; background: transparent; margin-right: 36px; margin-top: -18px; }
.dash-qr-img { display: block; width: 100%; height: 100%; }

@media (max-width: 1200px) {
    .dash-kpi-row { flex-wrap: wrap; gap: 16px; }
    .dash-kpi-card { flex: 1 1 calc(33.3% - 16px); max-width: none; }
    .dash-ov-items { flex-wrap: wrap; }
    .dash-ov-item { flex: 1 1 calc(25% - 16px); }
    .dash-chart-row { flex-direction: column; }
    .dash-bottom { flex-direction: column; }
    .dash-app { border-left: none; padding-left: 0; border-top: 1px solid var(--pmc-border); padding-top: 16px; }
}
@media (max-width: 768px) {
    .dash-kpi-card { flex: 1 1 100%; max-width: none; }
    .dash-ov-items { flex-direction: column; }
    .dash-todo-grid { flex-direction: column; }
    .dash-app-main { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   按钮扩展样式
   ========================================================================== */
.ad-btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
.ad-btn-success { background: #16a34a; color: #fff; border-color: #16a34a; }
.ad-btn-success:hover { background: #15803d; border-color: #15803d; color: #fff; }
.ad-btn-warning { background: #d97706; color: #fff; border-color: #d97706; }
.ad-btn-warning:hover { background: #b45309; border-color: #b45309; color: #fff; }
.ad-btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.ad-btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }

/* ==========================================================================
   搜索栏 — 强制 label 与输入框 水平排列一行显示，按钮与输入框同一行
   ========================================================================== */
.ad-context-bar {
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: #f0f7ff !important;
    border: 1px solid #cce4ff !important;
    border-radius: 4px !important;
    padding: 10px 16px !important;
    margin: 0 0 12px 0 !important;
    font-size: 13px !important;
    color: #1578FE !important;
}
.ad-context-bar b { color: #001a33; font-weight: 600; }
.ad-search-bar {
    background: #fff !important;
    padding: 12px 16px !important;
    margin-bottom: 16px !important;
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}
/* 卡片内搜索栏去除底部外边距 */
.ad-card .ad-search-bar {
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
}
.ad-search-bar > .ad-form-item,
.ad-search-form > .ad-form-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
}
.ad-search-bar > .ad-form-item > .ad-label,
.ad-search-form > .ad-form-item > .ad-label {
    display: inline-block !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    line-height: 32px !important;
    font-size: 13px !important;
    color: #333 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}
.ad-search-bar > .ad-form-item > .ad-control,
.ad-search-form > .ad-form-item > .ad-control {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
    width: auto !important;
}
.ad-search-bar > .ad-form-item > .ad-control .ad-input,
.ad-search-bar > .ad-form-item > .ad-control .ad-select,
.ad-search-form > .ad-form-item > .ad-control .ad-input,
.ad-search-form > .ad-form-item > .ad-control .ad-select {
    height: 32px !important;
    margin: 0 !important;
    display: inline-block !important;
}
.ad-search-bar > .ad-form-item > .ad-control .ad-btn,
.ad-search-form > .ad-form-item > .ad-control .ad-btn {
    height: 32px !important;
    line-height: 1 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
}

.ad-search-form {
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

/* ==========================================================================
   下载中心 Download Center
   ========================================================================== */
.dl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.dl-header-left { display: flex; align-items: center; gap: 16px; }
.dl-title-main {
    font-size: 20px;
    font-weight: 600;
    color: rgba(0,0,0,0.88);
    margin-bottom: 4px;
}
.dl-title-sub {
    font-size: 13px;
    color: rgba(0,0,0,0.45);
}
.dl-search {
    position: relative;
    width: 280px;
}
.dl-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: rgba(0,0,0,0.45);
}
.dl-search-input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: rgba(0,0,0,0.88);
    transition: all 0.2s;
    box-sizing: border-box;
}
.dl-search-input:focus {
    outline: none;
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22,119,255,0.1);
}

/* 统计卡片 */
.dl-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.dl-stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s;
}
.dl-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}
.dl-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dl-stat-card.report .dl-stat-icon { background: #e6f4ea; color: #52c41a; }
.dl-stat-card.bill .dl-stat-icon { background: #fff1f0; color: #ff4d4f; }
.dl-stat-card.reconcile .dl-stat-icon { background: #e6f7ff; color: #1890ff; }
.dl-stat-card.other .dl-stat-icon { background: #f9f0ff; color: #722ed1; }
.dl-stat-num {
    font-size: 24px;
    font-weight: 600;
    color: rgba(0,0,0,0.88);
    line-height: 1.2;
}
.dl-stat-label {
    font-size: 13px;
    color: rgba(0,0,0,0.45);
    margin-top: 4px;
}

/* 筛选区 */
.dl-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.dl-tabs {
    display: flex;
    gap: 4px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 8px;
}
.dl-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 14px;
    color: rgba(0,0,0,0.65);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.dl-tab:hover { color: rgba(0,0,0,0.88); }
.dl-tab.active {
    background: #fff;
    color: #1677ff;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.dl-tab-count {
    background: rgba(0,0,0,0.06);
    color: rgba(0,0,0,0.65);
    font-size: 12px;
    padding: 1px 8px;
    border-radius: 10px;
    line-height: 1.5;
}
.dl-tab.active .dl-tab-count {
    background: #e6f4ff;
    color: #1677ff;
}
.dl-sort-select {
    height: 34px;
    padding: 0 28px 0 12px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: rgba(0,0,0,0.88);
    cursor: pointer;
    transition: all 0.2s;
}
.dl-sort-select:hover { border-color: #1677ff; }
.dl-sort-select:focus {
    outline: none;
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22,119,255,0.1);
}

/* 文件列表卡片 */
.dl-file-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.dl-file-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    gap: 14px;
    transition: all 0.2s;
    position: relative;
}
.dl-file-card:hover {
    border-color: #d9e8ff;
    box-shadow: 0 4px 16px rgba(22,119,255,0.08);
    transform: translateY(-1px);
}
.dl-file-icon {
    width: 60px;
    height: 72px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    gap: 6px;
}
.dl-file-icon.report    { background: linear-gradient(135deg, #f6ffed, #e6f4ea); color: #52c41a; }
.dl-file-icon.bill      { background: linear-gradient(135deg, #fff1f0, #ffe6e6); color: #ff4d4f; }
.dl-file-icon.reconcile { background: linear-gradient(135deg, #e6f7ff, #d1ecf1); color: #1890ff; }
.dl-file-icon.other     { background: linear-gradient(135deg, #f9f0ff, #f3e8ff); color: #722ed1; }
.dl-file-format {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.8;
}
.dl-file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dl-file-name {
    font-size: 14px;
    font-weight: 500;
    color: rgba(0,0,0,0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}
.dl-file-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: rgba(0,0,0,0.45);
}
.dl-file-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.dl-file-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
    font-weight: 500;
}
.dl-file-tag.report    { background: #e6f4ea; color: #389e0d; }
.dl-file-tag.bill      { background: #fff1f0; color: #cf1322; }
.dl-file-tag.reconcile { background: #e6f7ff; color: #0958d9; }
.dl-file-tag.other     { background: #f9f0ff; color: #531dab; }
.dl-file-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
}
.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.dl-btn-preview {
    background: #fff;
    border-color: #e5e6eb;
    color: rgba(0,0,0,0.65);
}
.dl-btn-preview:hover {
    border-color: #1677ff;
    color: #1677ff;
}
.dl-btn-download {
    background: #1677ff;
    color: #fff;
    border-color: #1677ff;
}
.dl-btn-download:hover {
    background: #4096ff;
    border-color: #4096ff;
}

/* 空状态 */
.dl-empty {
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.dl-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dl-empty-text {
    font-size: 14px;
    color: rgba(0,0,0,0.35);
}

/* 分页 */
.dl-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dl-page-info {
    font-size: 13px;
    color: rgba(0,0,0,0.45);
}
.dl-page-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}
.dl-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    font-size: 13px;
    color: rgba(0,0,0,0.88);
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    box-sizing: border-box;
}
.dl-page-btn:hover:not(.disabled):not(.active) {
    border-color: #1677ff;
    color: #1677ff;
}
.dl-page-btn.active {
    background: #1677ff;
    border-color: #1677ff;
    color: #fff;
}
.dl-page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   应用中心 (ac- 前缀)
   ========================================================================== */

/* Hero 区域 */
.ac-header {
    margin: -20px -20px 0;
    margin-bottom: 20px;
}
.ac-hero {
    position: relative;
    padding: 40px 48px 56px;
    overflow: hidden;
}
.ac-hero-bg {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 0% 0%, rgba(37, 133, 224, 0.28), transparent 55%),
      radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.25), transparent 55%),
      linear-gradient(135deg, #0b2e5f 0%, #1a6fc4 55%, #2585e0 100%);
}
.ac-hero-bg::after {
    content:'';
    position:absolute;
    inset:0;
    background-image:
      linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.ac-hero-content { position: relative; z-index: 2; max-width: 920px; }
.ac-hero-title {
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;
    margin-bottom: 10px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.2);
}
.ac-hero-sub {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    margin-bottom: 28px;
}
.ac-hero-sub strong {
    color: #fff;
    font-weight: 600;
    margin: 0 2px;
}
.ac-hero-search {
    display: flex;
    align-items: center;
    height: 50px;
    background: rgba(255,255,255,0.98);
    border-radius: 10px;
    padding: 0 4px 0 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
.ac-hs-icon {
    width: 18px; height: 18px;
    color: #8c8c8c;
    margin: 0 12px 0 18px;
    flex-shrink: 0;
}
.ac-hs-input {
    flex: 1;
    height: 48px;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
    color: rgba(0,0,0,0.88);
}
.ac-hs-input::placeholder { color: #bfbfbf; }
.ac-hs-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a6fc4 0%, #2585e0 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.ac-hs-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,133,224,0.4); }

/* 容器 */
.ac-container {
    display: grid;
    grid-template-columns: 236px 1fr;
    gap: 20px;
}
.ac-sidebar { display: flex; flex-direction: column; gap: 16px; }
.ac-sidebar-section {
    background: #fff;
    border-radius: 10px;
    padding: 18px 16px;
    border: 1px solid #f0f0f0;
}
.ac-sidebar-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(0,0,0,0.88);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ac-category-list { display: flex; flex-direction: column; gap: 2px; }
.ac-category {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s;
    font-size: 13px;
    color: rgba(0,0,0,0.72);
    position: relative;
}
.ac-category span { flex: 1; }
.ac-category em {
    font-style: normal;
    font-size: 12px;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: rgba(0,0,0,0.55);
    border-radius: 9px;
}
.ac-cat-icon { width: 16px; height: 16px; color: #8c8c8c; }
.ac-category:hover { background: #f5f8ff; color: rgba(0,0,0,0.88); }
.ac-category.active {
    background: linear-gradient(90deg, #e6f0fb, #eff6ff);
    color: #1a6fc4;
    font-weight: 600;
}
.ac-category.active::before {
    content:'';
    position:absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 3px;
    background: #1a6fc4;
    border-radius: 0 3px 3px 0;
}
.ac-category.active .ac-cat-icon { color: #1a6fc4; }
.ac-category.active em { background: #1a6fc4; color: #fff; }

/* 状态筛选 */
.ac-status-filter {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}
.ac-status-btn {
    text-align: center;
    padding: 7px 0;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    color: rgba(0,0,0,0.65);
    background: #fafafa;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.ac-status-btn:hover { background: #f0f5ff; color: #1a6fc4; }
.ac-status-btn.active {
    background: #1a6fc4;
    color: #fff;
    border-color: #1a6fc4;
}

/* 热门推荐 */
.ac-hot-list { display: flex; flex-direction: column; gap: 12px; }
.ac-hot-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 2px;
    border-radius: 6px;
    transition: all 0.2s;
}
.ac-hot-item:hover { background: #fafafa; }
.ac-hot-rank {
    width: 20px; height: 20px;
    border-radius: 5px;
    background: #f0f0f0;
    color: rgba(0,0,0,0.55);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ac-hot-info { flex: 1; min-width: 0; }
.ac-hot-name {
    font-size: 13px;
    color: rgba(0,0,0,0.88);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ac-hot-users {
    font-size: 11px;
    color: rgba(0,0,0,0.45);
    margin-top: 2px;
}

/* 主内容 */
.ac-main { min-width: 0; }
.ac-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.ac-toolbar-left { display: flex; align-items: baseline; gap: 12px; }
.ac-section-label {
    font-size: 18px;
    font-weight: 600;
    color: rgba(0,0,0,0.88);
}
.ac-count-label { font-size: 12px; color: rgba(0,0,0,0.45); }
.ac-toolbar-right { display: flex; align-items: center; gap: 10px; }
.ac-sort-select {
    height: 32px;
    padding: 0 10px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    background: #fff;
    color: rgba(0,0,0,0.72);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    min-width: 120px;
}
.ac-sort-select:focus { border-color: #1a6fc4; }
.ac-view-toggle {
    display: flex;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.ac-view-btn {
    width: 32px; height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(0,0,0,0.55);
    transition: all 0.2s;
}
.ac-view-btn + .ac-view-btn { border-left: 1px solid #e5e6eb; }
.ac-view-btn:hover { background: #f5f8ff; color: #1a6fc4; }
.ac-view-btn.active { background: #1a6fc4; color: #fff; }

/* 网格卡片视图 */
.ac-app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.ac-app-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}
.ac-app-card::after {
    content:'';
    position:absolute;
    top: 0; right: 0;
    width: 120px; height: 120px;
    background: radial-gradient(circle at top right, rgba(37,133,224,0.06), transparent 70%);
    pointer-events: none;
}
.ac-app-card:hover {
    transform: translateY(-3px);
    border-color: #c7dcf8;
    box-shadow: 0 10px 28px rgba(26,111,196,0.12);
}
.ac-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}
.ac-app-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}
.ac-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}
.ac-status.installed { background: #e8f8ef; color: #16a34a; }
.ac-status.available { background: #fff4e6; color: #ff7a00; }

.ac-app-name {
    font-size: 16px;
    font-weight: 600;
    color: rgba(0,0,0,0.88);
    position: relative;
    z-index: 1;
}
.ac-app-desc {
    font-size: 13px;
    color: rgba(0,0,0,0.55);
    line-height: 1.55;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* 表格中的应用简介列：td 必须保持 table-cell 参与行拉伸，
   否则 display:-webkit-box 会把 td 变成块级盒，行底横线错位 */
.ad-table td.ac-app-desc {
    display: table-cell;
    min-height: 0;
    overflow: visible;
    white-space: normal;
}
.ac-app-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 2px;
}
.ac-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(0,0,0,0.45);
}
.ac-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px dashed #f0f0f0;
    margin-top: auto;
}
.ac-update-time { font-size: 11px; color: rgba(0,0,0,0.35); }
.ac-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.ac-btn-open {
    background: #fff;
    border-color: #e5e6eb;
    color: rgba(0,0,0,0.72);
}
.ac-btn-open:hover {
    border-color: #1a6fc4;
    color: #1a6fc4;
    background: #f5f8ff;
}
.ac-btn-install {
    background: #1a6fc4;
    color: #fff;
    border-color: #1a6fc4;
}
.ac-btn-install:hover {
    background: #2585e0;
    border-color: #2585e0;
    box-shadow: 0 4px 10px rgba(37,133,224,0.3);
}

/* 列表视图 */
.ac-app-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.ac-list-row {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.ac-list-row:hover {
    border-color: #c7dcf8;
    background: #fafcff;
}
.ac-list-icon {
    width: 46px; height: 46px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.ac-list-main { flex: 1; min-width: 0; }
.ac-list-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.ac-list-name {
    font-size: 15px;
    font-weight: 600;
    color: rgba(0,0,0,0.88);
}
.ac-list-desc {
    font-size: 13px;
    color: rgba(0,0,0,0.55);
    line-height: 1.5;
    margin-bottom: 6px;
}
.ac-list-sub {
    display: flex;
    align-items: center;
    gap: 16px;
}
.ac-list-actions { flex-shrink: 0; }

/* 空状态 */
.ac-empty {
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #fff;
    border: 1px dashed #e5e6eb;
    border-radius: 10px;
    margin-bottom: 20px;
}
.ac-empty-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ac-empty-text { font-size: 14px; color: rgba(0,0,0,0.55); font-weight: 500; }
.ac-empty-sub { font-size: 12px; color: rgba(0,0,0,0.35); }

/* 分页 */
.ac-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* textarea / select 扩展（基础 .ad-input 定义见上方表单区） */
textarea.ad-input { height: auto; padding: 6px 10px; line-height: 1.5; resize: vertical; }
select.ad-input { cursor: pointer; }



/* ==========================================================================
   物业公司表单 - 新增字段样式
   ========================================================================== */
.ad-form-row {
  display: flex;
  gap: 16px;
  flex-direction: row !important;
}
.ad-form-row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ad-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 4px;
}
.ad-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #444;
  font-size: 14px;
  user-select: none;
}
.ad-radio input[type=radio] {
  width: 16px;
  height: 16px;
  accent-color: #1578FE;
  cursor: pointer;
  margin: 0;
}

/* ==========================================================================
   物业公司弹窗 - 布局自适应 (贴合内容区,不覆盖侧边栏)
   ========================================================================== */

/* 弹窗容器:限制在内容区域内(侧边栏右侧到视口右边) */
.ad-modal:has(.ad-company-modal) {
  left: var(--pmc-side-width) !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
}

/* 侧边栏折叠时:弹窗容器左边跟随收缩(弹窗附加到 body, 通过 :has() 联动布局折叠态) */
body:has(.ad-layout.collapsed) .ad-modal:has(.ad-company-modal) {
  left: var(--pmc-side-collapsed-width) !important;
}

.ad-company-modal {
  width: 1080px !important;
  max-width: calc(100% - 48px);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ad-company-modal .ad-modal-header {
  /* 标题+关闭按钮:整体往上挪(顶距从26→14px) + 底部加分割线(之前 border:none 被人为清空了) */
  padding: 14px 40px 12px;
  border: none;
  border-bottom: 1px solid #e5e7eb;
}
.ad-company-modal .ad-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1d2129;
  letter-spacing: 0.2px;
}
.ad-company-modal .ad-modal-body {
  padding: 16px 40px 0;
  overflow-y: auto;
  flex: 1;
  max-height: calc(100vh - 220px);
}
.ad-company-modal .ad-modal-footer {
  padding: 20px 40px 28px;
  border-top: 1px solid #f2f3f5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
/* ---------- 分组 Section(单页表单分块) ---------- */
.ad-form-section {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 10px;
  padding: 18px 20px 20px;
  margin-bottom: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ad-form-section:hover {
  border-color: #dfe2e7;
  box-shadow: 0 4px 14px rgba(29,33,41,0.04);
}
.ad-form-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #eef0f3;
}
.ad-form-section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #1d2129;
}
.ad-form-section-index {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1578FE, #3b8cff);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(21,120,254,0.2);
}
.ad-form-section-desc {
  font-size: 12px;
  color: #86909c;
}

/* 最后一个 section 去掉底部间距,因为 footer 会提供 padding */
.ad-form-section:last-of-type {
  margin-bottom: 4px;
}

/* ---------- 表单项 ---------- */
.ad-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}
.ad-form-grid .ad-form-item {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
}
.ad-form-grid .ad-form-item.ad-form-span-2 {
  grid-column: span 2;
}

/* --- 参考图专用:左label(固定宽) 右控件 2列栅格 --- */
.ad-form-grid-labeled {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px 20px;
  align-items: center;
}
.ad-form-grid-labeled .ad-grid-label {
  text-align: right;
  font-size: 14px;
  color: #1f2937;
  font-weight: 500;
  line-height: 1.4;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}
.ad-form-grid-labeled .ad-grid-label .req {
  color: #dc2626;
  font-weight: 600;
}
.ad-form-grid-labeled .ad-grid-control {
  min-width: 0;
  grid-column: span 1;
}
.ad-form-grid-labeled .ad-grid-control.ad-grid-span2 {
  grid-column: 2 / span 1;
}
.ad-form-grid-labeled .ad-grid-rowspan-2col {
  display: grid;
  grid-template-columns: 120px 1fr 120px 1fr;
  gap: 18px 20px;
  align-items: center;
}
.ad-form-grid-labeled .ad-grid-rowspan-2col .ad-grid-label {
  min-height: auto;
}

/* 红上传按钮 */
.ad-btn-upload-red {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #409EFF;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  height: 34px;
  transition: background 0.15s;
}
.ad-btn-upload-red:hover { background: #337ecc; color:#fff; }

/* 上传控件行(文字+右侧按钮) */
.ad-upload-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 36px;
  border: 1px dashed #e5e6eb;
  background: #fafbfc;
  border-radius: 6px;
  padding: 0 12px;
}
.ad-upload-line .ad-upload-tip {
  font-size: 12px;
  color: #86909c;
  line-height: 1.4;
}
.ad-upload-line + .ad-license-preview {
  margin-top: 10px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  padding: 8px;
  background: #fff;
  display: none;
  position: relative;
}
.ad-upload-line + .ad-license-preview.show { display: inline-block; }
.ad-upload-line + .ad-license-preview img {
  max-width: 200px;
  max-height: 140px;
  border-radius: 4px;
  display: block;
}
.ad-upload-line + .ad-license-preview .ad-license-del {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ff4d4f;
  color: #fff;
  border: 2px solid #fff;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.ad-upload-line + .ad-license-preview .ad-license-del:hover { background: #d9363e; }

/* 预览显示兜底：确保带 .show 的图片预览框必定显示（不受相邻选择器/优先级影响） */
.ad-license-preview.show { display: inline-block !important; }

/* 单选 radio 组 */
.ad-radio-inline {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.ad-radio-inline label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #1f2937;
  cursor: pointer;
  margin: 0;
  line-height: 1;
}
.ad-radio-inline input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #1677ff;
  cursor: pointer;
}

/* ---------- 参考图表单专用行级栅格(彻底解决嵌套错位) ---------- */
/* 整行：1个label(140px右对齐,统一社会信用代码9字+冒号不换行) + 1个控件(1fr) */
.ad-form-line {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px 20px;
  align-items: center;
  margin-bottom: 14px;
}
/* 双列行：2个label(各140) + 2个控件(各1fr) 四列等宽 */
.ad-form-line.ad-form-line-2 {
  grid-template-columns: 140px minmax(0, 1fr) 140px minmax(0, 1fr);
}
/* 三列行：3个label(各140) + 3个控件(各1fr) 六列等宽 */
.ad-form-line.ad-form-line-3 {
  grid-template-columns: 140px minmax(0, 1fr) 140px minmax(0, 1fr) 140px minmax(0, 1fr);
}
/* 行内label(所有行共用) */
.ad-form-line > label,
.ad-form-line .ad-line-label {
  text-align: right;
  font-size: 14px;
  color: #1f2937;
  font-weight: 500;
  line-height: 1.4;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}
.ad-form-line > label .req,
.ad-form-line .ad-line-label .req {
  color: #dc2626;
  font-weight: 600;
}
/* 如果是textarea/上传组件/radio组这种多行高的, align-items改成start */
.ad-form-line.ad-form-align-start,
.ad-form-line.ad-form-line-2.ad-form-align-start {
  align-items: flex-start;
  padding-top: 6px;
}
.ad-form-line.ad-form-align-start > label,
.ad-form-line.ad-form-align-start .ad-line-label {
  padding-top: 4px;
}
/* 下拉/输入框/textarea 行内控件宽度自适应 */
.ad-form-line .ad-input,
.ad-form-line .ad-select,
.ad-form-line textarea.ad-input {
  width: 100%;
  box-sizing: border-box;
}
/* radio组高度自适应(不要居中36px) */
.ad-form-line > .ad-radio-inline {
  min-height: 36px;
}

/* 底部单居中提交按钮(大黑块) */
.ad-modal-footer-single {
  padding: 14px 24px 24px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
  border-top: none !important;
  background: transparent !important;
}
.ad-modal-footer-single button[type="submit"] {
  background: #1f2937;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 9px 56px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  min-width: 160px;
}
.ad-modal-footer-single button[type="submit"]:hover { background: #111827; color:#fff; }

.ad-company-modal .ad-label {
  font-size: 13px;
  color: #4e5969;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}
.ad-company-modal .ad-label.required::before {
  content: '*';
  color: #f53f3f;
  font-weight: 600;
}

/* 输入框：无边框风格 → 下划线聚焦 */
.ad-company-modal .ad-input,
.ad-company-modal .ad-select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  font-size: 14px;
  color: #1d2129;
  background: #fafbfc;
  transition: all 0.2s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.ad-company-modal .ad-input:hover,
.ad-company-modal .ad-select:hover {
  border-color: #c9cdd4;
  background: #fff;
}
.ad-company-modal .ad-input:focus,
.ad-company-modal .ad-select:focus {
  border-color: #1578FE;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(21, 120, 254, 0.10);
}
.ad-company-modal .ad-input::placeholder {
  color: #a9aeb8;
}

/* 实时错误提示 */
.ad-form-item .ad-field-error {
  color: #f53f3f;
  font-size: 12px;
  line-height: 1.2;
  margin-top: 4px;
  min-height: 0;
  display: none;
  padding-left: 2px;
}
.ad-form-item.error .ad-field-error,
.ad-form-item.has-error .ad-field-error {
  display: block;
}
.ad-form-item.error .ad-input,
.ad-form-item.has-error .ad-input,
.ad-form-item.error .ad-select,
.ad-form-item.has-error .ad-select {
  border-color: #f53f3f !important;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(245,63,63,0.08);
}
.ad-form-item.has-success .ad-input,
.ad-form-item.has-success .ad-select {
  border-color: #00b42a;
}

/* 下一步按钮禁用态 */
.ad-btn.is-disabled,
.ad-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.1);
  transform: none !important;
  box-shadow: none !important;
}

/* 按钮组对齐 */
.ad-footer-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ---------- 上传组件 (紧凑版) ---------- */
.ad-upload-group {
  display: flex;
  gap: 16px;
  align-items: center;
}
.ad-upload-box {
  flex: 1;
  height: 92px;
  border: 1.5px dashed #e5e6eb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafbfc;
  position: relative;
  overflow: hidden;
  padding: 0 16px;
}
.ad-upload-box:hover {
  border-color: #1578FE;
  background: #f0f7ff;
}
.ad-upload-box input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.ad-upload-box-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #e6f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1578FE;
  flex-shrink: 0;
}
.ad-upload-box-text-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  text-align: left;
}
.ad-upload-box-text {
  font-size: 13px;
  color: #4e5969;
  line-height: 1.3;
}
.ad-upload-box-text em {
  color: #1578FE;
  font-style: normal;
  font-weight: 500;
  margin: 0 2px;
}
.ad-upload-box-hint {
  font-size: 12px;
  color: #a9aeb8;
}
.ad-upload-preview {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 1px solid #e5e6eb;
  object-fit: cover;
  display: none;
  flex-shrink: 0;
}
.ad-upload-preview-wrap {
  position: relative;
  flex-shrink: 0;
}
.ad-upload-preview-wrap .ad-upload-preview-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f53f3f;
  color: #fff;
  border: 2px solid #fff;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ---------- 步骤底部按钮 ---------- */
.ad-company-modal .ad-btn {
  height: 36px;
  padding: 0 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #e5e6eb;
  background: #fff;
  color: #4e5969;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ad-company-modal .ad-btn:hover {
  color: #1578FE;
  border-color: #1578FE;
}
.ad-company-modal .ad-btn-primary {
  background: #1578FE;
  border-color: #1578FE;
  color: #fff;
  min-width: 96px;
  justify-content: center;
}
.ad-company-modal .ad-btn-primary:hover {
  background: #0e66d4;
  border-color: #0e66d4;
  color: #fff;
}
.ad-company-modal .ad-btn-primary[disabled] {
  background: #94bfff;
  border-color: #94bfff;
  color: #fff;
  cursor: not-allowed;
  box-shadow: none;
}
.ad-company-modal .ad-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.ad-company-modal .ad-btn-text {
  background: transparent !important;
  border-color: transparent !important;
  color: #4e5969 !important;
  padding: 0 10px;
}
.ad-company-modal .ad-btn-text:hover {
  color: #1578FE !important;
}

/* ==========================================================================
   物业公司列表页新增样式
   ========================================================================== */
.ad-wrap { padding: 16px; }
.ad-content-card { background: #fff; border-radius: 8px; border: 1px solid #e5e6eb; padding: 16px; }
.ad-toolbar-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.ad-toolbar-left { display: flex; align-items: center; gap: 8px; }
.ad-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ad-form-group label { font-size: 13px; font-weight: 500; color: #4e5969; }
.ad-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 0; color: #BFBFBF; gap: 8px; }
.ad-empty-img { width: 68px; height: 68px; display: block; object-fit: contain; }
.ad-empty-text { color: #BFBFBF; }
.ad-dropdown { position: relative; display: inline-block; }
.ad-dropdown-menu { display: none; position: absolute; right: 0; top: 100%; min-width: 140px; background: #fff; border: 1px solid #e5e6eb; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 1000; padding: 4px 0; margin-top: 4px; }
.ad-dropdown-menu a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 12px; color: #4e5969; text-decoration: none; }
.ad-dropdown-menu a:hover { background: #f5f7fa; color: #1578FE; }
.ad-dropdown-menu a.danger:hover { color: #dc2626; }
.ad-btn-primary-outline { background: #fff; color: #1578FE; border-color: #1578FE; }
.ad-btn-primary-outline:hover { background: #e6f4ff; color: #1578FE; }
.ad-btn-success-outline { background: #fff; color: #16a34a; border-color: #16a34a; }
.ad-btn-success-outline:hover { background: #f0fdf4; color: #15803d; }
.ad-btn-danger-outline { background: #fff; color: #dc2626; border-color: #dc2626; }
.ad-btn-danger-outline:hover { background: #fef2f2; color: #b91c1c; }

/* ---------- Pill Radio ---------- */
.ad-term-group {
  display: flex;
  gap: 10px;
  padding-top: 3px;
  flex-wrap: wrap;
}
.ad-term-group .ad-radio-pill {
  position: relative;
}
.ad-term-group .ad-radio-pill input[type=radio] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.ad-term-group .ad-radio-pill span {
  display: inline-block;
  padding: 7px 22px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #4e5969;
  background: #fff;
  transition: all 0.2s;
  user-select: none;
}
.ad-term-group .ad-radio-pill:hover span {
  border-color: #94bfff;
  color: #1578FE;
}
.ad-term-group .ad-radio-pill input[type=radio]:checked + span {
  border-color: #1578FE;
  background: #1578FE;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(21, 120, 254, 0.25);
}

/* ---------- 开启状态：大尺寸 Switch ---------- */
.ad-status-switch {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 3px;
}
.ad-status-switch .ad-switch-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 14px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  transition: all 0.2s;
  background: #fff;
  color: #4e5969;
  font-size: 13px;
}
.ad-status-switch .ad-switch-item:hover {
  border-color: #94bfff;
}
.ad-status-switch .ad-switch-item input {
  accent-color: #1578FE;
  width: 15px;
  height: 15px;
  margin: 0;
}
.ad-status-switch .ad-switch-item:has(input:checked) {
  border-color: #1578FE;
  background: #e6f0ff;
  color: #1578FE;
  font-weight: 500;
}

/* ==========================================================================
   物业公司基本设置弹窗
   ========================================================================== */
.ad-base-setting-list {
  display: flex;
  flex-direction: column;
}
.ad-base-setting-row {
  padding: 16px 20px;
  border-bottom: 1px solid #eef0f3;
}
.ad-base-setting-row:last-child {
  border-bottom: none;
}
.ad-base-setting-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ad-base-setting-name {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}
.ad-base-setting-desc {
  margin-top: 8px;
  font-size: 13px;
  color: #8a94a6;
  line-height: 1.6;
}
.ad-base-setting-switch.ad-switch {
  margin: 0;
  flex-shrink: 0;
}
.ad-base-setting-switch.ad-switch input[type="checkbox"] {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #d1d5db;
}
.ad-base-setting-switch.ad-switch input[type="checkbox"]::after {
  width: 18px;
  height: 18px;
}
.ad-base-setting-switch.ad-switch input[type="checkbox"]:checked {
  background: #409EFF;
}
.ad-base-setting-switch.ad-switch input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

