/* ===== 排名页（rank.php）优化样式 ===== */
/* 仅作用于 .rank-page，不污染后台其他页面 */

.rank-page { background: #f3f5fa; }

/* 统计卡片 */
.rank-page .ibox {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(18, 38, 63, .08);
    transition: transform .3s ease, box-shadow .3s ease;
}
.rank-page .ibox:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(18, 38, 63, .14);
}
.rank-page .ibox-title {
    border: 0;
    background: #fff;
    border-left: 4px solid #0d8eff;
    border-radius: 16px 16px 0 0;
    padding: 14px 18px;
}
.rank-page .ibox-content {
    border: 0;
    background: #fff;
    border-radius: 0 0 16px 16px;
    padding: 20px;
}
.rank-page .ibox h1.no-margins {
    color: #1b2a4e;
    font-weight: 800;
    letter-spacing: .5px;
}
.rank-page .ibox .stat-percent { font-size: 13px; }
.rank-page .ibox small { color: #8a94a6; }

/* 折线图容器 */
#morris-one-line-chart { height: 320px; }

/* ===== 吞吐量排名横向条形图 ===== */
.airport-rank {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 2px;
}
.rank-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.rank-badge {
    flex: 0 0 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: #c4ccd9;
    font-size: 15px;
}
.rank-row.is-top1 .rank-badge {
    background: linear-gradient(135deg, #ffd968, #f5a200);
    box-shadow: 0 6px 14px rgba(245, 162, 0, .35);
}
.rank-row.is-top2 .rank-badge {
    background: linear-gradient(135deg, #e3e9f0, #a9b6c6);
    box-shadow: 0 6px 14px rgba(169, 182, 198, .35);
}
.rank-row.is-top3 .rank-badge {
    background: linear-gradient(135deg, #f3b184, #c97c34);
    box-shadow: 0 6px 14px rgba(201, 124, 52, .35);
}
.rank-main { flex: 1; min-width: 0; }
.rank-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 7px;
}
.rank-name {
    font-weight: 600;
    color: #1b2a4e;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-num {
    font-weight: 700;
    color: #0d8eff;
    font-size: 14px;
    white-space: nowrap;
}
.rank-num em {
    font-style: normal;
    font-weight: 500;
    color: #8a94a6;
    font-size: 12px;
    margin-left: 3px;
}
.rank-track {
    height: 12px;
    background: #eef1f7;
    border-radius: 8px;
    overflow: hidden;
}
.rank-bar {
    height: 100%;
    width: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, #39c6ff, #0d8eff);
    animation: rankGrow 1.2s cubic-bezier(.22, 1, .36, 1) forwards;
}
.rank-row.is-top1 .rank-bar { background: linear-gradient(90deg, #ffd968, #f5a200); }
.rank-row.is-top2 .rank-bar { background: linear-gradient(90deg, #e3e9f0, #9fb0c4); }
.rank-row.is-top3 .rank-bar { background: linear-gradient(90deg, #f3b184, #c97c34); }
@keyframes rankGrow { to { width: var(--w); } }

/* 数据表格 */
.rank-page .dataTables-example { border-radius: 12px; overflow: hidden; }
.rank-page .table > thead > tr > th {
    background: #1b2a4e !important;
    color: #fff !important;
    border: 0 !important;
    font-weight: 600;
    letter-spacing: .3px;
}
.rank-page .table-striped > tbody > tr:nth-of-type(odd) { background: #fafbfe; }
.rank-page .table > tbody > tr:hover { background: #eaf3ff !important; }

/* ===== 吞吐量排名（表格）===== */
/* 与「排名前十」条形图共用同一套徽章 / 条形 / 金银铜配色 */
.rank-page .dataTables-example { border: 0; }
.rank-page .table-bordered > thead > tr > th,
.rank-page .table-bordered > tbody > tr > td { border-color: #eef1f7; }

.rank-page .rk-airport {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.rank-page .rk-badge {
    flex: 0 0 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    background: #c4ccd9;
}
.rank-page .rk-badge.is-top1 {
    background: linear-gradient(135deg, #ffd968, #f5a200);
    box-shadow: 0 6px 14px rgba(245, 162, 0, .35);
}
.rank-page .rk-badge.is-top2 {
    background: linear-gradient(135deg, #e3e9f0, #a9b6c6);
    box-shadow: 0 6px 14px rgba(169, 182, 198, .35);
}
.rank-page .rk-badge.is-top3 {
    background: linear-gradient(135deg, #f3b184, #c97c34);
    box-shadow: 0 6px 14px rgba(201, 124, 52, .35);
}
.rank-page .rk-name { font-weight: 600; color: #1b2a4e; }
.rank-page .rk-sort { font-weight: 700; color: #8a94a6; text-align: center; }
.rank-page .rk-value { min-width: 170px; }
.rank-page .rk-num { font-weight: 700; color: #0d8eff; }
.rank-page .rk-track {
    display: block;
    height: 8px;
    margin-top: 6px;
    background: #eef1f7;
    border-radius: 6px;
    overflow: hidden;
}
.rank-page .rk-bar {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #39c6ff, #0d8eff);
}
.rank-page tr.rk-top1 .rk-bar { background: linear-gradient(90deg, #ffd968, #f5a200); }
.rank-page tr.rk-top2 .rk-bar { background: linear-gradient(90deg, #e3e9f0, #9fb0c4); }
.rank-page tr.rk-top3 .rk-bar { background: linear-gradient(90deg, #f3b184, #c97c34); }
.rank-page .rk-flight {
    text-align: right;
    color: #5b6779;
    font-variant-numeric: tabular-nums;
}
.rank-page .rk-rate { text-align: right; font-weight: 600; color: #8a94a6; }
.rank-page .rk-rate.is-up { color: #22a06b; }
.rank-page .rk-rate.is-down { color: #e0453b; }
.rank-page .rk-row { transition: background .25s ease; }
.rank-page .table > tbody > tr.rk-row:hover { background: #eef5ff !important; }

/* 标题区 */
.rank-page .page-heading h2 { color: #1b2a4e; font-weight: 800; }

/* ===== 交互与细节增强（纯前端） ===== */

/* 排名条：整行 hover 高亮 + 平滑过渡 + 条形提亮 */
.rank-row {
    padding: 8px 10px;
    border-radius: 12px;
    transition: background .25s ease, transform .25s ease;
}
.rank-row:hover {
    background: #eef5ff;
    transform: translateX(3px);
}
.rank-row:hover .rank-bar {
    filter: brightness(1.06);
}
.airport-rank { gap: 10px; }

/* 表格 Top3 奖牌左条 + 浅底色（与条形图金银铜呼应） */
.rank-page .table > tbody > tr.rk-top1 {
    box-shadow: inset 4px 0 0 #f5a200 !important;
    background: rgba(245, 162, 0, .08) !important;
}
.rank-page .table > tbody > tr.rk-top2 {
    box-shadow: inset 4px 0 0 #a9b6c6 !important;
    background: rgba(169, 182, 198, .08) !important;
}
.rank-page .table > tbody > tr.rk-top3 {
    box-shadow: inset 4px 0 0 #c97c34 !important;
    background: rgba(201, 124, 52, .08) !important;
}

/* 表头吸顶 */
.rank-page .table > thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* 统计卡左侧渐变色条装饰 */
.rank-page .wrapper-content > .row:first-child .ibox {
    position: relative;
    overflow: hidden;
}
.rank-page .wrapper-content > .row:first-child .ibox::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #0d8eff, #36c2ff);
}

/* 表格横向滚动更顺滑 */
.rank-page .table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* 空数据态（数据为空时提示） */
.airport-rank:empty::after {
    content: "暂无排名数据";
    display: block;
    width: 100%;
    text-align: center;
    color: #8a94a6;
    padding: 40px 0;
    font-size: 14px;
}

/* 移动端收口 */
@media (max-width: 768px) {
    .rank-page .wrapper-content > .row:first-child .col-lg-3 { margin-bottom: 16px; }
    .rank-badge { flex-basis: 28px; height: 28px; font-size: 13px; }
    .rank-name { font-size: 13px; }
    .rank-num { font-size: 12px; }
    .rank-num em { font-size: 10px; }
    .rank-line { flex-wrap: wrap; row-gap: 2px; }
    .rank-num { width: 100%; text-align: right; }
    .rank-row { padding: 6px 8px; }
    .rank-track { height: 10px; }
    #morris-one-line-chart { height: 260px; }
    .rank-page .ibox-content { padding: 14px; }
    .rank-page .table > thead > tr > th { white-space: nowrap; font-size: 12px; padding: 8px 6px; }
    .rank-page .rk-badge { flex-basis: 26px; height: 26px; font-size: 12px; }
    .rank-page .rk-name { font-size: 13px; }
    .rank-page .rk-value { min-width: 120px; }
    .rank-page .rk-track { height: 6px; margin-top: 4px; }
    .col-lg-12 {padding-left: 0; padding-right: 0;}
}

/* 超小屏（手机）：与 PC 改版视觉对齐的细节打磨 */
@media (max-width: 576px) {
    .rank-page .page-heading h2 { font-size: 18px; }
    .rank-page .wrapper-content { padding: 12px; }
    .rank-page .ibox-title { padding: 12px 14px; }
    .rank-page .ibox-content { padding: 12px; }
    .rank-page .rk-value { min-width: 88px; }
    .rank-page .rk-name { font-size: 12px; }
    .rank-page .rk-badge { flex-basis: 22px; height: 22px; font-size: 11px; }
    .rank-page .table > tbody > td { padding: 10px 6px; }
    .airport-rank { gap: 8px; }
    .rank-row { padding: 5px 7px; }
}
