/**
 * 商城管理后台样式
 */

.shop-orders-filters {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.order-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

/* 订单详情页面 postbox 样式 */
.postbox {
    position: relative;
    min-width: 255px;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
    background: #fff;
    padding: 10px;
}

.postbox .inside{
    padding: 0px;
}

/* 仪表板样式 */
.shop-dashboard-wrap {
    position: relative;
}

.shop-dashboard-wrap.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 999;
}

.shop-dashboard-wrap.loading::after {
    content: '加载中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    font-size: 16px;
    color: #333;
}

/* 快速访问入口 */
.shop-quick-access {
    margin: 20px 0;
    padding: 0;
}

.quick-access-title {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-access-title .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.quick-access-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 100px;
}

.quick-access-item:hover {
    border-color: #0073aa;
    text-decoration: none;
}

.quick-access-icon {
    font-size: 36px;
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
    display: block;
}

.quick-access-text {
    font-size: 14px;
    font-weight: 600;
    color: #23282d;
    text-align: center;
}

/* 快速访问按钮颜色 */
.quick-access-primary {
    border-top: 4px solid #0073aa;
}

.quick-access-primary .quick-access-icon {
    color: #0073aa;
}

.quick-access-success {
    border-top: 4px solid #46b450;
}

.quick-access-success .quick-access-icon {
    color: #46b450;
}

.quick-access-info {
    border-top: 4px solid #00a0d2;
}

.quick-access-info .quick-access-icon {
    color: #00a0d2;
}

.quick-access-warning {
    border-top: 4px solid #ffb900;
}

.quick-access-warning .quick-access-icon {
    color: #ffb900;
}

.quick-access-secondary {
    border-top: 4px solid #826eb4;
}

.quick-access-secondary .quick-access-icon {
    color: #826eb4;
}

.quick-access-tertiary {
    border-top: 4px solid #d63638;
}

.quick-access-tertiary .quick-access-icon {
    color: #d63638;
}

/* 时间筛选器 */
.shop-dashboard-filters {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    border-radius: 4px;
}

.date-range-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.date-range-label {
    font-weight: 600;
    color: #23282d;
    margin: 0;
}

.date-range-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.date-range-btn {
    padding: 8px 20px;
    border: 2px solid transparent;
    border-radius: 6px;
    background: #f0f0f1;
    color: #2c3338;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.date-range-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.date-range-btn.active {
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 时间范围按钮颜色 */
.date-range-today {
    background: #f0f0f1;
}

.date-range-today.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.date-range-yesterday {
    background: #f0f0f1;
}

.date-range-yesterday.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: #f5576c;
}

.date-range-week {
    background: #f0f0f1;
}

.date-range-week.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-color: #4facfe;
}

.date-range-month {
    background: #f0f0f1;
}

.date-range-month.active {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    border-color: #43e97b;
}

.date-range-year {
    background: #f0f0f1;
}

.date-range-year.active {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    border-color: #fa709a;
}

/* 统计卡片 */
.shop-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    border-radius: 4px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
}

.stat-card-primary {
    border-left: 4px solid #0073aa;
}

.stat-card-success {
    border-left: 4px solid #46b450;
}

.stat-card-info {
    border-left: 4px solid #00a0d2;
}

.stat-card-warning {
    border-left: 4px solid #ffb900;
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f0f1;
}

.stat-card-primary .stat-icon {
    background: #e5f5fa;
    color: #0073aa;
}

.stat-card-success .stat-icon {
    background: #e8f5e9;
    color: #46b450;
}

.stat-card-info .stat-icon {
    background: #e5f5fa;
    color: #00a0d2;
}

.stat-card-warning .stat-icon {
    background: #fff8e1;
    color: #ffb900;
}

.stat-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #646970;
    text-transform: uppercase;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #1d2327;
    line-height: 1.2;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #646970;
}

/* 次要统计卡片 */
.shop-dashboard-stats-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card-small {
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    border-radius: 4px;
    padding: 15px;
    text-align: center;
}

.stat-card-small h4 {
    margin: 0 0 10px 0;
    font-size: 13px;
    font-weight: 600;
    color: #646970;
    text-transform: uppercase;
}

.stat-value-small {
    font-size: 24px;
    font-weight: bold;
    color: #1d2327;
}

/* 图表区域 */
.shop-dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.chart-container {
    background: #fff;
}

.chart-container .postbox {
    margin: 0;
}

.chart-container .inside {
    padding: 20px;
    min-height: 300px;
}

.chart-container canvas {
    max-height: 400px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .shop-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .shop-dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Admin Bar 快速访问样式 */
#wpadminbar .shop-admin-bar-item .ab-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 快速访问菜单图标样式 - 使用伪类 */
#wpadminbar .shop-admin-bar-item .ab-icon {
    font-size: 16px !important;
    width: 20px !important;
    height: 32px !important;
  
    text-align: center !important;
    vertical-align: middle !important;
    display: inline-block !important;
    font-family: dashicons !important;
    font-style: normal !important;
    font-weight: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    margin-right: 4px !important;
    padding: 0 !important;
}

/* 为不同的快速访问项添加图标和颜色 */
#wpadminbar #wp-admin-bar-shop-quick-new-product .ab-icon:before {
    content: "\f132" !important; /* dashicons-plus-alt */
    font-family: dashicons !important;
    font-size: 16px !important;
    line-height: 32px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    color: #0073aa !important;
}

#wpadminbar #wp-admin-bar-shop-quick-products .ab-icon:before {
    content: "\f238" !important; /* dashicons-products */
    font-family: dashicons !important;
    font-size: 16px !important;
    line-height: 32px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    color: #d63638 !important;
}

#wpadminbar #wp-admin-bar-shop-quick-add-category .ab-icon:before {
    content: "\f318" !important; /* dashicons-category */
    font-family: dashicons !important;
    font-size: 16px !important;
    line-height: 32px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    color: #46b450 !important;
}

#wpadminbar #wp-admin-bar-shop-quick-orders .ab-icon:before {
    content: "\f163" !important; /* dashicons-list-view */
    font-family: dashicons !important;
    font-size: 16px !important;
    line-height: 32px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    color: #00a0d2 !important;
}

#wpadminbar #wp-admin-bar-shop-quick-dashboard .ab-icon:before {
    content: "\f226" !important; /* dashicons-dashboard */
    font-family: dashicons !important;
    font-size: 16px !important;
    line-height: 32px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    color: #826eb4 !important;
}

#wpadminbar #wp-admin-bar-shop-quick-analytics .ab-icon:before {
    content: "\f184" !important; /* dashicons-chart-line */
    font-family: dashicons !important;
    font-size: 16px !important;
    line-height: 32px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    color: #ffb900 !important;
}

#wpadminbar #wp-admin-bar-shop-quick-theme-settings .ab-icon:before {
    content: "\f110" !important; /* dashicons-admin-tools */
    font-family: dashicons !important;
    font-size: 16px !important;
    line-height: 32px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    color: #f56e28 !important;
}

/* 悬停效果 */
#wpadminbar .shop-admin-bar-item .ab-item:hover .ab-icon:before {
    opacity: 0.8;
}

/* 销售统计父级菜单样式 - 极简版 */
#wpadminbar #wp-admin-bar-shop-sales-stats > .ab-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 8px !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#wpadminbar #wp-admin-bar-shop-sales-stats:hover > .ab-item {
    background: transparent !important;
}

#wpadminbar #wp-admin-bar-shop-sales-stats .ab-icon:before {
    content: "\f238" !important;
    font-family: dashicons !important;
    font-size: 16px !important;
    line-height: 32px !important;
    color: #fff !important;
}

#wpadminbar #wp-admin-bar-shop-sales-stats .shop-stats-parent-label {
    font-size: 13px;
    font-weight: 500;
    color: #fff !important;
}

/* 销售统计下拉容器 - 深色背景 */
#wpadminbar #wp-admin-bar-shop-sales-stats .ab-sub-wrapper {
    min-width: 320px;
    padding: 8px 0;
    background: #111318;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}

#wpadminbar #wp-admin-bar-shop-sales-stats .ab-submenu {
    padding: 4px 0;
}

/* 销售统计子项样式 */
#wpadminbar [id^="wp-admin-bar-shop-sales-stats-"] > .ab-item {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 16px !important;
    color: #f5f5f5 !important;
    background: transparent;
    border-left: 3px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

#wpadminbar [id^="wp-admin-bar-shop-sales-stats-"] > .ab-item:hover {
    background: rgba(255,255,255,0.08);
}

#wpadminbar [id^="wp-admin-bar-shop-sales-stats-"] .ab-icon {
    display: none !important;
}

#wpadminbar [id^="wp-admin-bar-shop-sales-stats-"] .shop-stats-period {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    color: rgba(255,255,255,0.75);
}

#wpadminbar [id^="wp-admin-bar-shop-sales-stats-"] .shop-stats-data {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

#wpadminbar [id^="wp-admin-bar-shop-sales-stats-"] .shop-stats-data strong {
    color: inherit !important;
    margin: 0 2px;
}

/* 彩色点标记 */
#wpadminbar [id^="wp-admin-bar-shop-sales-stats-"] .stats-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
}

/* 不同时间段的侧边标识 */
#wpadminbar #wp-admin-bar-shop-sales-stats-today > .ab-item {
    border-color: #3c8dbc;
    color: #3c8dbc !important;
}

#wpadminbar #wp-admin-bar-shop-sales-stats-yesterday > .ab-item {
    border-color: #f0a202;
    color: #f0a202 !important;
}

#wpadminbar #wp-admin-bar-shop-sales-stats-week > .ab-item {
    border-color: #46b450;
    color: #46b450 !important;
}

#wpadminbar #wp-admin-bar-shop-sales-stats-month > .ab-item {
    border-color: #826eb4;
    color: #826eb4 !important;
}

#wpadminbar #wp-admin-bar-shop-sales-stats-year > .ab-item {
    border-color: #d63638;
    color: #d63638 !important;
}

/* 确保销售统计菜单项显示在top-secondary区域（最右边） */
#wpadminbar #wp-admin-bar-top-secondary [id^="wp-admin-bar-shop-sales-stats-"] {
    display: list-item !important;
}

/* 在销售统计菜单项之间添加分隔 */
#wpadminbar #wp-admin-bar-top-secondary [id^="wp-admin-bar-shop-sales-stats-"]:not(:last-child)::after {
    content: '';
    display: none; /* 使用margin代替分隔线 */
}

/* 确保快速链接在左侧，销售统计在右侧 */
#wpadminbar [id^="wp-admin-bar-shop-quick-"] {
    display: list-item !important;
}

/* ========================================
   商城管理仪表板头部样式 - 简洁精致
   ======================================== */

/* 仪表板头部区域 */
.shop-dashboard-header {
    margin-bottom: 20px;
}

/* 主题介绍区域 - 简洁精致（包含标题） */
.shop-theme-intro {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 18px 20px;
}

/* 标题样式 - 简洁优雅（在框内） */
.shop-dashboard-title {
    font-size: 23px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 15px 0;
    padding: 0;
    line-height: 1.3;
}

.theme-intro-content {
    max-width: 100%;
}

.theme-intro-description {
    font-size: 13px;
    line-height: 1.8;
    color: #50575e;
    margin: 0;
}

.theme-intro-description strong {
    color: #2271b1;
    font-weight: 600;
}

/* 官网链接样式 */
.theme-website-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.theme-website-link:hover {
    color: #135e96;
    text-decoration: underline;
}

/* 功能特性内联样式 */
.theme-features-inline {
    display: inline;
    margin-left: 8px;
}

.feature-item-inline {
    display: inline-block;
    font-size: 13px;
    color: #50575e;
    margin-left: 12px;
    white-space: nowrap;
}

.feature-item-inline:first-child {
    margin-left: 0;
}

/* 响应式优化 */
@media (max-width: 782px) {
    .shop-dashboard-title {
        font-size: 20px;
    }
    
    .shop-theme-intro {
        padding: 15px 18px;
    }
    
    .theme-intro-description {
        font-size: 12px;
        line-height: 1.7;
    }
    
    .feature-item-inline {
        font-size: 12px;
        margin-left: 10px;
    }
}

@media (max-width: 480px) {
    .shop-theme-intro {
        padding: 12px 15px;
    }
    
    .theme-intro-description {
        font-size: 12px;
    }
    
    .feature-item-inline {
        display: block;
        margin-left: 0;
        margin-top: 6px;
    }
    
    .feature-item-inline:first-child {
        margin-top: 0;
    }
}

