/* 响应式设计优化 */

/* 移动设备优先的响应式断点设置 */

/* 超小屏幕 (手机, 小于 576px) */
@media (max-width: 575.98px) {
    /* 通用优化 */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    h1, .h1 {
        font-size: 1.8rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    h3, .h3 {
        font-size: 1.3rem;
    }
    
    /* 统计卡片优化 */
    .row > [class^="col-"] {
        margin-bottom: 15px;
    }
    
    /* 导航栏优化 */
    .navbar-brand {
        font-size: 1.1rem;
        padding: 0.5rem 0;
    }
    
    /* 表单优化 */
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* 按钮优化 */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* 模态框优化 */
    .modal-dialog {
        margin: 0.5rem;
        max-width: 100%;
    }
    
    /* 帮助按钮优化 */
    .fixed-bottom-right {
        right: 15px;
        bottom: 15px;
    }
    
    /* 筛选区域优化 */
    .filter-section {
        padding: 1rem;
    }
    
    /* 移动端特定表格优化 */
    .mobile-responsive-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .mobile-responsive-table .table {
        min-width: 600px;
    }
    
    /* 移动端特定表单元素优化 */
    .form-check {
        padding-left: 1.5rem;
    }
    
    /* 隐藏部分非关键信息 */
    .hide-on-mobile {
        display: none !important;
    }
}

/* 小屏幕 (平板, 576px 及以上) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* 统计卡片在小屏幕上改为每行显示2个 */
    .row > [class^="col-"] {
        margin-bottom: 15px;
    }
    
    /* 模态框宽度调整 */
    .modal-dialog {
        max-width: 90%;
    }
    
    /* 帮助按钮位置调整 */
    .fixed-bottom-right {
        right: 20px;
        bottom: 20px;
    }
}

/* 中等屏幕 (桌面, 768px 及以上) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* 模态框宽度调整 */
    .modal-dialog {
        max-width: 85%;
    }
}

/* 表格响应式优化 */
/* 在小屏幕上让表格更易于查看 */
@media (max-width: 767.98px) {
    /* 表格单元格内容换行 */
    .table td, 
    .table th {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    /* 操作按钮组在小屏幕上垂直排列 */
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-group > .btn {
        width: 100%;
    }
    
    /* 筛选表单在小屏幕上堆叠显示 */
    .filter-section .row > [class^="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* 调整统计卡片标题大小 */
    .stat-card .card-title {
        font-size: 0.9rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
}

/* 打印样式优化 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    .container {
        width: 100%;
        max-width: none;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-device-pixel-ratio: 2), (resolution: 192dpi) {
    /* 确保高分辨率屏幕上的图标清晰 */
    i[class^="fas"], i[class*=" fas"] {
        font-weight: 900;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    /* 增加触摸目标大小 */
    .btn, 
    .form-control, 
    .nav-link, 
    .dropdown-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 为触摸设备增加可点击区域 */
    button, 
    a {
        touch-action: manipulation;
    }
}