/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    margin: 0;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    min-height: 100vh;
    padding: 20px;
}

/* 登录页面样式 */
/* 登录容器 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
}

/* 登录表单 */
.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 50px 40px;
    width: 420px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 登录表单标题 */
.login-form h1 {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-size: 32px;
    font-weight: 700;
}

/* 登录表单副标题 */
.login-form h2 {
    color: #666;
    margin-bottom: 40px;
    font-size: 16px;
    font-weight: 400;
}

/* 登录表单输入组 */
.login-form .form-group {
    margin-bottom: 25px;
    text-align: left;
}

/* 登录表单输入框 */
.login-form .form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.login-form .form-group input:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* 登录表单按钮 */
.login-form .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 20px;
    border-radius: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* 错误信息 */
.error-message {
    color: #ef4444;
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
}

.error-message:not(:empty) {
    background: #fee2e2;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

/* 主应用页面样式 */
/* 头部容器 */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    height: 80px;
    padding: 0 20px;
}

/* 头部标题 */
.header h1 {
    text-align: center;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 2px;
}

/* 退出按钮 */
.header .btn-logout {
    position: absolute;
    right: 20px;
    background: rgba(255, 255, 255, 0.95) !important;
    border: none !important;
    padding: 12px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 退出按钮悬停效果 */
.header .btn-logout:hover {
    background: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 退出按钮图标 */
.header .btn-logout svg {
    display: block;
}

.header .btn-logout svg path {
    fill: #6366f1;
}

/* 通用标题样式 */
h1 {
    text-align: center;
    color: #1f2937;
}

/* 主容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 提示信息 */
.note {
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 20px;
    color: #4c1d95;
    font-size: 14px;
}

/* 标签页容器 */
.tabs {
    display: flex;
    justify-content: center;
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 20px 0;
    gap: 8px;
}

/* 标签页按钮 */
.tab {
    padding: 14px 28px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s ease;
    border-radius: 12px 12px 0 0;
    position: relative;
}

/* 标签页按钮悬停效果 */
.tab:hover {
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
}

/* 标签页按钮激活状态 */
.tab.active {
    background: white;
    color: #6366f1;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
    border-radius: 3px 3px 0 0;
}

/* 标签页内容 */
.tab-content {
    padding: 28px;
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 标签页内容激活状态 */
.tab-content.active {
    display: block;
}

/* 标签页头部 */
.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* 标签页头部标题 */
.tab-header h2 {
    margin: 0;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 24px;
    font-weight: 700;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 表格单元格 */
th, td {
    padding: 16px 14px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

/* 表格表头 */
th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #e2e8f0;
}

/* 表格行悬停效果 */
tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: scale(1.001);
}

tbody tr:last-child td {
    border-bottom: none;
}

td {
    color: #475569;
    font-size: 14px;
}

/* PID列样式 - 只显示后8位，悬停显示完整 */
.pid-cell {
    position: relative;
    cursor: help;
}

.pid-cell .pid-short {
    display: inline;
}

.pid-cell .pid-full {
    display: none;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1000;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pid-cell:hover .pid-full {
    display: block;
}

.pid-cell .pid-full::before {
    content: '';
    position: absolute;
    left: 10px;
    bottom: -4px;
    width: 8px;
    height: 8px;
    background: #1f2937;
    transform: rotate(45deg);
}

/* PID名称列样式 - 只显示前4个字符+省略号，悬停显示完整 */
.pid-name-cell {
    position: relative;
    cursor: help;
}

.pid-name-cell .pid-name-short {
    display: inline;
}

.pid-name-cell .pid-name-full {
    display: none;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1000;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pid-name-cell:hover .pid-name-full {
    display: block;
}

.pid-name-cell .pid-name-full::before {
    content: '';
    position: absolute;
    left: 10px;
    bottom: -4px;
    width: 8px;
    height: 8px;
    background: #1f2937;
    transform: rotate(45deg);
}

/* 表单组 */
.form-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

/* 趋势标签页的表单样式 */
/* 趋势标签页表单组 */
#trend .form-group {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 0;
}

/* 钱包标签页表单组 */
#wallet .form-group {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 0;
}

/* 趋势标签页表单项目 */
#trend .form-group .form-item,
#wallet .form-group .form-item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

/* 趋势标签页表单标签 */
#trend .form-group label,
#wallet .form-group label {
    display: flex;
    align-items: center;
    width: auto;
    font-weight: 600;
    color: #475569;
    margin: 0;
}

/* 开关容器不拉伸 */
#trend .form-group label.switch,
#wallet .form-group label.switch {
    width: 44px;
    flex-shrink: 0;
}

/* 趋势标签页表单输入框 */
#trend .form-group input,
#wallet .form-group input,
#wallet .form-group select {
    padding: 10px 14px;
    width: 220px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    height: 40px;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8fafc;
    font-family: inherit;
}

#trend .form-group input:focus,
#wallet .form-group input:focus,
#wallet .form-group select:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* 钱包标签页下拉菜单特殊样式 */
#wallet .form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%236366f1' 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 12px center;
    background-size: 18px;
    padding-right: 40px;
    cursor: pointer;
    color: #1f2937;
    font-weight: 500;
}

#wallet .form-group select:hover {
    border-color: #a855f7;
    background-color: white;
}

/* 关系标签页表单组 */
#relation .form-group {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 0;
}

/* 关系标签页表单项目 */
#relation .form-group .form-item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

/* 关系标签页表单标签 */
#relation .form-group label {
    display: flex;
    align-items: center;
    width: auto;
    font-weight: 600;
    color: #475569;
    margin: 0;
    white-space: nowrap;
    font-size: 14px;
    height: 40px;
}

/* 关系标签页表单输入框和下拉框 */
#relation .form-group input,
#relation .form-group select {
    padding: 10px 14px;
    width: 220px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    height: 40px;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8fafc;
    font-family: inherit;
}

#relation .form-group input:focus,
#relation .form-group select:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* 关系标签页下拉菜单特殊样式 */
#relation .form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%236366f1' 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 12px center;
    background-size: 18px;
    padding-right: 40px;
    cursor: pointer;
    color: #1f2937;
    font-weight: 500;
}

#relation .form-group select:hover {
    border-color: #a855f7;
    background-color: white;
}

/* 日期输入框特殊样式 */
#trend .form-group input[type="date"],
#report .form-group input[type="date"] {
    width: 200px;
    cursor: pointer;
    position: relative;
    font-family: inherit;
    color: #1f2937;
}

/* 日期输入框图标优化 */
#trend .form-group input[type="date"]::-webkit-calendar-picker-indicator,
#report .form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    filter: invert(0.5) sepia(1) saturate(5) hue-rotate(220deg);
}

#trend .form-group input[type="date"]::-webkit-calendar-picker-indicator:hover,
#report .form-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* 下拉菜单样式优化 */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%236366f1' 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: 16px;
    padding-right: 36px;
    cursor: pointer;
}

select:hover {
    border-color: #a855f7;
}

select:focus {
    outline: none;
    border-color: #6366f1;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* 下拉菜单选项样式 */
select option {
    padding: 10px;
    background: white;
    color: #1f2937;
    font-size: 14px;
}

/* 选中的选项样式 - 使用纯色而非渐变 */
select option:checked {
    background: #6366f1;
    color: white;
    font-weight: 600;
}

/* 趋势标签页表单按钮 */
#trend .form-group button,
#wallet .form-group button,
#attribution .form-group button {
    margin: 0;
    height: 40px;
    box-sizing: border-box;
}

/* 归因标签页表单样式 */
/* 归因标签页表单组 */
#attribution .form-group {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 0;
}

/* 归因标签页表单项目 */
#attribution .form-group .form-item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

/* 归因标签页表单标签 */
#attribution .form-group label {
    display: flex;
    align-items: center;
    width: auto;
    font-weight: 600;
    color: #475569;
    margin: 0;
    white-space: nowrap;
    font-size: 14px;
    height: 40px;
}

/* 归因标签页表单输入框 */
#attribution .form-group input {
    padding: 10px 14px;
    width: 220px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    height: 40px;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8fafc;
    font-family: inherit;
}

#attribution .form-group input:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* 归因标签页日期输入框特殊样式 */
#attribution .form-group input[type="date"] {
    width: 200px;
    cursor: pointer;
    position: relative;
    font-family: inherit;
    color: #1f2937;
}

/* 归因标签页日期输入框图标优化 */
#attribution .form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    filter: invert(0.5) sepia(1) saturate(5) hue-rotate(220deg);
}

#attribution .form-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* 其他标签页的表单样式 */
/* 报表标签页表单组 */
#report .form-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 报表标签页表单项目 */
#report .form-group .form-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 报表标签页表单标签 */
#report .form-group label {
    display: inline-block;
    width: auto;
    font-weight: 600;
    color: #475569;
    margin: 0;
    white-space: nowrap;
    font-size: 14px;
}

/* 报表标签页表单输入框 */
#report .form-group input {
    padding: 10px 14px;
    width: 200px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

#report .form-group input:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* 按钮样式 */
.btn {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* 按钮悬停效果 */
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn:active {
    transform: translateY(0);
}

/* 下载按钮 */
.btn-download {
    margin: 0;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-download:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-download::before {
    content: '⬇';
    font-size: 16px;
}

/* 重置按钮 */
.btn-reset {
    background: white;
    color: #64748b;
    padding: 10px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 8px;
}

/* 重置按钮悬停效果 */
.btn-reset:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 分页容器 */
.pagination-container {
    margin-top: 24px;
    margin-bottom: 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 8px;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 10px 0;
    gap: 8px;
}

/* 分页按钮 */
.pagination button {
    background: white;
    color: #667eea;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 14px;
    margin: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
}

/* 分页按钮悬停效果 */
.pagination button:hover:not(:disabled) {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* 分页按钮激活状态 */
.pagination button.active {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* 分页按钮禁用状态 */
.pagination button:disabled {
    background: #f8fafc;
    color: #cbd5e1;
    cursor: not-allowed;
    border-color: #f1f5f9;
}

.pagination button:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 统计卡片容器 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

/* 饼图和卡片组合容器 */
.chart-stats-container {
    display: flex;
    gap: 24px;
    margin: 24px 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    padding: 24px;
}

/* 饼图区域 */
.chart-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 300px;
}

/* 卡片网格 */
.stats-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
    min-width: 400px;
}

/* 调整卡片大小 */
.stats-grid .stat-card {
    padding: 20px;
    margin: 0;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .chart-stats-container {
        flex-direction: column;
    }
    
    .chart-section,
    .stats-grid {
        min-width: auto;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* 统计卡片 */
.stat-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 24px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
}

/* 统计卡片标题 */
.stat-card h3 {
    margin: 0 0 12px 0;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 统计卡片数据 */
.stat-card p {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 环比数据显示样式 */
.stat-change {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 18px;
}

/* 上升样式 - 绿色 */
.stat-change.positive {
    color: #10b981;
}

/* 下降样式 - 红色 */
.stat-change.negative {
    color: #ef4444;
}

/* 箭头样式 */
.stat-change::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

/* 上升箭头 */
.stat-change.positive::before {
    border-bottom: 6px solid #10b981;
}

/* 下降箭头 */
.stat-change.negative::before {
    border-top: 6px solid #ef4444;
}

/* 图表容器 */
.chart-container {
    position: relative;
    margin: 24px 0;
    padding: 32px 28px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

/* 趋势图表 */
#trendChart {
    max-height: 420px;
    width: 100%;
}

/* 同期对比图表 */
#comparisonChart {
    max-height: 420px;
    width: 100%;
}

/* 城市趋势图表 */
#cityTrendChart {
    max-height: 420px;
    width: 100%;
}

/* 暂无数据提示样式 */
.no-data-message {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

/* 日期选择器弹出框样式优化 */
input[type="date"]::-webkit-datetime-edit {
    padding: 0;
    color: #1f2937;
    font-weight: 500;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

input[type="date"]::-webkit-datetime-edit-text {
    color: #64748b;
    padding: 0 2px;
}

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    color: #1f2937;
    font-weight: 500;
}

input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-radius: 4px;
    outline: none;
}

/* 清除按钮样式 */
input[type="date"]::-webkit-clear-button {
    display: none;
}

/* 内部旋转按钮样式 */
input[type="date"]::-webkit-inner-spin-button {
    display: none;
}

/* 日期输入框占位符 */
input[type="date"]:invalid {
    color: #94a3b8;
}

/* 分页组件下拉菜单样式 */
.pagination-container select {
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%236366f1' 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 8px center;
    background-size: 16px;
    padding-right: 32px;
    cursor: pointer;
    color: #1f2937;
    font-weight: 500;
}

.pagination-container select:hover {
    border-color: #a855f7;
    background-color: white;
}


/* ==================== Element UI 日期范围选择器样式优化 ==================== */

/* 统一的筛选区域样式 */
.filter-section {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

/* 表单组容器 */
.filter-section .form-group {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
}

/* 表单项 */
.filter-section .form-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 日期范围选择器项 */
.filter-section .date-range-item {
    flex-shrink: 0;
}

/* 标签样式 */
.filter-section label {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
    margin: 0;
    min-width: auto;
}

/* 按钮组 */
.filter-section .button-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Element UI 日期选择器容器样式覆盖 */
.el-date-editor {
    width: 320px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.el-date-editor .el-input__inner {
    height: 40px !important;
    line-height: 40px !important;
    padding: 0 30px 0 15px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
}

/* 移除点击时的淡紫色边框 */
.el-date-editor .el-input__inner:focus {
    outline: none !important;
}

/* 图标垂直居中对齐 */
.el-date-editor .el-input__prefix,
.el-date-editor .el-input__suffix {
    display: flex !important;
    align-items: center !important;
    height: 40px !important;
    top: 0 !important;
}

.el-date-editor .el-input__icon {
    line-height: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
}

.el-date-editor .el-range__icon {
    line-height: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
}

.el-date-editor .el-range__close-icon {
    line-height: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
}

/* Element UI 日期选择器输入框样式 */
.el-date-editor .el-range-input {
    background-color: transparent !important;
    color: #1f2937 !important;
    font-size: 14px !important;
    height: 36px !important;
    line-height: 36px !important;
    width: 43% !important;
    border: none !important;
    outline: none !important;
    vertical-align: middle !important;
}

.el-date-editor .el-range-separator {
    color: #64748b !important;
    font-size: 13px !important;
    line-height: 36px !important;
    height: 36px !important;
    padding: 0 5px !important;
    width: 14% !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Element UI 日期选择器边框样式 */
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    height: 40px !important;
    line-height: 40px !important;
    background-color: white !important;
    outline: none !important;
}

.el-date-editor.el-input:hover,
.el-date-editor.el-input__inner:hover {
    border-color: #a855f7 !important;
}

.el-date-editor.el-input.is-active,
.el-date-editor.el-input:focus,
.el-date-editor.el-input:focus-within,
.el-date-editor.el-input__inner.is-active,
.el-date-editor.el-input__inner:focus,
.el-date-editor.el-input__inner:focus-within {
    border-color: #6366f1 !important;
    box-shadow: none !important;
    outline: none !important;
}

/* 移除 Element UI 默认的 focus 样式 */
.el-input.is-active .el-input__inner,
.el-input__inner:focus {
    border-color: #6366f1 !important;
    outline: none !important;
}

/* Element UI 日期选择器图标 */
.el-date-editor .el-input__icon {
    color: #64748b !important;
    font-size: 16px !important;
}

.el-date-editor:hover .el-input__icon {
    color: #6366f1 !important;
}

/* Element UI 日期选择器下拉面板样式 */
.el-picker-panel {
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
    border-radius: 12px !important;
}

/* 日期选择器头部 */
.el-date-range-picker__header {
    color: #1f2937 !important;
}

/* 日期单元格 */
.el-date-table td.available:hover {
    color: #6366f1 !important;
}

.el-date-table td.today span {
    color: #6366f1 !important;
    font-weight: 600 !important;
}

.el-date-table td.in-range div,
.el-date-table td.in-range div:hover {
    background-color: rgba(99, 102, 241, 0.1) !important;
}

.el-date-table td.start-date span,
.el-date-table td.end-date span {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%) !important;
    color: white !important;
}

/* 快捷选项样式 */
.el-picker-panel__shortcut {
    color: #475569 !important;
    font-size: 13px !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.el-picker-panel__shortcut:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    color: #6366f1 !important;
}

/* 趋势标签页的PID8输入框样式 */
#trend .filter-section input[type="text"] {
    padding: 0 14px;
    width: 220px;
    height: 40px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    line-height: 40px;
}

#trend .filter-section input[type="text"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#trend .filter-section input[type="text"]::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

/* 按钮样式优化 */
.filter-section .btn {
    padding: 0 20px;
    height: 40px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-section .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.filter-section .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.filter-section .btn-reset {
    background: white;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
}

.filter-section .btn-reset:hover {
    background: #f8f9fa;
    border-color: #cbd5e1;
    color: #475569;
}

/* 响应式优化 */
@media (max-width: 1200px) {
    .filter-section {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .filter-section .form-group {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .filter-section .form-item {
        width: 100%;
    }
    
    .el-date-editor {
        width: 100% !important;
    }
    
    #trend .filter-section input[type="text"] {
        width: 100%;
    }
    
    .filter-section .button-group {
        width: 100%;
        justify-content: flex-end;
    }
}

/* 移除旧的日期输入框样式（已被Element UI替代） */
/* 注意：不要使用 display: none，因为会影响 Element UI 的日期选择器 */
/* Element UI 使用的是 .el-date-editor 类，不会被这些规则影响 */

/* 如果页面中还有旧的 input[type="date"]，可以通过以下方式隐藏 */
/* 但要确保不影响 Element UI 内部的 input 元素 */

/* 确保 Element UI 日期选择器正确显示 */
.el-date-editor.el-range-editor.el-input__inner {
    display: inline-flex !important;
    align-items: center !important;
    width: 320px !important;
    height: 40px !important;
    padding: 3px 10px !important;
    outline: none !important;
}

/* 确保日期范围输入框正确显示 */
.el-range-editor .el-range-input {
    display: inline-block !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    outline: none !important;
}

/* 覆盖可能的冲突样式 */
.filter-section .el-date-editor input {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    outline: none !important;
}

/* 移除所有 Element UI 组件的 focus outline */
.el-input__inner:focus,
.el-input__inner:active,
.el-range-input:focus,
.el-range-input:active {
    outline: none !important;
    box-shadow: none !important;
}

/* 确保日期选择器内部元素垂直居中 */
.el-date-editor.el-range-editor {
    display: inline-flex !important;
    align-items: center !important;
}

.el-date-editor .el-range-input,
.el-date-editor .el-range-separator,
.el-date-editor .el-input__icon {
    vertical-align: middle !important;
}



/* ==================== 订单标签页样式 ==================== */

/* 订单标签页统计卡片容器 - 2列布局 */
.stats-container.order-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* 响应式：小屏幕改为1列 */
@media (max-width: 768px) {
    .stats-container.order-stats {
        grid-template-columns: 1fr;
    }
}

/* 双指标卡片 */
.stat-card-dual {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 20px 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 卡片内的统计项 */
.stat-item {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

/* 统计项标题 */
.stat-item h3 {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

/* 统计项数据 */
.stat-item p {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    margin-left: 16px;
    line-height: 1.5;
}

/* 分隔线 */
.stat-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, transparent 0%, rgba(148, 163, 184, 0.3) 50%, transparent 100%);
    margin: 0 24px;
}

/* 城市数据模块 */
.city-data-section {
    margin: 24px 0;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px;
}

.city-data-section h3 {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.city-data-section table {
    width: 100%;
    background: transparent;
    border-radius: 0;
    border: none;
    overflow: hidden;
}

/* 图表和排名并排布局 */
.chart-ranking-row {
    display: flex;
    gap: 20px;
    margin: 24px 0;
}

/* 左侧图表区域 - 占70% */
.chart-section-half {
    flex: 0 0 70%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px;
}

.chart-section-half h3 {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

/* 缩小的图表容器 */
.chart-container-small {
    position: relative;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

.chart-container-small canvas {
    max-height: 280px;
    width: 100%;
}

/* 右侧排名区域 - 占30% */
.ranking-card-half {
    flex: 0 0 calc(30% - 20px);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px;
}

.ranking-card-half h3 {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.ranking-container {
    background: transparent;
    border-radius: 0;
    border: none;
    overflow: hidden;
}

.ranking-container table {
    width: 100%;
}

.ranking-container table thead {
    background: rgba(255, 255, 255, 0.95);
}

.ranking-container table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.ranking-container table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #1f2937;
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
}

.ranking-container table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .chart-ranking-row {
        flex-direction: column;
    }
    
    .chart-section-half,
    .ranking-card-half {
        flex: 1 1 100%;
    }
}

/* 开关样式 - 符合UI设计规范 */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  vertical-align: middle;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e2e8f0;
  transition: all 0.3s ease;
  border-radius: 24px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: all 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 开关开启状态 - 使用紫蓝渐变 */
input:checked + .slider {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

input:focus + .slider {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

input:checked:focus + .slider {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 2px 6px rgba(99, 102, 241, 0.3);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* 开关悬停效果 */
.slider:hover {
  background-color: #cbd5e1;
}

input:checked + .slider:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
}

/* 开关禁用状态 */
.switch input:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.switch input:disabled + .slider:hover {
  background-color: #e2e8f0;
}

.switch input:checked:disabled + .slider:hover {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

/* 确保开关在表单项中正确对齐 */
.form-item .switch {
  margin-left: 0;
}


/* 钱包标签页在 filter-section 内的样式覆盖 */
#wallet .filter-section .form-group {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    justify-content: flex-start;
}

#wallet .filter-section .form-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

#wallet .filter-section input,
#wallet .filter-section select {
    padding: 0 14px;
    width: 220px;
    height: 40px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    line-height: 40px;
    display: inline-block;
}

#wallet .filter-section input:focus,
#wallet .filter-section select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#wallet .filter-section select {
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%236366f1' 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 12px center;
    background-size: 18px;
    padding-right: 40px;
    cursor: pointer;
    color: #1f2937;
    font-weight: 500;
}

#wallet .filter-section select:hover {
    border-color: #a855f7;
    background-color: white;
}

#wallet .filter-section input::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

#wallet .filter-section label {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
    margin: 0;
    display: inline-block;
}


/* 订单标签页PID排名表格的PID单元格样式 */

/* 排名并排布局 - 用于订单标签页的PID排名和类目排名 */
.ranking-row {
    display: flex;
    gap: 20px;
    margin: 24px 0;
}

.ranking-row .ranking-card-half {
    flex: 1;
    min-width: 0;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .ranking-row {
        flex-direction: column;
    }
}


/* Loading 图标样式 */
.loading-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}
