﻿
/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    font-family: "Helvetica", "Tahoma", "Arial", "PingFang SC", "Microsoft Yahei", "SimSun", "SimHei", "sans-serif";
}
.nav-content {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-shrink: 0;
}
/* 页面容器 */
.container {
    margin: 0 16px;
}

@media (min-width: 768px) {
    .container {
        margin: 0 24px;
    }
}

@media (min-width: 1024px) {
    .container {
        margin: 0 1px;
    }
}

/* 卡片容器样式 */
.card-wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 16px;
    gap: 8px;
}

.card-item {
    flex: 1;
    min-width: 200px;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 4px;
}

/* 数据卡片样式 */
.card-green {
    background-color: #16a34a;
    color: white;
}

.card-white {
    background-color: #ffffff;
    color: #1f2937;
}

.card-headerr {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-text-sm {
    font-size: 14px;
    margin-bottom: 4px;
}

.card-text-xl {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-text-xs {
    font-size: 12px;
    opacity: 0.8;
}

.card-icon-white {
    background-color: rgba(255, 255, 255, 0.2);
}

.card-icon-green {
    background-color: #dcfce7;
    color: #16a34a;
}

.main-content {
    padding: 0px;
    /*margin-left: 215px;*/
    background-color: #eeeeee;
}

/* 面板通用样式 */
.panel {
    background-color: white;
    border-radius: 8px;
    padding: 24px;
    margin-top: 16px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.panel-title {
    font-weight: 500;
    font-size: 16px;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

@media (min-width: 640px) {
    .btn-group {
        margin-top: 0;
    }
}

.btn {
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-gray {
    background-color: #f3f4f6;
    color: #4b5563;
}

.btn-gray:hover {
    background-color: #e5e7eb;
}

.btn-green {
    background-color: #16a34a;
    color: white;
}

.btn-green:hover {
    background-color: #15803d;
}

/* 地图区域样式 */
.map-flex {
    display: flex;
}

.legend-container {
    width: 96px;
    margin-right: 16px;
    flex-shrink: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.legend-color {
    width: 12px;
    height: 12px;
    margin-right: 8px;
}

.legend-text {
    font-size: 12px;
}

.map-content {
    flex: 1;
    display: flex;
}

.map-container {
    width: calc(100% - 240px);
    height: 350px;
    border-radius: 4px;
}

.rank-container {
    margin-left: 16px;
    width: 280px;
    flex-shrink: 0;
}

.rank-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: #e7e7e7;
    border-radius: var(--td-radius-default);
    color: rgb(0 0 0);
    line-height: 44px;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.text-red {
    color: #dc2626;
    font-weight: 500;
}

.text-orange-600 {
    color: #ea580c;
    font-weight: 500;
}

.text-orange-500 {
    color: #f97316;
    font-weight: 500;
}

.text-yellow-500 {
    color: #eab308;
    font-weight: 500;
}

.text-yellow-400 {
    color: #facc15;
    font-weight: 500;
}

.text-gray-700 {
    color: #374151;
}

/* 仪表盘区域样式 */
.dashboard-flex {
    display: flex;
}

.gauge-container {
    width: calc(100% - 500px);
    padding: 16px;
    height: 350px;
}

.table-container {
    margin-left: -96px;
    width: 700px;
    flex-shrink: 0;
}

.table-header {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.table-body {
    max-height: 300px;
    overflow-y: auto;
}

.table-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
}

.table-row:hover {
    background-color: #f9fafb;
}

.text-center {
    /*text-align: center;*/
}

.text-gray-400 {
    color: #9ca3af;

}

/* 下载量排行样式 */
.download-panel {
    margin-bottom: 24px;
}

.download-rank-header {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.download-rank-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-rank-item {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
}

.download-rank-item:hover {
    background-color: #f9fafb;
}

.text-red-500 {
    color: #ef4444;
    font-weight: 700;
}

.text-orange-500 {
    color: #f97316;
    font-weight: 700;
}

.text-yellow-600 {
    color: #ca8a04;
    font-weight: 700;
}

.app-icon {
    width: 32px;
    height: 32px;
    background-color: #e5e7eb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-sm {
    font-size: 14px;
    font-weight: 500;
}

.text-xs {
    font-size: 12px;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-800 {
    color: #1f2937;
    font-weight: 500;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
}

.more-btn {
    margin-top: 16px;
    text-align: center;
}

.btn-outline {
    padding: 4px 16px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    background-color: white;
    cursor: pointer;
}

.btn-outline:hover {
    background-color: #f9fafb;
}

/* 响应式样式 */
@media (max-width: 1200px) {
    .dashboard-flex {
        flex-direction: column;
    }
    .gauge-container, .table-container {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 16px;
    }
    .gauge-container {
        height: 300px !important;
    }
}

@media (max-width: 768px) {
    .map-flex {
        flex-direction: column;
    }
    .legend-container {
        margin-bottom: 16px;
        margin-right: 0 !important;
    }
    .map-container {
        display: none !important; /* 手机端完全隐藏地图 */
    }
    .rank-container {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 16px;
    }
    .card-item {
        min-width: 100% !important;
        margin-bottom: 8px;
    }
    .gauge-container {
        height: 250px !important;
    }
    .download-rank-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .download-rank-header {
        display: none;
    }
    .download-rank-mobile-label {
        display: inline-block;
        width: 40px;
        font-weight: 600;
        color: #6b7280;
    }
}

@media (min-width: 769px) {
    .download-rank-mobile-label {
        display: none;
    }
}