
    :root {
      --bg-main: #f4f6f9;        /* 主内容区改为浅灰背景以区分卡片 */
      --bg-sidebar: #0f172a;     /* 侧边栏改为深蓝科技黑 */
      --bg-card: #ffffff;        /* 纯白卡片 */
      --bg-active: #1e293b;      /* 激活项采用略亮的深蓝色块 */
      
      --text-sidebar: #f8fafc;   /* 侧栏文字改为亮色 */
      --text-sidebar-sub: #94a3b8; /* 侧栏未激活状态浅色 */
      --text-main: #1d1d1f;      /* 苹果深黑主字 */
      --text-sub: #86868b;       /* 苹果深灰辅助字 */
      
      --border: #d2d2d7;         /* 灰色边框 */
      --border-light: #e1e7f0;   /* 极浅蓝灰分割线 */
      
      --primary: #0071e3;        /* 苹果标志蓝色 */
      --primary-hover: #0077ed;
      --success: #34c759;        /* iOS 绿色 */
      --error: #ff3b30;          /* iOS 红色 */
      --warning: #ff9500;        /* iOS 橙色 */
      --sidebar-width: 260px;
    }

    body {
      margin: 0;
      padding: 0;
      color: var(--text-main);
      background-color: var(--bg-main);
      display: flex;
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    /* 登录覆盖面板 */
    .login-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background-color: var(--bg-sidebar); /* 登录背景统一为苹果灰 */
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
    }

    .login-card {
      background-color: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 18px;
      padding: 40px;
      width: 100%;
      max-width: 400px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
      box-sizing: border-box;
      transition: all 0.3s;
    }

    /* 侧栏布局 */
    .sidebar {
      width: var(--sidebar-width);
      background-color: var(--bg-sidebar);
      color: var(--text-sidebar);
      display: flex;
      flex-direction: column;
      position: fixed;
      top: 0; bottom: 0; left: 0;
      z-index: 100;
      border-right: 1px solid rgba(255, 255, 255, 0.05);
      transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    body.sidebar-hidden .sidebar {
      transform: translateX(-100%);
    }

    .brand-section {
      padding: 24px;
      font-size: 16px;
      font-weight: 900;
      color: #ffffff;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--text-sidebar);
    }

    .nav-list {
      flex: 1;
      padding: 15px 12px;
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      align-content: flex-start;
      gap: 4px;
      list-style: none;
      margin: 0;
      overflow-y: auto;
    }

    .nav-item {
      width: calc(50% - 2px);
      box-sizing: border-box;
      padding: 10px 8px;
      font-size: 12px;
      color: var(--text-sidebar-sub);
      cursor: pointer;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      border-radius: 8px;
      font-weight: 500;
      transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
      text-align: left;
    }

    .nav-item:hover {
      background-color: rgba(255, 255, 255, 0.08); /* 深色背景上的浅白悬浮 */
      color: var(--text-sidebar);
    }

    .nav-item.active {
      background-color: var(--bg-active);
      color: var(--text-sidebar);
      font-weight: 600;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    }

    .nav-item .icon {
      flex-shrink: 0;
      width: 16px;
      height: 16px;
      color: currentColor;
    }

    .nav-group-title {
      font-size: 13px;
      font-weight: 800;
      color: #ffffff;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin: 16px 0 6px 12px;
      width: 100%;
    }

    .sidebar-footer {
      padding: 20px;
      border-top: 1px solid var(--border-light);
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
      color: var(--text-sub);
    }

    .sidebar-logout {
      color: var(--error);
      font-weight: 600;
      cursor: pointer;
      transition: opacity 0.2s;
    }
    
    .sidebar-logout:hover {
      opacity: 0.8;
    }

    /* 主工作区 */
    .main-workspace {
      margin-left: var(--sidebar-width);
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0; 
      transition: margin-left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    body.sidebar-hidden .main-workspace {
      margin-left: 0;
    }

    .top-navbar {
      background-color: rgba(255, 255, 255, 0.8);
      backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--border-light);
      height: 56px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 30px;
      position: sticky;
      top: 0;
      z-index: 50;
    }

    .nav-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-main);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .sys-info {
      font-size: 11px;
      color: var(--text-sub);
      display: flex;
      gap: 20px;
    }

    .workspace-content {
      padding: 24px 30px;
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    /* 卡片组件 */
    .card {
      background-color: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 12px;
      padding: 24px;
      box-shadow: none;
      box-sizing: border-box;
    }

    .card-title {
      font-size: 14px;
      font-weight: 600;
      margin-bottom: 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      color: var(--text-main);
    }
    
    .section-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-main);
      margin-bottom: 15px;
      display: block;
    }

    /* 数据大屏网格 */
    .grid-stats {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
    }

    .stat-card {
      background-color: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 12px;
      padding: 20px;
      display: flex;
      flex-direction: column;
    }

    .stat-header {
      font-size: 12px;
      color: var(--text-sub);
      font-weight: 500;
    }

    .stat-value {
      font-size: 26px;
      font-weight: 700;
      margin-top: 8px;
      color: var(--text-main);
      letter-spacing: -0.5px;
    }

    /* 跨店引流系数板 */
    .cross-board {
      display: flex;
      align-items: center;
      gap: 30px;
    }

    .cross-rate-display {
      width: 110px;
      height: 110px;
      border-radius: 50%;
      border: 6px solid var(--border-light);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      background: var(--bg-main);
    }

    .cross-rate-val {
      font-size: 20px;
      font-weight: 700;
      color: var(--success);
      letter-spacing: -0.5px;
    }

    /* 表格与横向滚动防折行容器 */
    .table-container {
      width: 100%;
      overflow-x: auto;
      background: var(--bg-card);
      border-radius: 8px;
    }

    /* 表格 */
    .data-table {
      width: 100%;
      border-collapse: collapse;
      text-align: left;
      font-size: 13px;
    }

    .data-table th {
      background-color: var(--bg-main);
      padding: 10px 16px;
      color: var(--text-sub);
      font-weight: 600;
      border-bottom: 1px solid var(--border-light);
      white-space: nowrap;
    }

    .data-table td {
      padding: 14px 16px;
      border-bottom: 1px solid var(--border-light);
      color: var(--text-main);
      white-space: nowrap;
    }

    .data-table tr:hover {
      background-color: #fafafa;
    }

    /* 状态圆点/徽章 */
    .badge {
      font-size: 11px;
      padding: 3px 8px;
      border-radius: 6px;
      font-weight: 600;
      display: inline-block;
    }

    .badge-success { background-color: #e6f6ec; color: var(--success); }
    .badge-pending { background-color: #fff4e5; color: var(--warning); }
    .badge-error { background-color: #fde8e8; color: var(--error); }

    /* 表单组件 */
    .form-item {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-bottom: 16px;
      width: 100%;
      box-sizing: border-box;
    }

    .label {
      font-size: 12px;
      color: var(--text-sub);
      font-weight: 600;
    }

    .input {
      height: 38px;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0 14px;
      font-size: 13px;
      font-family: inherit;
      background-color: var(--bg-card);
      color: var(--text-main);
      box-sizing: border-box;
      width: 100%;
      outline: none;
      transition: all 0.2s;
    }

    .input:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
    }

    .select {
      height: 38px;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0 30px 0 14px;
      font-size: 13px;
      font-family: inherit;
      background-color: var(--bg-card);
      color: var(--text-main);
      box-sizing: border-box;
      width: 100%;
      outline: none;
      cursor: pointer;
      transition: all 0.2s;
      appearance: none;
      background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 10px center;
      background-size: 14px;
    }

    .select:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
    }

    .btn {
      height: 38px;
      border: none;
      border-radius: 8px;
      padding: 0 20px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      background-color: var(--primary);
      color: #ffffff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
      box-sizing: border-box;
    }
    
    .btn:hover {
      background-color: var(--primary-hover);
    }
    
    .btn:active {
      transform: scale(0.97);
    }

    .btn-outline {
      background-color: transparent;
      color: var(--text-main);
      border: 1px solid var(--border);
    }

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

    .btn-success { background-color: var(--success); }
    .btn-success:hover { background-color: #2ebc52; }
    
    .btn-error { background-color: var(--error); }
    .btn-error:hover { background-color: #e03228; }
    
    .btn-xs { padding: 4px 12px; font-size: 11px; border-radius: 12px; }

    .empty-tip {
      text-align: center;
      color: var(--text-sub);
      font-size: 13px;
      padding: 40px 0;
    }

    .toast {
      position: fixed;
      top: 24px;
      left: 50%;
      transform: translateX(-50%);
      background-color: rgba(29, 29, 31, 0.95);
      color: #ffffff;
      padding: 10px 24px;
      border-radius: 24px;
      font-size: 13px;
      z-index: 10000;
      display: none;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    }

    /* 模态弹窗样式 */
    .modal-backdrop {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background-color: rgba(0, 0, 0, 0.15);
      backdrop-filter: blur(20px); /* 苹果磨砂玻璃特效 */
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      opacity: 0;
      transition: opacity 0.25s ease;
    }
    .modal-backdrop.show {
      display: flex !important;
      opacity: 1;
    }
    .modal-dialog {
      background-color: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 18px;
      width: 100%;
      max-width: 580px;
      max-height: 85vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
      transform: scale(0.95);
      transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
      overflow: hidden;
    }
    .modal-backdrop.show .modal-dialog {
      transform: scale(1);
    }
    .modal-header {
      padding: 18px 24px;
      border-bottom: 1px solid var(--border-light);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .modal-title {
      font-size: 15px;
      font-weight: 700;
      color: var(--text-main);
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .modal-close-btn {
      background: none;
      border: none;
      font-size: 22px;
      cursor: pointer;
      color: var(--text-sub);
      line-height: 1;
      transition: color 0.2s;
    }
    .modal-close-btn:hover {
      color: var(--text-main);
    }
    .modal-body {
      padding: 24px;
      overflow-y: auto;
      flex: 1;
    }
    .modal-footer {
      padding: 16px 24px;
      border-top: 1px solid var(--border-light);
      display: flex;
      justify-content: flex-end;
      gap: 12px;
      background-color: #f5f5f7;
    }

    .row {
      display: flex;
      gap: 16px;
    }
    .half {
      flex: 1;
    }
    
    /* 辅助间距与排版 */
    .icon-inline {
      vertical-align: middle;
      margin-right: 4px;
      width: 14px;
      height: 14px;
    }

    /* 搜索过滤联动栏样式 */
    .search-filter-bar {
      display: flex;
      gap: 12px;
      margin-bottom: 20px;
      align-items: center;
      flex-wrap: nowrap;
      overflow-x: auto;
      white-space: nowrap;
      padding-bottom: 4px; /* 防止横向滚动条遮挡 */
    }
    
    .search-input-wrapper {
      position: relative;
      flex: 0 0 auto;
      width: 240px;
    }
    
    .search-input-wrapper .search-icon {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-sub);
      pointer-events: none;
      width: 14px;
      height: 14px;
    }
    
    .search-input-wrapper .input {
      padding-left: 36px;
      padding-right: 32px;
      border-radius: 20px;
    }
    
    .search-input-wrapper .clear-btn {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-sub);
      background: none;
      border: none;
      cursor: pointer;
      font-size: 16px;
      padding: 0;
      line-height: 1;
      display: none;
    }
    
    .search-input-wrapper .clear-btn:hover {
      color: var(--text-main);
    }
    
    .filter-select {
      flex: 0 0 auto;
      max-width: 160px;
      background-color: var(--bg-card);
    }
    /* 右侧抽屉面板 */
    .right-drawer {
      position: fixed;
      top: 0;
      right: 0;
      width: 500px;
      height: 100vh;
      background: #ffffff;
      box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
      z-index: 2000;
      transform: translateX(100%);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      display: flex;
      flex-direction: column;
    }
    .right-drawer.open {
      transform: translateX(0);
    }
    .right-drawer-header {
      padding: 24px;
      border-bottom: 1px solid var(--border-light);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .right-drawer-header h3 {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
      color: var(--text-main);
    }
    .right-drawer-close {
      cursor: pointer;
      background: none;
      border: none;
      font-size: 20px;
      color: var(--text-sub);
      transition: color 0.2s;
    }
    .right-drawer-close:hover {
      color: var(--text-main);
    }
    .right-drawer-body {
      flex: 1;
      overflow-y: auto;
      padding: 24px;
    }
    /* 遮罩层 */
    .drawer-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0, 0, 0, 0.4);
      z-index: 1999;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
      backdrop-filter: blur(2px);
    }
    .drawer-overlay.show {
      opacity: 1;
      visibility: visible;
    }
  

        .comp-btn {
          display: flex; flex-direction: column; align-items: center; justify-content: center;
          background: #ffffff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px 0;
          cursor: pointer; transition: all 0.2s;
        }
        .comp-btn:hover { border-color: #3b82f6; color: #3b82f6; background: #eff6ff; }
        .comp-icon { font-size: 24px; margin-bottom: 8px; }
        .comp-name { font-size: 12px; color: #4b5563; font-weight: 500; }
        .comp-btn:hover .comp-name { color: #3b82f6; }
      

        #modal-generate-codes .modal-header { padding: 24px 30px; background: #fff; border-bottom: none; }
        #modal-generate-codes .modal-title { font-size: 20px; font-weight: 700; color: #1e293b; }
        #modal-generate-codes .modal-body { padding: 10px 30px 30px; }
        #modal-generate-codes .form-label { font-size: 13px !important; color: #64748b; font-weight: 500; margin-bottom: 8px; }
        #modal-generate-codes .input, #modal-generate-codes .select { 
          font-size: 14px !important; 
          padding: 12px 16px !important; 
          border-radius: 10px; 
          border: 1px solid #e2e8f0;
          background: #f8fafc;
          transition: all 0.2s;
        }
        #modal-generate-codes .input:focus, #modal-generate-codes .select:focus {
          background: #ffffff;
          border-color: #3b82f6;
          box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        #modal-generate-codes .reward-card {
          background: #f1f5f9;
          border-radius: 16px;
          padding: 24px;
          margin-top: 30px;
        }
        #modal-generate-codes .modal-footer { padding: 20px 30px; background: #f8fafc; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; gap: 12px; }
        #modal-generate-codes .btn { border-radius: 10px; font-weight: 600; padding: 10px 24px; }
        #modal-generate-codes .btn-primary { background: #0f172a; color: #fff; border: none; }
        #modal-generate-codes .btn-primary:hover { background: #1e293b; }
      
