/* 顶部导航栏 */
.app-navbar {
    background-color: #1f2937 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.app-nav-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.app-nav-panel {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.5rem;
}
.app-navbar .navbar-brand,
.app-navbar .nav-link,
.app-navbar .nav-dropdown-toggle {
    color: rgba(255, 255, 255, 0.88);
}
.app-navbar .navbar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}
.app-navbar .nav-link {
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
    background-color: #3b82f6;
    color: #ffffff;
}
.app-navbar .nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background-color: transparent;
}
.app-navbar .nav-dropdown-toggle:hover,
.app-navbar .nav-dropdown-toggle:focus,
.app-navbar .nav-dropdown-toggle.show {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}
.app-navbar .dropdown-menu {
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.app-navbar .dropdown-item.active,
.app-navbar .dropdown-item:active {
    background-color: #3b82f6;
}
.app-nav-toggle,
.app-nav-drawer-head {
    display: none;
}
.app-nav-backdrop {
    display: none;
}

/* 小屏（<768px）：业务菜单收进汉堡按钮，点击展开抽屉式菜单 */
@media (max-width: 767.98px) {
    body.app-nav-open {
        overflow: hidden;
    }
    .app-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        margin-left: auto;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 6px;
        background-color: transparent;
        color: #ffffff;
        font-size: 1.25rem;
        line-height: 1;
    }
    .app-nav-toggle:hover,
    .app-nav-toggle:active {
        background-color: #3b82f6;
        border-color: #3b82f6;
    }
    .app-nav-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 82%;
        max-width: 320px;
        padding-bottom: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow-y: auto;
        background-color: #111827;
        border-left: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
        transform: translateX(102%);
        transition: transform 0.22s ease;
        z-index: 1060;
    }
    .app-nav-panel.show {
        transform: translateX(0);
    }
    .app-nav-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        color: #ffffff;
        font-weight: 600;
    }
    .app-nav-close {
        border: 0;
        background: transparent;
        color: #ffffff;
        font-size: 1.05rem;
        padding: 4px 8px;
        line-height: 1;
    }
    .app-navbar .navbar-nav {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        width: 100%;
        margin-right: 0 !important;
        padding: 8px;
        gap: 4px;
    }
    .app-navbar .nav-link {
        display: block;
        padding: 10px 12px;
    }
    .app-nav-panel > .d-flex {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 8px 12px;
    }
    .app-navbar .dropdown {
        width: 100%;
    }
    .app-navbar .nav-dropdown-toggle {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 12px;
    }
    .app-navbar .dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
        margin: 4px 0;
        padding: 4px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background-color: #1b2533;
        box-shadow: none;
    }
    .app-navbar .dropdown-item {
        color: #e5e7eb;
        border-radius: 4px;
    }
    .app-navbar .dropdown-item:hover,
    .app-navbar .dropdown-item:focus {
        background-color: #3b82f6;
        color: #ffffff;
    }
    .app-navbar .dropdown-divider {
        border-top-color: rgba(255, 255, 255, 0.12);
    }
    .app-nav-backdrop {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease;
        z-index: 1055;
    }
    .app-nav-backdrop.show {
        opacity: 1;
        visibility: visible;
    }
}

/* 表格表头吸顶：容器内滚动时表头固定在顶部 */
.table-responsive thead th,
.sum-scroll thead th,
.ta-table-wrap thead th,
.ns-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background-color: #f5f7fa;
    box-shadow: inset 0 -1px 0 #e5e7eb;
}

/* 小屏表格：外层横向滚动，避免硬挤 */
@media (max-width: 767.98px) {
    .table-responsive,
    .sum-scroll,
    .ta-table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .table-responsive > table,
    .sum-scroll > table,
    .ta-table-wrap > table {
        min-width: 640px;
    }
}

/* 卡片统一风格：圆角、阴影、标题与描述字号 */
.card {
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}
.card .card-header,
.card h6 {
    font-size: 16px;
    font-weight: 600;
}
.card .text-muted,
.card .small {
    font-size: 13px;
    color: #6b7280 !important;
}
/* 数据数字统一 */
.summary-card .summary-value,
.stat-chip .stat-val,
.box-stat-value,
.ns-stat-value {
    font-size: 20px;
    font-weight: 700;
}

/* 游戏卡片 */
.game-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid #e9ecef;
}
.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12) !important;
    border-color: #3b82f6;
}

.stat-chip {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.stat-chip .stat-val {
    font-weight: 700;
    color: #1f2937;
    font-size: 20px;
}
.stat-chip .stat-lbl {
    color: #6c757d;
}

/* 汇总卡片 */
.summary-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
}
.summary-card .summary-value {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    word-break: break-all;
}

/* 表格粘性表头 */
.sticky-top {
    top: 0;
    z-index: 10;
}

/* 表格滚动区域 */
.table-responsive {
    max-height: 600px;
}

/* ===== 全站主色：深灰 #1f2937 / 高亮蓝 #3b82f6 ===== */
a { color: #1f2937; }
a:hover, a:focus { color: #3b82f6; }

.btn-primary {
    --bs-btn-bg: #1f2937;
    --bs-btn-border-color: #1f2937;
    --bs-btn-hover-bg: #3b82f6;
    --bs-btn-hover-border-color: #3b82f6;
    --bs-btn-active-bg: #3b82f6;
    --bs-btn-active-border-color: #3b82f6;
    --bs-btn-disabled-bg: #6b7280;
    --bs-btn-disabled-border-color: #6b7280;
}
.btn-outline-primary {
    --bs-btn-color: #1f2937;
    --bs-btn-border-color: #1f2937;
    --bs-btn-hover-bg: #1f2937;
    --bs-btn-hover-border-color: #1f2937;
    --bs-btn-active-bg: #1f2937;
    --bs-btn-active-border-color: #1f2937;
}
.btn-link {
    --bs-btn-color: #1f2937;
    --bs-btn-hover-color: #3b82f6;
}
.text-primary { color: #1f2937 !important; }
.bg-primary { background-color: #1f2937 !important; }
.border-primary { border-color: #1f2937 !important; }
.page-link { color: #1f2937; }
.page-link:hover { color: #3b82f6; }
.page-item.active .page-link { background-color: #1f2937; border-color: #1f2937; }
.nav-tabs .nav-link.active { color: #1f2937; }
.nav-pills .nav-link.active { background-color: #1f2937; }
.dropdown-item.active, .dropdown-item:active { background-color: #1f2937; }
.list-group-item.active { background-color: #1f2937; border-color: #1f2937; }
.progress-bar { background-color: #1f2937; }
.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}
.form-check-input:checked { background-color: #1f2937; border-color: #1f2937; }
