/* Dashboard 页面自定义样式 - 紧凑高级设计 */
.stat-card {
    border: 1px solid rgba(0,0,0,0.05) !important;
    transition: all 0.2s ease-in-out;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    transform: translateY(-1px);
}

/* 紧凑版图标样式 */
.stat-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.stat-icon-files {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.stat-icon-storage {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.stat-icon-feedback {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.stat-icon-task {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.stat-icon-invitation {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

/* 确保一屏显示的全局样式 */
.container-fluid.main-content {
    max-height: 100vh;
    overflow-y: auto;
    padding-top: 1rem;
}

/* 减少边距以节省空间 */
.row.mb-4 {
    margin-bottom: 1rem !important;
}

.row.mb-3 {
    margin-bottom: 0.75rem !important;
}

/* 确保一屏显示优化（仅作用于带 main-content 的容器，避免误伤我的文件页） */
@media (min-height: 768px) {
    .container-fluid.main-content {
        height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .container-fluid.main-content > .card:last-child {
        flex: 1;
        min-height: 0;
    }
    
    .container-fluid.main-content > .card:last-child .card-body {
        height: 100%;
        overflow-y: auto;
    }
}

/* 文件列表紧凑显示 */
.table td {
    padding: 0.5rem !important;
    vertical-align: middle;
}

.table th {
    padding: 0.75rem 0.5rem !important;
}

/* 移动端优化 */
@media (max-width: 991px) {
    .stat-card .card-body {
        padding: 0.75rem !important;
    }
    
    .stat-icon-wrapper {
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
    }
}

/* 用户信息卡片样式 */
.user-profile-card {
    background: #f8f9fa;
}

/* 用户徽章 */
.user-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* 进度条优化 */
.progress {
    background-color: #f8f9fa;
    border-radius: 1rem;
    overflow: hidden;
}

.progress-bar {
    border-radius: 1rem;
}

/* 徽章优化 */
.badge {
    font-weight: 500;
    letter-spacing: 0.025em;
    border: 1px solid rgba(0,0,0,0.1);
}

/* 按钮优化 */
.btn {
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* 超小按钮样式 */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 0.375rem;
}

.btn-dark {
    background-color: #212529;
    border-color: #212529;
}

.btn-dark:hover {
    background-color: #1a1e21;
    border-color: #1a1e21;
    box-shadow: 0 4px 12px rgba(33, 37, 41, 0.3);
}

.btn-outline-dark:hover {
    background-color: #212529;
    border-color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 37, 41, 0.2);
}

/* 表格列宽度控制 */
.table th:nth-child(1), .table td:nth-child(1) {
    width: 250px;
    max-width: 250px;
    overflow: hidden;
}

.table th:nth-child(2), .table td:nth-child(2) {
    width: 200px;
    max-width: 200px;
    overflow: hidden;
}

.table th:nth-child(3), .table td:nth-child(3) {
    width: 100px;
    max-width: 100px;
}

.table th:nth-child(4), .table td:nth-child(4) {
    width: 150px;
    max-width: 150px;
}

.table th:nth-child(5), .table td:nth-child(5) {
    width: auto;
    min-width: 400px;
}

/* 图标容器优化 */
.bg-light {
    border: 1px solid rgba(0,0,0,0.05);
}

/* 文字层次优化 */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em;
}

.text-muted {
    color: #6c757d !important;
}

/* 移动端兼容优化 */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .btn-lg {
        padding: 0.75rem 2rem !important;
        font-size: 1rem !important;
    }
    
    /* 表格在移动端隐藏，显示卡片视图 */
    .table-responsive {
        display: none !important;
    }
    
    .mobile-card-view {
        display: block !important;
    }
    
    /* 移动端模态框优化 */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    /* 移动端文件上传区域优化 */
    .upload-area {
        padding: 2rem 1rem !important;
        min-height: 200px !important;
    }
    
    /* 移动端统计卡片优化 */
    .row.g-4 {
        gap: 1rem !important;
    }
    
    .col-md-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* 移动端用户信息优化 */
    .d-flex.align-items-center.gap-3 {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }
    
    .d-flex.align-items-center.gap-3 > div {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .d-flex.align-items-center.gap-3 .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .d-flex.align-items-center.gap-3 .fw-bold {
        font-size: 0.8rem;
    }
    
    .d-flex.align-items-center.gap-3 small {
        font-size: 0.7rem;
    }
    
    .d-flex.align-items-center.gap-3 .bi {
        font-size: 0.8rem;
    }
    
    /* 移动端按钮优化 */
    .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* 移动端文件卡片优化 */
    .card .btn-group {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 0.2rem !important;
    }
    
    .card .btn-group .btn {
        flex: 1 !important;
        min-width: 0 !important;
        margin: 0 !important;
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    .card .text-muted {
        font-size: 0.75rem !important;
    }
    
    .card .badge {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    .card a {
        word-break: break-all !important;
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
    }
    
    .card-body {
        padding: 0.5rem !important;
    }
    
    /* 防止iOS缩放 */
    input, select, textarea {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .btn-group-sm .btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .badge {
        font-size: 0.7rem;
    }
    
    .card-header h5 {
        font-size: 0.9rem;
    }
    
    /* 超小屏幕优化 */
    .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    /* 移动端用户信息更紧凑显示 */
    .d-flex.align-items-center.gap-3 {
        gap: 0.25rem !important;
    }
    
    .d-flex.align-items-center.gap-3 .badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }
    
    .d-flex.align-items-center.gap-3 .fw-bold {
        font-size: 0.7rem;
    }
    
    .d-flex.align-items-center.gap-3 small {
        font-size: 0.6rem;
    }
    
    .d-flex.align-items-center.gap-3 .bi {
        font-size: 0.7rem;
    }
}

/* 平板端优化 */
@media (min-width: 577px) and (max-width: 991px) {
    .col-md-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .table-responsive {
        display: none !important;
    }
    
    .mobile-card-view {
        display: block !important;
    }
}

/* 大屏幕优化 */
@media (min-width: 992px) {
    .mobile-card-view {
        display: none !important;
    }
    
    .table-responsive {
        display: block !important;
    }
}

/* 紧凑设计优化 */
.compact-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

.stat-card {
    border: 1px solid rgba(0,0,0,0.05);
}

.stat-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

/* 激励元素样式 */
.upgrade-hint {
    background: #28a745;
    color: white;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
}

.upgrade-hint:hover {
    background: #218838;
    color: white;
    text-decoration: none;
}

.points-boost {
    background: #f093fb;
    color: white;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 500;
}

.activity-boost {
    background: #28a745;
    color: white;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* 滚动条样式 */
.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 超链接绿色样式 */
a {
    color: #28a745 !important;
    text-decoration: none;
}

a:hover {
    color: #20c997 !important;
    text-decoration: underline;
}

a:visited {
    color: #218838 !important;
}

/* 文件名超链接特殊样式 */
a.fw-medium {
    color: #28a745 !important;
    font-weight: 600;
}

a.fw-medium:hover {
    color: #20c997 !important;
    text-decoration: underline;
}

/* 精选说明中的超链接样式 */
.alert-link {
    color: #28a745 !important;
    font-weight: 600;
    text-decoration: none;
}

.alert-link:hover {
    color: #20c997 !important;
    text-decoration: underline;
}

/* 带粗体的超链接样式 */
a.fw-bold {
    color: #28a745 !important;
    font-weight: 700;
    text-decoration: none;
}

a.fw-bold:hover {
    color: #20c997 !important;
    text-decoration: underline;
}

/* 普通超链接样式 */
a.text-decoration-none {
    color: #28a745 !important;
    text-decoration: none;
}

a.text-decoration-none:hover {
    color: #20c997 !important;
    text-decoration: underline;
}

/* 排行榜弹窗样式 */
.leaderboard-modal-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 16px 0;
    background: #fafbfc;
}

.leaderboard-modal-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin: 0 12px 8px 12px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.leaderboard-modal-item:hover {
    background: #f8fff8;
    border-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

/* 前三名特殊样式 */
.leaderboard-modal-item.rank-1 {
    background: #fff9e6;
    border-color: #ffd700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.1);
}

.leaderboard-modal-item.rank-2 {
    background: #f8fafc;
    border-color: #c0c0c0;
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.1);
}

.leaderboard-modal-item.rank-3 {
    background: #fef7f0;
    border-color: #cd7f32;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.1);
}

.rank-badge {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.rank-medal {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.rank-medal.gold {
    background: #ffd700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.rank-medal.silver {
    background: #c0c0c0;
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.4);
}

.rank-medal.bronze {
    background: #cd7f32;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.4);
}

.rank-number {
    font-weight: 700;
    color: #495057;
    font-size: 1.1rem;
    background: #f8f9fa;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 3px solid #dee2e6;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.author-info {
    flex: 1;
    min-width: 0;
    margin-right: 16px;
}

.author-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.leaderboard-modal-item:hover .author-name {
    color: #28a745;
}

.author-username {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.tool-count {
    text-align: right;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.count-badge {
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.count-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

/* 滚动条样式 */
.leaderboard-modal-list::-webkit-scrollbar {
    width: 6px;
}

.leaderboard-modal-list::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.leaderboard-modal-list::-webkit-scrollbar-thumb {
    background: #28a745;
    border-radius: 3px;
}

.leaderboard-modal-list::-webkit-scrollbar-thumb:hover {
    background: #218838;
}

/* 排行榜弹窗标题优化 */
#leaderboardModalLabel {
    color: #ffffff !important;
    font-weight: 600 !important;
    letter-spacing: -0.025em;
    font-size: 1.375rem !important;
    line-height: 1.3;
    text-shadow: none;
}

.modal-header .trophy-icon {
    color: #ffc107 !important;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
    text-shadow: none;
}

/* 排行榜弹窗整体优化 */
#leaderboardModal .modal-content {
    overflow: hidden;
}

#leaderboardModal .modal-header {
    padding: 1.25rem 1.5rem;
    background: #28a745;
}

#leaderboardModal .modal-footer {
    border-radius: 0 0 1rem 1rem;
}

/* 统计卡片样式 */
.stats-card:hover {
    transform: translateY(-2px);
}

.stat-item {
    padding: 0.5rem 0;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.stats-icon {
    opacity: 0.8;
}

/* 响应式优化 */
@media (max-width: 991px) {
    .modal-dialog {
        max-width: 90%;
        margin: 1rem auto;
    }
}

@media (max-width: 768px) {
    .leaderboard-modal-item {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .rank-badge {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .rank-number {
        font-size: 1rem;
    }
    
    .author-name {
        font-size: 0.9rem;
        max-width: 100px;
    }
    
    .author-username {
        font-size: 0.75rem;
        max-width: 100px;
    }
    
    .count-badge {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}

/* ================== 分页和懒加载样式 ================== */

/* 文件列表底部分页 */
.dk-file-pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid #e9ecef;
    background: #f8faf9;
}

.dk-file-pagination__info {
    font-size: 0.8125rem;
    color: #6b7280;
    white-space: nowrap;
}

.dk-file-pagination__nav {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.dk-file-pagination__page {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 0.8125rem;
    color: #6b7280;
    padding: 0 0.35rem;
    min-width: 4.5rem;
    text-align: center;
}

.dk-file-pagination__btn {
    min-width: 4.25rem;
    white-space: nowrap;
}

.dk-file-pagination__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 575.98px) {
    .dk-file-pagination {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .dk-file-pagination__nav {
        width: 100%;
        justify-content: center;
    }

    .dk-file-pagination__btn {
        flex: 1 1 auto;
        max-width: 7rem;
    }
}

/* 分页控制样式（兼容旧类名） */
.pagination-controls {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.pagination-controls .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 加载指示器样式 */
#loadingIndicator {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 文件列表容器最小高度，防止分页时页面跳动 */
#fileTableBody {
    min-height: 400px;
}

#fileCardContainer {
    min-height: 400px;
}

/* 文件卡片样式 */
.file-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.file-card:hover {
    border-color: rgba(13, 110, 253, 0.2);
}

/* ================== 自定义删除确认弹窗样式 ================== */

/* 删除确认弹窗基础样式 */
#deleteConfirmModal .modal-content {
    border-radius: 1rem;
    overflow: hidden;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 95vw;
    max-height: 90vh;
}

#deleteConfirmModal .modal-dialog {
    max-width: 500px;
    width: auto;
    margin: 1rem auto;
}

#deleteConfirmModal .modal-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    padding: 1.5rem;
}

#deleteConfirmModal .modal-title {
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: -0.025em;
}

#deleteConfirmModal .modal-body {
    padding: 2rem 1.5rem;
}

#deleteConfirmModal .modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem 1.5rem;
    background: #fafbfc;
}

/* 删除图标容器样式 */
#deleteConfirmModal .bg-danger.bg-opacity-10 {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border: 2px solid rgba(220, 53, 69, 0.15);
}

/* 警告信息样式 */
#deleteConfirmModal .alert-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 0.75rem;
}

#deleteConfirmModal .alert-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 0.75rem;
}

/* 按钮样式优化 */
#deleteConfirmModal .btn-light {
    background-color: #ffffff;
    border-color: #dee2e6;
    color: #6c757d;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

#deleteConfirmModal .btn-light:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
    transform: translateY(-1px);
}

#deleteConfirmModal .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

#deleteConfirmModal .btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}

#deleteConfirmModal .btn-danger:disabled {
    background: #dc3545;
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 文件信息显示样式 */
#deleteConfirmModal .alert-warning strong {
    color: #d58512 !important;
    font-weight: 600;
}

#deleteConfirmModal .alert-danger strong {
    color: #b02a37 !important;
    font-weight: 600;
}

/* 文件名显示区域优化 */
#deleteConfirmModal .file-info-container {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#deleteConfirmModal .file-name-display {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    padding: 0.5rem;
    max-height: 80px;
    overflow-y: auto;
    word-break: break-all;
    line-height: 1.4;
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 0.85rem;
    color: #495057;
    white-space: pre-wrap;
}

#deleteConfirmModal .project-name-display {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    padding: 0.5rem;
    max-height: 60px;
    overflow-y: auto;
    word-break: break-all;
    line-height: 1.4;
    color: #495057;
}

/* 滚动条样式 */
#deleteConfirmModal .file-name-display::-webkit-scrollbar,
#deleteConfirmModal .project-name-display::-webkit-scrollbar {
    width: 4px;
}

#deleteConfirmModal .file-name-display::-webkit-scrollbar-track,
#deleteConfirmModal .project-name-display::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 2px;
}

#deleteConfirmModal .file-name-display::-webkit-scrollbar-thumb,
#deleteConfirmModal .project-name-display::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

#deleteConfirmModal .file-name-display::-webkit-scrollbar-thumb:hover,
#deleteConfirmModal .project-name-display::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 响应式优化 */
@media (max-width: 576px) {
    #deleteConfirmModal .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    #deleteConfirmModal .modal-body {
        padding: 1.5rem 1rem;
    }
    
    #deleteConfirmModal .modal-footer {
        padding: 1rem;
    }
    
    #deleteConfirmModal .modal-title {
        font-size: 1rem;
    }
    
    #deleteConfirmModal .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* ========== 我的文件页：精致布局（仅排版，不改色系） ========== */
.dk-myfiles-page {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    height: auto !important;
    display: block !important;
    flex: none !important;
    overflow: visible !important;
    padding-bottom: 1.5rem;
}

.dk-myfiles-page > .dk-myfiles-profile-row {
    margin-bottom: 0.45rem !important;
}

.dk-myfiles-page > .dk-myfiles-profile-row .modern-user-profile-card {
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    padding: 0.45rem 0.65rem !important;
    gap: 0.35rem !important;
}

/* 顶部账号区紧缩（仅本页，首屏多露出文件列表） */
.dk-myfiles-page .profile-info-section {
    align-items: center !important;
    gap: 0.5rem 0.75rem !important;
    flex-wrap: wrap !important;
}

.dk-myfiles-page .profile-username {
    font-size: 0.95rem !important;
    line-height: 1.25 !important;
    flex-wrap: wrap !important;
    white-space: normal !important;
}

.dk-myfiles-page .modern-vip-badge {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.7rem !important;
    gap: 0.25rem !important;
}

.dk-myfiles-page .modern-vip-badge i {
    font-size: 0.75rem !important;
}

.dk-myfiles-page .vip-status-badge-inline {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.65rem !important;
    margin-left: 0.25rem !important;
}

.dk-myfiles-page .profile-info-right {
    gap: 0.45rem 0.65rem !important;
    flex-wrap: wrap !important;
}

.dk-myfiles-page .profile-email {
    font-size: 0.78rem !important;
}

.dk-myfiles-page .profile-follow-info {
    gap: 0.45rem 0.75rem !important;
}

.dk-myfiles-page .follow-info-item {
    font-size: 0.78rem !important;
}

.dk-myfiles-page .follow-info-item i {
    font-size: 0.85rem !important;
}

.dk-myfiles-page .profile-actions-section {
    padding-top: 0.35rem !important;
}

.dk-myfiles-page .action-buttons-group {
    gap: 0.35rem !important;
}

.dk-myfiles-page .action-btn-secondary {
    padding: 0.3rem 0.45rem !important;
    font-size: 0.72rem !important;
    border-radius: 5px !important;
    gap: 0.25rem !important;
}

.dk-myfiles-page .action-btn-secondary i {
    font-size: 0.8rem !important;
}

/* 矮屏再压一档 */
@media (max-height: 820px) and (min-width: 768px) {
    .dk-myfiles-page > .dk-myfiles-profile-row .modern-user-profile-card {
        padding: 0.35rem 0.55rem !important;
        gap: 0.25rem !important;
    }

    .dk-myfiles-page .profile-username {
        font-size: 0.88rem !important;
    }

    .dk-myfiles-page .action-btn-secondary {
        padding: 0.25rem 0.4rem !important;
        font-size: 0.68rem !important;
    }

    .dk-myfiles-overview .card-header.dk-myfiles-overview-head {
        padding-top: 0.35rem !important;
        padding-bottom: 0.25rem !important;
    }

    .dk-myfiles-overview > .card-body {
        padding-top: 0.4rem !important;
        padding-bottom: 0.5rem !important;
    }

    .dk-myfiles-overview .dk-metrics-grid {
        gap: 0.4rem !important;
    }
}

/* 概览主卡 */
.dk-myfiles-overview {
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
    margin-bottom: 0.5rem !important;
}

.dk-myfiles-overview-head {
    border-bottom: 1px solid #f0f0f0 !important;
}

.dk-myfiles-hero-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.dk-myfiles-overview .card-header.dk-myfiles-overview-head {
    padding: 0.5rem 0.75rem 0.35rem !important;
}

.dk-myfiles-overview > .card-body {
    padding: 0.5rem 0.75rem 0.65rem !important;
}

@media (min-width: 768px) {
    .dk-myfiles-overview .card-header.dk-myfiles-overview-head {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .dk-myfiles-overview > .card-body {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

.dk-section-caption {
    font-size: 0.69rem;
    font-weight: 600;
    color: #6c757d;
    letter-spacing: 0.04em;
    text-transform: none;
    margin: 0;
}

.dk-myfiles-overview .dk-section-caption {
    margin-bottom: 0.35rem !important;
}

.dk-myfiles-overview .dk-section-caption.mt-3 {
    margin-top: 0.5rem !important;
}

/* 数据汇总：12 列网格，消除空白 */
.dk-metrics-grid {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    margin: 0 !important;
}

.dk-metrics-grid > .dk-summary-stat-col {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

@media (min-width: 768px) {
    .dk-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .dk-metrics-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 0.55rem;
    }

    .dk-metrics-grid > .dk-summary-stat-col:nth-child(1) {
        grid-column: 1 / span 5;
    }

    .dk-metrics-grid > .dk-summary-stat-col:nth-child(2) {
        grid-column: 6 / span 7;
    }

    .dk-metrics-grid > .dk-summary-stat-col:nth-child(3) {
        grid-column: 1 / span 4;
    }

    .dk-metrics-grid > .dk-summary-stat-col--checkin {
        grid-column: 5 / span 8;
    }

    .dk-metrics-grid > .dk-summary-stat-col:nth-child(5) {
        grid-column: 1 / span 12;
    }
}

/* 指标块统一样式 */
.dk-myfiles-overview .stat-card.stat-card-compact {
    border-radius: 10px !important;
    box-shadow: none !important;
    height: 100%;
}

.dk-myfiles-overview .stat-card.stat-card-compact:not([style*="linear-gradient"]) {
    border: 1px solid #eef1f3 !important;
    background: #fafbfc !important;
}

.dk-myfiles-overview .stat-card.border-2,
.dk-myfiles-overview .stat-card.border-success {
    border: 1px solid rgba(40, 167, 69, 0.35) !important;
}

.dk-myfiles-overview .stat-card .card-body {
    padding: 0.55rem 0.65rem !important;
}

.dk-myfiles-overview .stat-card h6 {
    font-size: 0.72rem !important;
    margin-bottom: 0.25rem !important;
    color: #6c757d !important;
}

.dk-myfiles-overview .stat-card h6.text-success {
    color: #28a745 !important;
}

.dk-myfiles-overview .stat-card h3 {
    font-size: 1.35rem !important;
    line-height: 1.2;
}

.dk-myfiles-overview .stat-card small {
    font-size: 0.68rem !important;
    line-height: 1.45;
}

.dk-myfiles-overview .stat-icon-wrapper {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
}

.dk-myfiles-overview .progress {
    height: 6px !important;
    border-radius: 999px !important;
    background: #e9ecef !important;
}

/* 避免旧版 new-user-layout 内联样式破坏汇总区布局 */
.dk-myfiles-overview .dk-metrics-grid.new-user-layout .stat-card {
    min-height: auto !important;
}

.dk-myfiles-overview .dk-metrics-grid.new-user-layout .stat-card .card-body {
    display: block !important;
    height: auto !important;
}

.dk-myfiles-overview .dk-metrics-grid.new-user-layout .dk-summary-stat-col--checkin .card-body {
    display: flex !important;
}

/* 签到：横向紧凑，按钮不再拉满整行 */
.dk-summary-stat-col--checkin .card-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.dk-summary-stat-col--checkin .card-body > .d-flex.align-items-center {
    flex: 1 1 140px;
    margin-bottom: 0 !important;
}

.dk-summary-stat-col--checkin .row.g-1 {
    flex: 1 1 220px;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.375rem;
    justify-content: flex-end;
}

.dk-summary-stat-col--checkin .row.g-1 > [class*="col-"] {
    flex: 0 0 auto;
    width: auto !important;
    max-width: none;
    padding: 0 !important;
}

.dk-summary-stat-col--checkin .btn {
    font-size: 0.72rem !important;
    padding: 0.3rem 0.65rem !important;
    white-space: nowrap;
}

/* 多类型入口：统一绿/白/黑 */
.dk-types-row {
    --bs-gutter-x: 0.625rem;
    --bs-gutter-y: 0.625rem;
}

.dk-types-row .dk-type-entry-card {
    border: 1px solid #e9ecef !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
    height: 100%;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dk-types-row a:hover .dk-type-entry-card,
.dk-types-row .dk-type-entry-card:hover {
    border-color: #28a745 !important;
    background: #f8fff8 !important;
}

.dk-types-row .dk-type-entry-body {
    min-height: 44px;
    padding: 0.55rem 0.75rem !important;
}

.dk-types-row .dk-type-entry-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #28a745 !important;
    color: #fff;
}

.dk-types-row .dk-type-entry-icon i {
    font-size: 1.1rem;
    line-height: 1;
}

.dk-types-row .dk-type-entry-text h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
}

.dk-types-row .dk-type-entry-text small {
    font-size: 0.7rem;
    color: #6c757d !important;
}

/* 文件列表 */
.dk-myfiles-list-section {
    margin-bottom: 0.75rem;
}

.dk-myfiles-list-section #file-list-card {
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
}

.dk-myfiles-list-section #file-list-card .card-header {
    padding: 0.7rem 0.9rem !important;
    border-bottom: 1px solid #f0f0f0;
    background: #fff !important;
}

.dk-myfiles-list-section .file-upload-btn-header,
.dk-myfiles-list-section .dashboard-action-btn {
    box-shadow: none !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.8125rem !important;
    border-radius: 8px !important;
    font-weight: 600;
}

/* 更多服务 */
.dk-myfiles-more-services {
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    background: #fafbfc;
    margin-bottom: 0.5rem !important;
}

.dk-myfiles-more-services .card-body {
    padding: 0.65rem 0.85rem !important;
}

.dk-myfiles-more-services h5 {
    font-size: 0.8125rem !important;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem !important;
}

.dk-myfiles-more-services .row.g-2 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
}

.dk-myfiles-more-services .btn {
    font-size: 0.78rem;
    padding: 0.4rem 0.6rem !important;
    border-radius: 8px;
    text-align: left;
}

.dk-myfiles-page .card,
.dk-myfiles-page section {
    flex: none !important;
    min-height: auto !important;
}

.dk-myfiles-page #file-list-card .card-body {
    height: auto !important;
    overflow: visible !important;
}

/* ========== 方案 A：文件优先（UI 精修） ========== */
.dk-myfiles-page {
    width: 100%;
    max-width: 100%;
    padding-bottom: 1.25rem;
    color: #212529;
}

/* —— 顶栏 —— */
.dk-myfiles-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.75rem 0;
    margin-bottom: 0.65rem;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.dk-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
}

.dk-toolbar-row--main {
    padding-bottom: 0.15rem;
}

.dk-toolbar-row--meta {
    align-items: flex-start;
    gap: 0.55rem 1rem;
}

.dk-toolbar-user-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    min-width: 0;
}

.dk-toolbar-meta-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    flex: 1 1 auto;
    min-width: 0;
}

.dk-meta-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    white-space: nowrap;
}

.dk-meta-chip.profile-email {
    color: #9ca3af;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dk-meta-chip.follow-info-item {
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.dk-meta-chip.follow-info-item:hover {
    border-color: #28a745;
    color: #28a745;
    background: #f0fdf4;
}

.dk-meta-chip.follow-info-item.following {
    color: #28a745;
    border-color: #d1fae5;
    background: #f8fff8;
}

.dk-toolbar-user-line .greeting-text {
    color: #9ca3af;
    font-size: 0.8125rem;
}

.dk-toolbar-user-line .username-text {
    color: #28a745;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}

.dk-toolbar-user-line .username-text:hover {
    color: #1e7e34;
    text-decoration: underline;
}

.dk-toolbar-user-line .modern-vip-badge {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.7rem !important;
}

.dk-toolbar-user-line .vip-status-badge-inline {
    padding: 0.18rem 0.45rem !important;
    font-size: 0.65rem !important;
    margin-left: 0 !important;
}

.dk-myfiles-toolbar-user {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    min-width: 0;
    flex: 1 1 220px;
}

.dk-myfiles-page-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.dk-myfiles-page-title .bi {
    opacity: 0.9;
}

.dk-myfiles-toolbar-divider {
    color: #d1d5db;
    font-weight: 300;
}

.dk-myfiles-toolbar-user .greeting-text {
    color: #9ca3af;
    font-size: 0.8125rem;
    font-weight: 400;
}

.dk-myfiles-toolbar-user .username-text {
    color: #28a745;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}

.dk-myfiles-toolbar-user .username-text:hover {
    color: #1e7e34;
    text-decoration: underline;
}

.dk-myfiles-toolbar-meta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    font-size: 0.75rem;
    color: #6b7280;
    padding-left: 0.25rem;
    border-left: 1px solid #e5e7eb;
    margin-left: 0.15rem;
}

.dk-myfiles-toolbar-meta .profile-email {
    color: #9ca3af;
}

.dk-myfiles-toolbar-meta .follow-info-item {
    cursor: pointer;
    transition: color 0.15s ease;
}

.dk-myfiles-toolbar-meta .follow-info-item:hover {
    color: #28a745;
}

.dk-myfiles-toolbar-meta .follow-info-item.following {
    color: #28a745;
}

.dk-myfiles-toolbar-meta .follow-info-item.followers {
    color: #374151;
}

.dk-myfiles-toolbar-user .modern-vip-badge {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.7rem !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

.dk-myfiles-toolbar-user .vip-status-badge-inline {
    padding: 0.18rem 0.45rem !important;
    font-size: 0.65rem !important;
    margin-left: 0 !important;
    border-radius: 4px !important;
}

.dk-myfiles-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.dk-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #28a745;
    border: 1px solid #d1fae5;
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dk-toolbar-btn:hover {
    background: #f0fdf4;
    border-color: #28a745;
    color: #1e7e34;
}

.dk-toolbar-btn:hover i {
    color: inherit;
}

.dk-toolbar-upload,
.dk-toolbar-more-btn {
    font-size: 0.8125rem !important;
    padding: 0.35rem 0.7rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
}

.dk-toolbar-upload {
    box-shadow: 0 1px 2px rgba(40, 167, 69, 0.2);
    color: #fff !important;
}

.dk-myfiles-page .btn-success,
.dk-myfiles-page a.btn-success,
.dk-myfiles-page .dk-toolbar-upload,
.dk-myfiles-page .dk-filelist-btn--primary,
.dk-myfiles-page button.dk-filelist-btn--primary {
    color: #fff !important;
}

.dk-myfiles-page .btn-success:hover,
.dk-myfiles-page a.btn-success:hover,
.dk-myfiles-page .dk-toolbar-upload:hover,
.dk-myfiles-page .dk-filelist-btn--primary:hover,
.dk-myfiles-page button.dk-filelist-btn--primary:hover {
    color: #fff !important;
}

.dk-myfiles-page .btn-success i,
.dk-myfiles-page a.btn-success i,
.dk-myfiles-page .dk-toolbar-upload i,
.dk-myfiles-page .dk-filelist-btn--primary i,
.dk-myfiles-page .dk-filelist-btn--primary span,
.dk-myfiles-page button.dk-filelist-btn--primary i,
.dk-myfiles-page button.dk-filelist-btn--primary span {
    color: #fff !important;
}

.dk-myfiles-page a.btn-success:visited,
.dk-myfiles-page .dk-toolbar-upload:visited,
.dk-myfiles-page .dk-filelist-btn--primary:visited {
    color: #fff !important;
}

.dk-toolbar-dropdown {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.25rem 0;
    min-width: 11rem;
}

.dk-toolbar-dropdown .dropdown-item {
    font-size: 0.8125rem;
    padding: 0.4rem 0.85rem;
}

.dk-toolbar-dropdown .dropdown-item i {
    color: #28a745;
    width: 1.1rem;
}

/* —— 指标条 —— */
.dk-myfiles-metrics-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    padding: 0;
    margin-bottom: 0.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.dk-metrics-strip-foot {
    flex: 1 1 100%;
    width: 100%;
    padding: 0.4rem 0.85rem;
    font-size: 0.75rem;
    color: #6b7280;
    background: #fafbfc;
    border-top: 1px solid #f0f0f0;
    line-height: 1.4;
}

.dk-metrics-strip-foot strong {
    color: #28a745;
    font-weight: 700;
}

.dk-strip-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.5rem 0.85rem;
    border-right: 1px solid #f0f0f0;
    min-width: 0;
}

.dk-strip-cell:last-child {
    border-right: none;
}

.dk-strip-cell--btn {
    border: none;
    background: #f8fff8;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}

.dk-strip-cell--btn:hover {
    background: #ecfdf5;
}

.dk-strip-cell--usage {
    flex: 1 1 140px;
    min-width: 120px;
}

.dk-strip-cell-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.dk-strip-label {
    font-size: 0.6875rem;
    color: #9ca3af;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.dk-strip-value {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    white-space: nowrap;
}

.dk-strip-link {
    color: #28a745;
    font-weight: 700;
    text-decoration: none;
}

.dk-strip-link:hover {
    color: #1e7e34;
    text-decoration: underline;
}

.dk-strip-link--muted {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.875rem;
}

.dk-strip-muted {
    color: #9ca3af;
    font-weight: 600;
    font-size: 0.875rem;
}

.dk-strip-progress {
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: #f3f4f6;
    margin-top: 0.1rem;
}

.dk-strip-progress .progress-bar {
    border-radius: 999px;
}

.dk-metrics-strip-note {
    margin: 0 0 0.45rem;
    padding: 0 0.15rem;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

.dk-metrics-strip-note strong {
    color: #28a745;
    font-weight: 700;
}

.dk-metrics-strip-note-sep {
    margin: 0 0.35rem;
    color: #d1d5db;
}

.dk-metrics-strip-note-link {
    color: #28a745;
    font-weight: 600;
    text-decoration: none;
}

.dk-metrics-strip-note-link:hover {
    text-decoration: underline;
    color: #1e7e34;
}

/* —— 类型入口（大卡片） —— */
.dk-type-links-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.75rem;
    padding: 0;
}

/* 大图入口：白底 + 绿色描边/字（与全站绿链样式区分，避免 a { color: green !important } 盖不住） */
.dk-myfiles-page a.dk-type-card,
.dk-myfiles-page a.dk-type-card:link,
.dk-myfiles-page a.dk-type-card:visited,
.dk-myfiles-page a.dk-type-card:hover,
.dk-myfiles-page a.dk-type-card:focus {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 1rem 0.5rem;
    min-height: 92px;
    background: #fff !important;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    text-decoration: none !important;
    box-shadow: 0 1px 4px rgba(15, 118, 110, 0.08);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    color: #047857 !important;
}

.dk-myfiles-page a.dk-type-card:hover,
.dk-myfiles-page a.dk-type-card:focus {
    background: #f0fdf4 !important;
    border-color: #28a745;
    color: #065f46 !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.12);
}

.dk-myfiles-page a.dk-type-card .dk-type-card-icon {
    font-size: 1.75rem;
    line-height: 1;
    color: #059669 !important;
}

.dk-myfiles-page a.dk-type-card:hover .dk-type-card-icon,
.dk-myfiles-page a.dk-type-card:focus .dk-type-card-icon {
    color: #047857 !important;
}

.dk-myfiles-page a.dk-type-card .dk-type-card-label {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    color: #047857 !important;
}

.dk-myfiles-page a.dk-type-card:hover .dk-type-card-label,
.dk-myfiles-page a.dk-type-card:focus .dk-type-card-label {
    color: #065f46 !important;
}

/* —— 文件列表区 —— */
.dk-myfiles-list-section {
    margin-bottom: 0.5rem !important;
}

.dk-myfiles-list-section #file-list-card {
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
}

.dk-filelist-header {
    padding: 0.85rem 1rem 0.75rem !important;
    background: #fff !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.dk-filelist-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dk-filelist-toolbar-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
}

.dk-filelist-toolbar-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    min-width: 0;
}

.dk-filelist-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #28a745;
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    border-radius: 999px;
    white-space: nowrap;
}

.dk-filelist-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.dk-filelist-toolbar-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding-top: 0.15rem;
    border-top: 1px solid #f3f4f6;
}

.dk-filelist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 6px;
    border: 1px solid transparent;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dk-filelist-btn i {
    font-size: 0.9rem;
}

.dk-filelist-btn--primary {
    background: #28a745;
    border-color: #28a745;
    color: #fff !important;
}

.dk-filelist-btn--primary:hover {
    background: #218838;
    border-color: #218838;
    color: #fff !important;
}

.dk-filelist-btn--primary i,
.dk-filelist-btn--primary span {
    color: #fff !important;
}

.dk-filelist-btn--outline {
    background: #fff;
    border-color: #d1fae5;
    color: #28a745;
}

.dk-filelist-btn--outline:hover {
    background: #f0fdf4;
    border-color: #28a745;
    color: #1e7e34;
}

.dk-filelist-featured-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    flex-shrink: 0;
}

.dk-filelist-featured-check input {
    cursor: pointer;
    margin: 0;
}

.dk-filelist-featured-check label {
    cursor: pointer;
    margin: 0;
    font-size: 0.8125rem;
    color: #6b7280;
    white-space: nowrap;
}

.dk-filelist-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin-top: 0.65rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #374151;
    background: #f8fff8;
    border: 1px solid #d1fae5;
    border-radius: 8px;
}

.dk-filelist-tip a {
    color: #28a745;
    font-weight: 600;
    text-decoration: none;
}

.dk-filelist-tip a:hover {
    text-decoration: underline;
    color: #1e7e34;
}

.dk-filelist-title {
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    color: #111827;
}

.dk-filelist-search {
    flex: 1 1 200px;
    max-width: 320px;
    min-width: 160px;
}

.dk-filelist-search .input-group-text {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
    color: #9ca3af;
}

.dk-filelist-search .form-control {
    border-color: #e5e7eb !important;
    font-size: 0.8125rem !important;
    background: #f9fafb;
}

.dk-filelist-search .form-control:focus {
    background: #fff;
    border-color: #28a745 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.12);
}

.dk-myfiles-list-section .dk-filelist-btn {
    box-shadow: none !important;
    transform: none !important;
    letter-spacing: 0 !important;
}

.dk-myfiles-list-section .featured-checkbox-container label {
    font-size: 0.8125rem !important;
    color: #6b7280 !important;
}

/* —— 折叠区 —— */
.dk-myfiles-fold {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    background: #fff;
    overflow: hidden;
}

.dk-myfiles-fold summary {
    padding: 0.5rem 0.85rem;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    list-style: none;
    user-select: none;
    background: #fafbfc;
    transition: background 0.15s ease;
}

.dk-myfiles-fold summary:hover {
    background: #f3f4f6;
}

.dk-myfiles-fold summary::-webkit-details-marker {
    display: none;
}

.dk-myfiles-fold summary::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid #28a745;
    margin-right: 0.45rem;
    vertical-align: middle;
    transition: transform 0.15s ease;
}

.dk-myfiles-fold[open] summary::before {
    transform: rotate(90deg);
}

.dk-myfiles-fold-body {
    padding: 0.65rem 0.85rem 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.dk-myfiles-fold--services .dk-myfiles-fold-body .row.g-2 {
    --bs-gutter-x: 0.45rem;
    --bs-gutter-y: 0.45rem;
}

.dk-myfiles-fold--services .btn {
    font-size: 0.78rem !important;
    padding: 0.4rem 0.55rem !important;
    border-radius: 6px !important;
    border-color: #d1fae5 !important;
    color: #28a745 !important;
    background: #fff !important;
}

.dk-myfiles-fold--services .btn:hover {
    background: #f0fdf4 !important;
    border-color: #28a745 !important;
}

.dk-myfiles-fold .dk-metrics-grid .stat-card {
    border: 1px solid #eef1f3 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    background: #fafbfc !important;
}

@media (max-width: 767.98px) {
    .dk-toolbar-row--main {
        align-items: flex-start;
    }

    .dk-myfiles-toolbar-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .dk-toolbar-more-dropdown {
        position: relative;
    }

    .dk-toolbar-more-dropdown .dropdown-menu {
        position: absolute !important;
        right: 0 !important;
        left: auto !important;
        top: 100% !important;
        transform: none !important;
        margin-top: 0.25rem;
        max-height: 70vh;
        overflow-y: auto;
    }

    .dk-toolbar-meta-chips .profile-email {
        display: none;
    }

    .dk-filelist-toolbar-main {
        flex-direction: column;
        align-items: stretch;
    }

    .dk-filelist-toolbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .dk-filelist-search {
        max-width: none;
        width: 100%;
    }

    .dk-strip-cell {
        flex: 1 1 calc(50% - 1px);
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .dk-strip-cell--usage {
        flex: 1 1 100%;
    }

    .dk-strip-cell:nth-child(odd) {
        border-right: 1px solid #f0f0f0;
    }
}

@media (max-width: 575.98px) {
    .dk-myfiles-page-title {
        flex: 1 1 auto;
        font-size: 1.05rem;
    }

    .dk-toolbar-row--main {
        gap: 0.4rem;
    }

    .dk-toolbar-btn {
        padding: 0.3rem 0.45rem;
        font-size: 0.75rem;
    }

    .dk-toolbar-upload,
    .dk-toolbar-more-btn {
        padding: 0.3rem 0.55rem !important;
        font-size: 0.75rem !important;
    }

    .dk-metrics-strip-note {
        font-size: 0.7rem;
    }

    .dk-myfiles-page a.dk-type-card {
        min-height: 80px;
        padding: 0.75rem 0.35rem;
    }

    .dk-myfiles-page a.dk-type-card .dk-type-card-icon {
        font-size: 1.5rem;
    }

    .dk-myfiles-page a.dk-type-card .dk-type-card-label {
        font-size: 0.8125rem;
    }
}
