@import url("components.css");

/* ============================================================
   全局设计令牌基座（Design Tokens）
   单一事实来源：所有页面/组件均引用此处变量。
   配置中心 config-common.css 的 --cfg-* 通过 var() 复用本基座，
   实现"换肤只改此处"。所有颜色值对齐既有硬编码（主色 #ff6600）。
   ============================================================ */
:root {
  /* 品牌主色 */
  --color-primary: #ff6600;
  --color-primary-hover: #e55d00;
  --color-primary-active: #d45400;
  --color-primary-light: #ff9933;
  --color-primary-soft: rgba(255, 102, 0, 0.10);
  --color-primary-soft-2: rgba(255, 102, 0, 0.16);

  /* 中性色 / 背景 / 表面 */
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-surface-2: #fafbfc;

  /* 边框 */
  --color-border: #e4e7eb;
  --color-border-strong: #d0d5dd;
  --color-border-light: #e8ecf1;

  /* 文本 */
  --color-text: #1f2328;
  --color-text-muted: #606770;
  --color-text-subtle: #909399;
  --color-text-faint: #8b949e;

  /* 链接 */
  --color-link: #1f6feb;
  --color-link-hover: #1158c7;

  /* 语义色 */
  --color-success: #238636;
  --color-success-soft: rgba(35, 134, 54, 0.12);
  --color-danger: #da3633;
  --color-danger-soft: rgba(218, 54, 51, 0.12);
  --color-warning: #e67e22;
  --color-warning-soft: #fff3e0;
  --color-info: #1f6feb;
  --color-info-soft: rgba(31, 111, 235, 0.10);
  /* 涨跌专用（与 KPI 现有色对齐） */
  --color-up: #3fb950;
  --color-down: #f85149;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* 间距尺度 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --shadow-primary: 0 2px 8px rgba(255, 102, 0, 0.30);

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
  --font-mono: 'Menlo', 'Consolas', 'SFMono-Regular', monospace;

  /* 层级 */
  --z-nav: 1005;
  --z-dropdown: 1010;
  --z-modal: 1000;
  --z-toast: 99999;

  /* 动效 */
  --transition: 0.2s ease;

  /* 布局 */
  --sidebar-w: 172px;
  --sidebar-w-collapsed: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
    background: #f5f7fa;
    background-attachment: fixed;
    color: #1f2328;
    min-height: 100vh;
}
a { color: #1f6feb; text-decoration: none; }
a:hover { color: #1158c7; }
h1, h2, h3, h4, h5 { color: #1f2328; }

/* 品牌头 */
.brand-header {
    background: #fff;
    height: 56px;
    border-bottom: 1px solid #e8ecf1;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
}
.brand-left { display: flex; align-items: center; gap: 12px; }
.brand-logo {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, #ff6600 0%, #ff9933 100%);
    color: #fff; font-weight: 700; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
}
.brand-info .brand-name { font-size: 16px; font-weight: 600; color: #1f2328; }
.brand-info .brand-slogan { font-size: 12px; color: #606770; margin-top: 2px; }
.brand-right { display: flex; align-items: center; gap: 20px; position: relative; }
.back-home { color: #606770; font-size: 14px; padding: 6px 12px; border-radius: 6px; transition: all 0.2s; }
.back-home:hover { background: #f0f2f5; color: #1f2328; }
.user-info { display: flex; align-items: center; gap: 8px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: #f0f2f5; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.user-name { color: #1f2328; font-size: 14px; }

/* 顶部导航 */
.top-nav {
    background: #fff;
    border-bottom: 1px solid #e8ecf1;
    padding: 0 24px;
    display: flex; gap: 0; overflow-x: auto; white-space: nowrap;
}
.top-nav a {
    padding: 12px 16px; color: #666; font-size: 13px;
    border-bottom: 2px solid transparent; transition: all 0.2s;
}
.top-nav a:hover { color: #1f2328; background: #f5f7fa; }
.top-nav a.active { color: #ff6600; border-bottom-color: #ff6600; background: rgba(255,102,0,0.06); }

/* 顶部导航 - 旧版兼容 */
.header {
    background: #ffffff;
    height: 64px; border-bottom: 1px solid #e4e7eb;
    display: flex; align-items: center; padding: 0 32px;
    position: sticky; top: 0; z-index: 100; gap: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.header .logo { font-size: 16px; font-weight: 700; color: #1f2328; }
.header .nav { display: flex; gap: 4px; flex: 1; }
.header .nav a { padding: 8px 16px; color: #606770; border-radius: 6px; font-size: 14px; transition: all 0.2s; }
.header .nav a:hover { background: #f5f7fa; color: #1f2328; }
.header .nav a.active { background: rgba(255,102,0,0.08); color: #ff6600; }

/* 主体 */
.main { padding: 24px 32px; max-width: 1600px; margin: 0 auto; }
.page-title { font-size: 22px; font-weight: 600; margin-bottom: 20px; color: #1f2328; }

/* 统一页面级标题（投放中心等分组成员页共用，确保头部字号/颜色一致） */
.ao-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.ao-page-header h2 { margin: 0; font-size: 20px; font-weight: 700; color: #1a1a2e; display: flex; align-items: center; gap: 8px; }
.ao-page-header p { margin: 0; color: #8f959e; font-size: 13px; }

/* 欢迎横幅 */
.welcome-banner {
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
    border-radius: 12px; padding: 20px 24px; margin-bottom: 24px;
    display: flex; align-items: center; border: 1px solid #c8e0ff;
}
.welcome-text { display: flex; align-items: center; gap: 12px; }
.welcome-icon { font-size: 24px; }
.welcome-banner h2 { font-size: 16px; color: #1f2328; font-weight: 600; }
.welcome-banner p { font-size: 13px; color: #606770; margin-top: 4px; }

/* 卡片 */
.card { background: #ffffff; border: 1px solid #e4e7eb; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); transition: all 0.2s; position: relative; }
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }

/* 卡片网格 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card { background: #ffffff; border: 1px solid #e4e7eb; border-radius: 12px; padding: 20px; transition: all 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.stat-card:hover { border-color: #1f6feb; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(31,111,235,0.12); }
.stat-card .label { font-size: 13px; color: #606770; margin-bottom: 8px; }
.stat-card .value { font-size: 28px; font-weight: 700; color: #1f2328; }
.stat-card .trend { font-size: 12px; color: #238636; margin-top: 4px; }
.stat-card .trend.down { color: #da3633; }

/* 功能卡片 */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.feature-card { background: #ffffff; border: 1px solid #e4e7eb; border-radius: 12px; padding: 20px; cursor: pointer; transition: all 0.2s; display: block; color: inherit; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.feature-card:hover { border-color: #1f6feb; transform: translateY(-2px); color: inherit; box-shadow: 0 6px 16px rgba(31,111,235,0.12); }
.feature-card .icon { font-size: 28px; margin-bottom: 12px; }
.feature-card .title { font-size: 15px; font-weight: 600; color: #1f2328; margin-bottom: 6px; }
.feature-card .desc { font-size: 12px; color: #606770; line-height: 1.5; }

/* 品牌切换标签 */
.brand-tabs, .brand-nav { display: flex; gap: 8px; margin-bottom: 16px; }
.brand-tab, .brand-btn {
    padding: 8px 18px; border-radius: 8px;
    background: #ffffff; border: 1px solid #e4e7eb;
    color: #606770; font-size: 14px; cursor: pointer;
    text-decoration: none; display: inline-block;
    transition: all 0.2s;
}
.brand-tab:hover, .brand-btn:hover { border-color: #1f6feb; color: #1f6feb; }
.brand-tab.active, .brand-btn.active { background: #1f6feb; border-color: #1f6feb; color: #ffffff; }
.brand-tab.guai.active, .brand-btn.guai.active { background: #238636; border-color: #238636; color: #ffffff; }
.brand-tab.mak.active, .brand-btn.mak.active { background: #8957e5; border-color: #8957e5; color: #ffffff; }

/* 品牌小标签 */
.brand-tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.brand-tag.guai { background: rgba(35,134,54,0.1); color: #238636; }
.brand-tag.mak { background: rgba(137,87,229,0.1); color: #8957e5; }
.brand-tag.all { background: rgba(249,115,22,0.12); color: #f97316; }
/* 胶囊式品牌切换（线索订单风格） */
.brand-tabs {
    padding: 6px;
    background: #f0f2f5;
    border-radius: 10px;
    width: fit-content;
}
.brand-tabs .tab-item {
    padding: 9px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    background: transparent;
    color: #606770;
    text-decoration: none;
    display: inline-block;
}
.brand-tabs .tab-item:hover { color: #1f2328; }
.brand-tabs .tab-item.active {
    background: #fff;
    color: #ff6600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card > .data-header .brand-tabs { position: absolute; top: 0; right: 20px; margin-bottom: 0; z-index: 1; }
.card > .brand-tabs { position: absolute; top: 0; right: 20px; margin-bottom: 0; z-index: 1; }


/* 筛选栏 */
.filter-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; color: #606770; }
.form-group input, .form-group select,
input[type="text"], input[type="date"], input[type="number"], input[type="password"], input[type="email"], select, textarea {
    background: #ffffff; border: 1px solid #d0d7de; border-radius: 6px;
    padding: 8px 12px; color: #1f2328; font-size: 14px; min-width: 140px; outline: none;
    transition: all 0.2s;
}
.form-group input:focus, .form-group select:focus, input:focus, select:focus, textarea:focus { border-color: #1f6feb; box-shadow: 0 0 0 3px rgba(31,111,235,0.1); }

/* 按钮 */
.btn { padding: 8px 18px; border-radius: 6px; border: 1px solid transparent; font-size: 14px; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.btn-primary { background: #1f6feb; color: #fff; }
.btn-primary:hover { background: #1158c7; box-shadow: 0 2px 8px rgba(31,111,235,0.3); }
.btn-default { background: #ffffff; color: #1f2328; border-color: #d0d7de; }
.btn-default:hover { background: #f5f7fa; border-color: #1f6feb; color: #1f6feb; }
.btn-danger { background: #da3633; color: #fff; }
.btn-danger:hover { background: #b62324; box-shadow: 0 2px 8px rgba(218,54,51,0.3); }
.btn-success { background: #238636; color: #fff; }
.btn-success:hover { background: #1a7f37; box-shadow: 0 2px 8px rgba(35,134,54,0.3); }
.btn-small { padding: 4px 12px; font-size: 12px; }

/* 表格 */
table, .data-table { width: 100%; border-collapse: collapse; background: transparent; color: #1f2328; }
table thead, .data-table thead { background: #ffffff; }
table th, .data-table th { padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; color: #606770; border-bottom: 1px solid #e4e7eb; background: #fafbfc; }
table td, .data-table td { padding: 12px 16px; font-size: 14px; color: #1f2328; border-bottom: 1px solid #e4e7eb; }
table tbody tr:hover, .data-table tbody tr:hover { background: #f5f7fa; }
table .empty, .data-table .empty, td.empty { text-align: center; color: #606770; padding: 40px; font-size: 14px; }

/* 标签 */
.tag { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag-success { background: rgba(35,134,54,0.1); color: #238636; }
.tag-warning { background: rgba(150,80,0,0.1); color: #9a6700; }
.tag-danger  { background: rgba(218,54,51,0.1); color: #da3633; }
.tag-info    { background: rgba(31,111,235,0.1); color: #1f6feb; }
.tag-default { background: #f0f2f5; color: #606770; }

/* 分页 */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.pagination button { background: #ffffff; border: 1px solid #d0d7de; color: #1f2328; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; transition: all 0.2s; }
.pagination button:hover { background: #f5f7fa; border-color: #1f6feb; color: #1f6feb; }
.pagination button.active { background: #1f6feb; border-color: #1f6feb; color: #fff; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* 表单卡片 */
.form-card { background: #ffffff; border: 1px solid #e4e7eb; border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.form-card h3 { font-size: 16px; font-weight: 600; color: #1f2328; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e4e7eb; }

/* 提示 */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; border-left: 3px solid; }
.alert-info { background: rgba(31,111,235,0.08); border-color: #1f6feb; color: #1158c7; }
.alert-success { background: rgba(35,134,54,0.08); border-color: #238636; color: #1a7f37; }
.alert-warning { background: rgba(154,103,0,0.08); border-color: #9a6700; color: #7d5200; }
.alert-danger { background: rgba(218,54,51,0.08); border-color: #da3633; color: #b62324; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f5f7fa; }
::-webkit-scrollbar-thumb { background: #d0d7de; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #afb8c1; }

/* 图表 */
.chart-bar { display: flex; align-items: flex-end; gap: 4px; height: 240px; padding: 16px 0; overflow-x: auto; }
.chart-bar .bar-item { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 32px; }
.chart-bar .bar { width: 24px; background: linear-gradient(180deg, #1f6feb 0%, #1158c7 100%); border-radius: 3px 3px 0 0; }
.chart-bar .bar-date { font-size: 10px; color: #606770; }
.chart-bar .bar-value { font-size: 11px; color: #1f2328; font-weight: 600; }

@media (max-width: 768px) {
    .brand-header, .header { padding: 0 16px; }
    .top-nav { padding: 0 16px; }
    .main { padding: 16px; }
    .form-group input, .form-group select { min-width: 100px; }
}

/* 版本徽章 */
.version-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #1f6feb 0%, #1158c7 100%);
    color: #ffffff !important;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(31,111,235,0.3);
}
.version-badge:hover {
    background: linear-gradient(135deg, #1158c7 0%, #1f6feb 100%);
    box-shadow: 0 2px 8px rgba(31,111,235,0.4);
    transform: translateY(-1px);
    color: #ffffff !important;
}

/* ========== 中控台样式补充 ========== */

/* 统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stats-grid .stat-card {
    background: #ffffff;
    border: 1px solid #e4e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.stats-grid .stat-card:hover {
    border-color: #1f6feb;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(31,111,235,0.12);
}

.stats-grid .stat-card .stat-label {
    font-size: 13px;
    color: #606770;
    margin-bottom: 8px;
}

.stats-grid .stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1f2328;
    margin-bottom: 8px;
}

.stats-grid .stat-card .stat-trend {
    font-size: 12px;
    color: #606770;
}

/* 功能列表区域 */
.func-section {
    margin-bottom: 24px;
}

.func-section .section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2328;
    margin-bottom: 16px;
}

.func-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.func-card {
    background: #ffffff;
    border: 1px solid #e4e7eb;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.func-card:hover {
    border-color: #1f6feb;
    transform: translateY(-2px);
    color: inherit;
    box-shadow: 0 6px 16px rgba(31,111,235,0.12);
}

.func-card .card-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.func-card .card-icon.blue { background: rgba(31,111,235,0.1); }
.func-card .card-icon.green { background: rgba(35,134,54,0.1); }
.func-card .card-icon.orange { background: rgba(217,115,13,0.12); }
.func-card .card-icon.purple { background: rgba(137,87,229,0.1); }
.func-card .card-icon.red { background: rgba(218,54,51,0.1); }
.func-card .card-icon.cyan { background: rgba(48,181,207,0.12); }
.func-card .card-icon.pink { background: rgba(255,107,157,0.12); }
.func-card .card-icon.gray { background: #f0f2f5; }

.func-card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2328;
}

.func-card .card-desc {
    font-size: 12px;
    color: #606770;
}

/* 系统信息区域 */
.sys-info {
    background: #ffffff;
    border: 1px solid #e4e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.sys-info .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.sys-info .info-item .info-label {
    font-size: 12px;
    color: #606770;
    margin-bottom: 4px;
}

.sys-info .info-item .info-value {
    font-size: 14px;
    color: #1f2328;
    font-weight: 500;
}

/* 开通提示弹窗 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: #ffffff;
    border: 1px solid #e4e7eb;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e4e7eb;
}

.modal-header .modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2328;
}

.modal-header .modal-close {
    background: none;
    border: none;
    color: #606770;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.modal-header .modal-close:hover { color: #1f2328; }

.modal-body {
    padding: 30px 20px;
    text-align: center;
}

.modal-body .modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.modal-body .modal-text {
    font-size: 14px;
    color: #1f2328;
    line-height: 1.6;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e4e7eb;
    display: flex;
    justify-content: center;
}

/* 平台导航 */
.platform-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.platform-nav .platform-btn {
    padding: 10px 20px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e4e7eb;
    color: #606770;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.platform-nav .platform-btn:hover {
    border-color: #1f6feb;
    color: #1f6feb;
    transform: translateY(-1px);
}

.platform-nav .platform-btn.active {
    background: #1f6feb;
    border-color: #1f6feb;
    color: #ffffff;
}

/* 步骤导航 */
.step-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 12px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e4e7eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.step-nav .step-btn {
    padding: 8px 16px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: #606770;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.step-nav .step-btn:hover {
    background: #f5f7fa;
    color: #1f2328;
}

.step-nav .step-btn.active {
    background: rgba(31,111,235,0.1);
    border-color: rgba(31,111,235,0.2);
    color: #1f6feb;
}

/* 只读输入框 */
.input-readonly {
    background: #f5f7fa !important;
    border: 1px solid #e4e7eb !important;
    color: #606770 !important;
    cursor: not-allowed !important;
}

.brand-nav a {
    padding: 8px 18px; border-radius: 8px;
    background: #ffffff; border: 1px solid #e4e7eb;
    color: #606770; font-size: 14px; cursor: pointer;
    text-decoration: none; display: inline-block;
    transition: all 0.2s;
}
.brand-nav a:hover { border-color: #1f6feb; color: #1f6feb; }
.brand-nav a.active { background: #1f6feb; border-color: #1f6feb; color: #ffffff; }
.brand-nav a.active.guai { background: #238636; border-color: #238636; color: #ffffff; }
.brand-nav a.active.mak { background: #8957e5; border-color: #8957e5; color: #ffffff; }


/* 导出按钮美化 */
.btn-export {
    padding: 6px 14px; border-radius: 6px;
    background: linear-gradient(135deg, #238636, #2ea043);
    color: #fff; font-size: 12px; font-weight: 500;
    border: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
    box-shadow: 0 2px 6px rgba(35,134,54,0.3);
    transition: all 0.2s;
}
.btn-export:hover {
    background: linear-gradient(135deg, #2ea043, #3fb950);
    box-shadow: 0 4px 12px rgba(35,134,54,0.4);
    transform: translateY(-1px);
}


/* 用户下拉菜单 */
.user-info { position: relative; cursor: pointer; }
.dropdown-arrow { font-size: 10px; color: #606770; margin-left: 4px; }
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #ffffff;
    border: 1px solid #e4e7eb;
    border-radius: 8px;
    min-width: 120px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    overflow: hidden;
    margin-top: 4px;
}
.dropdown-menu.show { display: block; }
.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: #1f2328;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}
.dropdown-menu a:hover { background: #f5f7fa; color: #1f6feb; }
.dropdown-menu a:not(:last-child) { border-bottom: 1px solid #e4e7eb; }


/* 日期输入框亮色主题 */
input[type="date"], input[type="datetime-local"], input[type="time"], input[type="month"] {
    color-scheme: light;
    cursor: pointer;
    min-width: 160px;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    padding: 2px;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* 通用白色卡片hover效果 - 统一所有页面的卡片交互 */
.main div[style*=background:#ffffff][style*=border-radius:12px] {
    transition: all 0.2s ease;
}
.main div[style*=background:#ffffff][style*=border-radius:12px]:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* 确保所有可点击元素有过渡效果 */
a, button, .clickable {
    transition: all 0.2s ease;
}

/* 数据中心模块导航 */
/* 数据中心顶栏 */
.data-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e4e7eb;
    flex-wrap: wrap;
    gap: 12px;
}
.module-nav {
    display: flex;
    gap: 4px;
}
.module-nav a {
    padding: 8px 18px;
    border-radius: 8px;
    background: transparent;
    color: #606770;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}
.module-nav a:hover { color: #ff6600; background: rgba(255,102,0,0.06); }
.module-nav a.active { color: #ff6600; background: rgba(255,102,0,0.08); font-weight: 600; }

/* 品牌下拉 */
.brand-select-wrap { position: relative; flex-shrink: 0; }
.brand-select-btn {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid #d0d5dd;
    background: #fff;
    color: #1f2328;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.2s;
}
.brand-select-btn:hover { border-color: #ff6600; }
.brand-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #e4e7eb;
    border-radius: 10px;
    padding: 4px 0;
    min-width: 140px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 1005;
}
.brand-select-dropdown.show { display: block; }
.brand-select-dropdown a {
    display: block;
    padding: 8px 16px;
    color: #1f2328;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s;
}
.brand-select-dropdown a:hover { background: #f5f7fa; }
.brand-select-dropdown a.active { color: #ff6600; font-weight: 600; background: #fff8f2; }

/* 平台筛选卡片 - 激活态 */
.feature-card.active {
    border-color: #1f6feb;
    background: rgba(31, 111, 235, 0.04);
    box-shadow: 0 4px 12px rgba(31, 111, 235, 0.15);
}
.feature-card.guai.active {
    border-color: #238636;
    background: rgba(35, 134, 54, 0.04);
    box-shadow: 0 4px 12px rgba(35, 134, 54, 0.15);
}
.feature-card.mak.active {
    border-color: #8957e5;
    background: rgba(137, 87, 229, 0.04);
    box-shadow: 0 4px 12px rgba(137, 87, 229, 0.15);
}

/* 紧凑卡片布局 - 用于筛选导航 */
.filter-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.filter-cards .feature-card {
    padding: 14px 16px;
    text-align: center;
}
.filter-cards .feature-card .icon {
    font-size: 24px;
    margin-bottom: 8px;
}
.filter-cards .feature-card .title {
    font-size: 14px;
    margin-bottom: 2px;
}
.filter-cards .feature-card .desc {
    font-size: 11px;
}

/* ===== 统一卡片/容器/表格系统（an- 前缀，跨模块通用） ===== */
.an-container { max-width: 1600px; margin: 0 auto; padding: 24px 32px; }
.an-card {
  background: #fff; border-radius: 14px; padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
  margin-bottom: 18px; border: 1px solid #f0f2f5;
}
.an-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.an-card-header h2 { font-size: 20px; font-weight: 600; color: #1a1a2e; margin: 0; }
.an-table-wrap { overflow-x: auto; }
.an-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.an-table th { background: #f8fafc; padding: 11px 14px; text-align: left; color: #5a6170; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 2px solid #e8ecf0; }
.an-table td { padding: 11px 14px; border-bottom: 1px solid #f0f2f5; color: #1a1a2e; }
.an-table tbody tr:hover td { background: #f8fafc; }
.an-select { padding: 9px 14px; border: 1px solid #e8ecf0; border-radius: 9px; font-size: 13px; color: #1a1a2e; background: #fff; }
.an-select:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.an-pagination { display: flex; gap: 6px; justify-content: center; margin: 16px 0; }
.an-pagination button { width: 32px; height: 32px; border-radius: 6px; border: 1px solid #e8ecf0; background: #fff; font-size: 13px; cursor: pointer; color: #5a6170; }
.an-pagination button:hover { border-color: #3b82f6; color: #3b82f6; }
.an-pagination button.active { background: #3b82f6; color: #fff; border-color: #3b82f6; }

/* 表单行 */
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 180px; }
.form-input { padding: 8px 12px; border: 1px solid #d0d7de; border-radius: 6px; font-size: 14px; color: #1f2328; background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; }
.form-input:focus, .form-select:focus { outline: none; border-color: #1f6feb; box-shadow: 0 0 0 3px rgba(31,111,235,0.1); }
.form-select { padding: 8px 12px; border: 1px solid #d0d7de; border-radius: 6px; font-size: 14px; color: #1f2328; background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* 按钮补充 */
.btn-warn { background: #ed7b2f; color: #fff; border: none; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.btn-warn:hover { background: #d96a1f; }
.btn-secondary { background: #f5f5f5; color: #606770; border: 1px solid #ddd; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.btn-secondary:hover { background: #e8e8e8; }
.btn-sm { padding: 7px 14px; border-radius: 7px; font-size: 12px; cursor: pointer; border: 1px solid #e8ecf0; background: #fff; color: #5a6170; font-weight: 500; }
.btn-sm:hover { background: #f8fafc; }
.btn-sm.btn-danger { color: #dc2626; border-color: #fecaca; }
.btn-sm.btn-danger:hover { background: #fef2f2; }

/* 模块容器统一使用 .main */

/* 弹窗补充（rbac/auto_rules 使用的 .modal .modal-content） */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15,23,42,0.5); z-index: 1000; justify-content: center; align-items: center; backdrop-filter: blur(2px); }
.modal.show { display: flex; }
.modal-content { background: #fff; border-radius: 16px; padding: 30px; width: 580px; max-width: 92%; max-height: 82vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.15); position: relative; }
.modal-content h3 { font-size: 18px; font-weight: 600; margin-bottom: 22px; color: #1a1a2e; }
.modal-close { position: absolute; top: 16px; right: 20px; font-size: 24px; color: #9098a8; cursor: pointer; background: none; border: none; }
.modal-close:hover { color: #1a1a2e; }

/* ========== 门店切换器 ========== */
.store-switcher {
    position: relative; display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 8px; cursor: pointer;
    background: #f5f7fa; transition: all .2s;
    font-size: 13px; color: #1f2328; flex-shrink: 0;
}
.store-switcher:hover { background: #e8ecf1; }
.store-label { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-dropdown {
    display: none; position: absolute; top: 100%; left: 0;
    background: #fff; border: 1px solid #e4e7eb; border-radius: 8px;
    padding: 4px 0; min-width: 220px; max-height: 420px; overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1); z-index: 1001; margin-top: 6px;
}
.store-dropdown.show { display: block; }
.store-dropdown a {
    display: block; padding: 7px 16px; color: #1f2328;
    font-size: 13px; text-decoration: none;
}
.store-dropdown a:hover { background: #f5f7fa; }
.store-dropdown a.active { color: #ff6600; font-weight: 600; background: #fff8f2; }
.store-dropdown .store-all {
    font-weight: 600; border-bottom: 1px solid #eee; margin-bottom: 2px;
}
.store-dropdown .store-group-label {
    padding: 6px 16px 3px; font-size: 11px; color: #999;
    font-weight: 600; letter-spacing: 0.5px;
    pointer-events: none; border-top: 1px solid #f0f0f0;
    margin-top: 2px;
}
.store-dropdown .store-group-label:first-of-type { border-top: none; margin-top: 0; }

/* ========== 全局搜索 ========== */
.header-search {
    position: relative; display: flex; align-items: center;
    background: #f5f7fa; border-radius: 8px; padding: 0 10px;
    transition: all .2s; flex-shrink: 1; min-width: 0;
}
.header-search:focus-within { background: #fff; box-shadow: 0 0 0 2px rgba(255,102,0,0.2); }
.header-search .search-icon { flex-shrink: 0; cursor: pointer; }
.header-search .search-input {
    border: none; background: transparent; outline: none;
    padding: 8px 8px; font-size: 13px; color: #1f2328;
    width: 200px; transition: width .2s;
}
.header-search .search-input:focus { width: 260px; }
.header-search .search-input::placeholder { color: #999; }
.search-dropdown {
    display: none; position: absolute; top: 100%; left: 0;
    background: #fff; border: 1px solid #e4e7eb; border-radius: 8px;
    width: 380px; max-height: 400px; overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12); z-index: 1002; margin-top: 6px;
}
.search-dropdown.show { display: block; }
.search-dropdown .empty { padding: 24px; text-align: center; color: #999; font-size: 13px; }
.search-dropdown .sr-item {
    display: flex; flex-direction: column; padding: 10px 16px;
    text-decoration: none; border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}
.search-dropdown .sr-item:hover { background: #f8f9fb; }
.search-dropdown .sr-item:last-child { border-bottom: none; }
.sr-cat { font-size: 11px; color: #ff6600; font-weight: 600; margin-bottom: 2px; }
.sr-title { font-size: 13px; color: #1f2328; font-weight: 500; }
.sr-sub { font-size: 11px; color: #888; margin-top: 2px; }

/* 响应式 */
@media (max-width: 768px) {
    .header-search .search-input { width: 120px; }
    .header-search .search-input:focus { width: 160px; }
    .search-dropdown { width: 280px; left: auto; right: 0; }
    .store-label { max-width: 100px; }
}


/* ===== 统一弹窗系统（modal-overlay） ===== */
.modal-overlay { display: flex; visibility: hidden; opacity: 0; pointer-events: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.55); z-index: 9999; justify-content: center; align-items: center; transition: opacity 0.25s ease, visibility 0.25s ease; }
.modal-overlay.show { visibility: visible; opacity: 1; pointer-events: auto; }
.modal-overlay .modal-content { background: #fff; border: 1px solid #e4e7eb; border-radius: 12px; padding: 24px; width: 400px; max-width: 90%; transform: scale(0.92); transition: transform 0.25s ease; }
.modal-overlay.show .modal-content { transform: scale(1); }
.modal-title { font-size: 18px; font-weight: 600; color: #1f2328; margin-bottom: 20px; }
.modal-form { display: flex; flex-direction: column; gap: 16px; }
.modal-form .form-group { display: flex; flex-direction: column; gap: 6px; }
.modal-form label { font-size: 14px; color: #606770; }
.modal-form input { background: #fff; border: 1px solid #e4e7eb; border-radius: 6px; padding: 10px 12px; color: #1f2328; font-size: 14px; }
.modal-form input:focus { border-color: #1f6feb; outline: none; }
.modal-buttons { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }
.modal-buttons button { padding: 8px 20px; border-radius: 6px; border: none; font-size: 14px; cursor: pointer; }
.btn-cancel { background: #f5f7fa; color: #1f2328; }
.btn-cancel:hover { background: #e4e7eb; }
.btn-confirm { background: #1f6feb; color: #fff; }
.btn-confirm:hover { background: #388bfd; }
.modal-error { color: #da3633; font-size: 13px; margin-top: 8px; display: none; }
.modal-success { color: #238636; font-size: 13px; margin-top: 8px; display: none; }
.modal-overlay .ao-modal { background: #fff; border: 1px solid #e4e7eb; border-radius: 12px; padding: 24px; width: 400px; max-width: 90%; position: relative; transform: scale(0.92); transition: transform 0.25s ease; }
.modal-overlay.show .ao-modal { transform: scale(1); }

/* ===== Toast 轻提示 ===== */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast-container .toast { pointer-events: auto; padding: 12px 20px; border-radius: 8px; font-size: 13px; color: #fff; box-shadow: 0 4px 16px rgba(0,0,0,0.18); animation: toastIn 0.3s ease; max-width: 360px; word-break: break-all; display: flex; align-items: center; gap: 8px; }
.toast.success { background: #238636; }
.toast.error { background: #da3633; }
.toast.warning { background: #ed7b2f; }
.toast.info { background: #1f6feb; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }

/* ===== 按钮补充 ===== */
.btn-outline { background: transparent; color: #1f6feb; border: 1px solid #1f6feb; }
.btn-outline:hover { background: rgba(31,111,235,0.06); }
.btn-ghost { background: transparent; color: #606770; border: 1px solid transparent; }
.btn-ghost:hover { background: #f5f7fa; color: #1f2328; }
/* 登录按钮旋转器此前已无引用（死工具类），已移除；@keyframes btnSpin 保留供 .state-loading 使用 */
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* ===== 表单校验 ===== */
.input-error { border-color: #da3633 !important; box-shadow: 0 0 0 3px rgba(218,54,51,0.1) !important; }
.input-error:focus { border-color: #da3633 !important; }
.field-hint { font-size: 12px; color: #da3633; margin-top: 4px; display: none; }
.field-hint.show { display: block; }


/* ===== 统一表格系统 ===== */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); border: 1px solid #e8ecf1; }
.data-table thead th { padding: 14px 12px; background: #fafbfc; font-size: 12px; font-weight: 600; color: #606770; text-align: left; border-bottom: 2px solid #e8ecf1; white-space: nowrap; position: sticky; top: 0; z-index: 5; }
.data-table tbody td { padding: 13px 12px; font-size: 13px; color: #1f2328; border-bottom: 1px solid #f0f2f5; white-space: nowrap; }
.data-table tbody tr:hover { background: #fafbfc; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .empty { text-align: center; padding: 40px; color: #aaa; font-size: 14px; }
.data-table .col-seq { width: 50px; text-align: center; font-size: 12px; color: #aaa; }
.data-table .col-time { font-size: 12px; color: #8c8c8c; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap-scroll { max-height: 65vh; overflow-y: auto; }
.table-wrap-scroll .data-table thead th { top: -1px; }
@media (max-width: 768px) { .data-table { font-size: 11px; min-width: 900px; } }

/* 统一状态: 加载 / 空 / 错误 (供列表与区块复用, 一致性) */
.state-loading, .state-empty, .state-error {
  text-align: center; padding: 48px 16px; font-size: 14px; color: #8c8c8c; line-height: 1.8;
}
.state-loading::before {
  content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 8px;
  border: 2px solid rgba(255,102,0,0.25); border-top-color: #ff6600; border-radius: 50%;
  vertical-align: -4px; animation: btnSpin 0.6s linear infinite;
}
.state-error { color: #e03a3a; }
.state-icon { font-size: 32px; display: block; margin-bottom: 8px; }

/* 移动端增强: 收窄留白, 卡片与按钮更紧凑 */
@media (max-width: 768px) {
  .card, .panel { padding: 14px; }
  .page-title { font-size: 18px; }
  .btn, .btn-primary, .btn-sm { padding: 8px 12px; font-size: 13px; }
  .stat-grid, .grid { grid-template-columns: 1fr 1fr; }
}


/* ===== 引导式空状态（未连接/未配置时友好提示，取代红色报错） ===== */
.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 24px;text-align:center;color:#606770;background:#fafbfc;border:1px dashed #e4e7eb;border-radius:14px;margin:8px 0;}
.empty-state .es-icon{font-size:46px;margin-bottom:12px;opacity:.85;}
.empty-state .es-title{font-size:16px;font-weight:600;color:#1f2328;margin-bottom:6px;}
.empty-state .es-desc{font-size:13px;color:#8f959e;max-width:380px;line-height:1.7;margin-bottom:18px;}
.empty-state .es-action{display:inline-flex;gap:10px;}

/* ===== 平台连接状态条（四平台概览） ===== */
.platform-bar{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px;}
.platform-chip{display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:12px;background:#fff;border:1px solid #e4e7eb;text-decoration:none;transition:all .2s;color:inherit;}
.platform-chip:hover{box-shadow:0 4px 14px rgba(0,0,0,.08);transform:translateY(-1px);}
.platform-chip .pc-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;}
.platform-chip .pc-icon{font-size:21px;}
.platform-chip .pc-info{flex:1;min-width:0;}
.platform-chip .pc-label{font-size:13px;font-weight:600;color:#1f2328;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.platform-chip .pc-status{font-size:11px;margin-top:2px;display:block;}
.platform-chip .pc-arrow{color:#c0c4cc;font-size:13px;}
.platform-chip.connected{border-left:3px solid #00a870;}
.platform-chip.connected .pc-status{color:#00a870;}
.platform-chip.connected .pc-dot{background:#00a870;}
.platform-chip.disconnected{border-left:3px solid #d0d3d9;}
.platform-chip.disconnected .pc-status{color:#8f959e;}
.platform-chip.disconnected .pc-dot{background:#d0d3d9;}
.platform-chip.reauth{border-left:3px solid #ed7b2f;background:#fff8f0;}
.platform-chip.reauth .pc-status{color:#ed7b2f;}
.platform-chip.reauth .pc-dot{background:#ed7b2f;}
@media(max-width:768px){.platform-bar{grid-template-columns:repeat(2,1fr);}}
