/* 移动端专用样式文件 - yhpc风险管控系统 */

/* 全局移动端样式重置 */
* {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-sizing: border-box;
}

body {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 头部现代化 */
.header {
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    color: white !important;
    text-align: center;
}

.header h1 {
    font-size: 1.75rem !important;
    line-height: 1.3;
    margin-bottom: 0.5rem !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    color: white !important;
}

.subtitle {
    font-size: 0.9rem !important;
    line-height: 1.4;
    opacity: 0.9;
    font-weight: 300;
    color: rgba(255,255,255,0.9) !important;
}

/* 移动端导航菜单现代化 */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 0 0 20px 20px;
    margin: 0 0.5rem;
}

.navbar ul {
    display: flex !important;
    flex-direction: row;
    justify-content: space-around;
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.navbar ul::-webkit-scrollbar {
    display: none;
}

.navbar li {
    flex-shrink: 0;
    min-width: auto;
}

.navbar a {
    display: block;
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    color: #666 !important;
    font-weight: 500;
    text-decoration: none;
}

.navbar a.active {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.navbar a:hover {
    background: rgba(0,123,255,0.1) !important;
    color: #007bff !important;
    transform: translateY(-1px);
}

/* 容器和卡片现代化 */
.container {
    padding: 1rem !important;
    max-width: 100%;
    background: transparent;
}

.card {
    margin-bottom: 1.5rem !important;
    border-radius: 20px !important;
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1) !important;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.15) !important;
}

.card-header {
    padding: 1.25rem 1.5rem 1rem !important;
    background: linear-gradient(135deg, rgba(0,123,255,0.05) 0%, rgba(0,123,255,0.02) 100%) !important;
    border-bottom: 1px solid rgba(0,123,255,0.1);
}

.card-header h3 {
    font-size: 1.25rem !important;
    margin: 0 !important;
    font-weight: 600;
    color: #2c3e50 !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem !important;
}

/* 统计卡片网格现代化 */
.stats-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
    margin-bottom: 1rem;
}

.stats-grid .stat-card:first-child {
    grid-column: 1 / -1 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.stat-card {
    padding: 1.5rem !important;
    border-radius: 16px !important;
    box-shadow: 0 6px 24px rgba(0,0,0,0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:active {
    transform: scale(0.98);
}

.stat-number {
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 0.85rem !important;
    line-height: 1.3;
    font-weight: 500;
    opacity: 0.9;
}

    /* 表格移动端优化 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 6px;
        margin-bottom: 1rem;
    }
    
    table {
        min-width: 600px;
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.5rem 0.375rem;
        white-space: nowrap;
    }
    
    th {
        background: #f8f9fa;
        font-size: 0.7rem;
        font-weight: 600;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    /* 移动端卡片式表格 */
    .mobile-table-card {
        display: block;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        margin-bottom: 0.75rem;
        padding: 0.75rem;
        background: white;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .mobile-table-card .row-header {
        font-weight: 600;
        color: #007bff;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #e9ecef;
    }
    
    .mobile-table-card .row-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 0;
        border-bottom: 1px solid #f8f9fa;
    }
    
    .mobile-table-card .row-item:last-child {
        border-bottom: none;
    }
    
    .mobile-table-card .row-label {
        font-size: 0.75rem;
        color: #6c757d;
        font-weight: 500;
        flex: 0 0 35%;
    }
    
    .mobile-table-card .row-value {
        font-size: 0.8rem;
        text-align: right;
        flex: 1;
        word-break: break-word;
    }

    /* 表单优化 */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
        font-weight: 500;
    }
    
    .form-control {
        padding: 0.75rem;
        font-size: 1rem;
        border-radius: 6px;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .form-control:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
    }

    /* 搜索框优化 */
    .search-container {
        margin-bottom: 1rem;
        position: relative;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        padding: 1rem;
        border-radius: 16px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.05);
        display: flex;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .search-input {
        flex: 1;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        border: 2px solid rgba(0,123,255,0.1);
        border-radius: 12px;
        background: white;
        transition: all 0.3s ease;
    }
    
    .search-input:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 4px rgba(0,123,255,0.1);
        transform: scale(1.02);
    }
    
    .search-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        background: linear-gradient(135deg, #007bff, #0056b3);
        border: none;
        border-radius: 12px;
        color: white;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    }
    
    .search-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,123,255,0.4);
    }
    
    /* 快速导航现代化 */
    .quick-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .quick-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 1.5rem 1rem;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-radius: 16px;
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 16px rgba(0,0,0,0.05);
        position: relative;
        overflow: hidden;
    }
    
    .quick-nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
        transition: left 0.5s;
    }
    
    .quick-nav-item:hover::before {
        left: 100%;
    }
    
    .quick-nav-item:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 32px rgba(0,123,255,0.15);
    }
    
    .quick-nav-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    }
    
    .quick-nav-label {
        font-size: 0.9rem;
        font-weight: 600;
        color: #495057;
        text-align: center;
    }
    
    /* 安全提醒卡片 */
    .safety-reminder {
        background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%) !important;
        color: white;
        border: none !important;
    }
    
    .safety-content {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .safety-icon {
        font-size: 2.5rem;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
        flex-shrink: 0;
    }
    
    .safety-text h4 {
        margin: 0 0 0.5rem 0;
        font-size: 1.1rem;
        font-weight: 700;
    }
    
    .safety-text p {
        margin: 0;
        font-size: 0.9rem;
        opacity: 0.95;
        line-height: 1.4;
    }
    
    /* 风险等级图表现代化 */
    .risk-levels {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: white;
        border: none !important;
    }
    
    .risk-levels .card-header {
        background: rgba(255,255,255,0.1) !important;
        border-bottom: 1px solid rgba(255,255,255,0.2) !important;
    }
    
    .risk-levels .card-header h3 {
        color: white !important;
    }
    
    .risk-level-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .risk-level-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        background: rgba(255,255,255,0.1);
        border-radius: 12px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.2);
        transition: all 0.3s ease;
    }
    
    .risk-level-item:hover {
        background: rgba(255,255,255,0.2);
        transform: translateX(8px);
    }
    
    .level-visual {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex-shrink: 0;
    }
    
    .level-icon {
        font-size: 1.5rem;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    }
    
    .level-bar {
        width: 40px;
        height: 4px;
        border-radius: 2px;
        position: relative;
        overflow: hidden;
    }
    
    .risk-level-item.low .level-bar {
        background: linear-gradient(90deg, #28a745, #20c997);
    }
    
    .risk-level-item.medium .level-bar {
        background: linear-gradient(90deg, #ffc107, #ffca2c);
    }
    
    .risk-level-item.high .level-bar {
        background: linear-gradient(90deg, #fd7e14, #ff8c42);
    }
    
    .risk-level-item.major .level-bar {
        background: linear-gradient(90deg, #dc3545, #e55353);
    }
    
    .level-bar::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
        animation: shimmer 2s infinite;
    }
    
    @keyframes shimmer {
        0% { left: -100%; }
        100% { left: 100%; }
    }
    
    .level-info {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        flex: 1;
    }
    
    .level-name {
        font-weight: 600;
        font-size: 0.95rem;
    }
    
    .level-range {
        font-size: 0.8rem;
        opacity: 0.9;
        font-family: 'Courier New', monospace;
    }
    
    .level-desc {
        font-size: 0.75rem;
        opacity: 0.8;
        font-style: italic;
    }
    
/* 快速导航现代化 - 防闪动优化 */
.quick-nav {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
    /* 防闪动优化 */
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: auto;
}

.quick-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 1.5rem !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 16px !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05) !important;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.5);
    /* 防闪动优化 */
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.quick-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,123,255,0.05) 0%, rgba(0,123,255,0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-nav-item:hover::before {
    opacity: 1;
}

.quick-nav-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,123,255,0.15) !important;
    border-color: rgba(0,123,255,0.3);
}

.nav-icon-container {
    position: relative;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon {
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 12px !important;
    color: white !important;
    position: relative;
    z-index: 2;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* 防闪动优化 */
    backface-visibility: hidden;
    transform: translateZ(0);
}

.nav-icon svg {
    width: 24px !important;
    height: 24px !important;
    stroke-width: 2.5 !important;
    stroke: currentColor !important;
    fill: none !important;
}

/* nav-glow removed - no longer needed */

.quick-nav-item:hover .nav-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102,126,234,0.3);
}

.nav-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem;
    width: 100%;
}

.nav-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    margin: 0 !important;
}

.nav-subtitle {
    font-size: 0.8rem !important;
    color: #6c757d !important;
    font-weight: 400 !important;
    opacity: 0.8;
}

/* 不同类型的导航项主题色 */
.quick-nav-item.category:hover .nav-icon {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

/* category nav-glow removed */

.quick-nav-item.position:hover .nav-icon {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
}

/* position nav-glow removed */

.quick-nav-item.equipment:hover .nav-icon {
    background: linear-gradient(135deg, #fd7e14, #ff8c42) !important;
}

/* equipment nav-glow removed */

.quick-nav-item.search:hover .nav-icon {
    background: linear-gradient(135deg, #6f42c1, #5a2d91) !important;
}

/* search nav-glow removed */

    /* 筛选器优化 */
    .filters {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-group {
        min-width: auto;
    }

    /* 按钮优化 */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        border-radius: 6px;
        min-height: 44px;
        touch-action: manipulation;
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        min-height: 36px;
    }

    /* 风险徽章优化 */
    .risk-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
        border-radius: 12px;
        font-weight: 600;
    }

    /* 分页优化 */
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-top: 1rem;
    }
    
    .pagination a,
    .pagination span {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        min-width: 40px;
        text-align: center;
    }

    /* 网格布局移动端优化 */
    .row {
        margin: -0.5rem;
    }
    
    .col-2,
    .col-3,
    .col-4,
    .col-6,
    .col-9 {
        flex: 0 0 100%;
        padding: 0.5rem;
    }

    /* 警告框优化 */
    .alert {
        padding: 1rem;
        font-size: 0.875rem;
        border-radius: 6px;
        margin-bottom: 1rem;
    }

    /* 浮动操作按钮现代化 */
    .fab {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: linear-gradient(135deg, #007bff, #0056b3);
        color: white;
        border: none;
        box-shadow: 0 8px 24px rgba(0,123,255,0.3);
        font-size: 1.25rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .fab:hover {
        transform: translateY(-4px) scale(1.1);
        box-shadow: 0 12px 32px rgba(0,123,255,0.4);
    }
    
    .fab:active {
        transform: translateY(-2px) scale(1.05);
    }
    
    /* 返回顶部按钮 */
    .back-to-top {
        position: fixed;
        bottom: 90px;
        right: 20px;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: rgba(255,255,255,0.9);
        color: #007bff;
        border: 2px solid rgba(0,123,255,0.2);
        box-shadow: 0 4px 16px rgba(0,0,0,0.1);
        font-size: 1rem;
        transition: all 0.3s ease;
        z-index: 999;
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(10px);
        opacity: 0;
        transform: translateY(20px);
        pointer-events: none;
    }
    
    .back-to-top.show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    
    .back-to-top:hover {
        background: #007bff;
        color: white;
        transform: translateY(-2px) scale(1.1);
        box-shadow: 0 6px 20px rgba(0,123,255,0.3);
    }
    
    /* 版本信息区域现代化 */
    .card:last-child {
        background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255,255,255,0.2);
        margin-bottom: 2rem;
    }
    
    .card:last-child .card-body {
        text-align: center;
        color: rgba(255,255,255,0.8);
        font-size: 0.85rem;
        padding: 1.5rem;
    }
    
    .card:last-child .card-body p {
        margin: 0.25rem 0;
        line-height: 1.5;
    }
    
    .card:last-child .card-body p:first-child {
        font-weight: 600;
        color: rgb(5, 5, 5);
    }
    
    .fab:hover,
    .fab:active {
        background: #0056b3;
        transform: scale(1.1);
    }

    /* 返回顶部按钮 */
    .back-to-top {
        position: fixed;
        bottom: 80px;
        right: 20px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(0,0,0,0.7);
        color: white;
        border: none;
        font-size: 1.25rem;
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .back-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    /* 模态框移动端优化 */
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 1rem;
        border-bottom: 1px solid #dee2e6;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        border-top: 1px solid #dee2e6;
    }

    /* 侧边栏移动端优化 */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 1050;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-backdrop.show {
        opacity: 1;
        visibility: visible;
    }

    /* 快速导航优化 */
    .quick-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin: 1rem 0;
    }
    
    .quick-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 1rem 0.5rem;
        background: white;
        border-radius: 8px;
        text-decoration: none;
        color: #333;
        transition: all 0.2s ease;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        min-height: 80px;
        justify-content: center;
    }
    
    .quick-nav-item:hover,
    .quick-nav-item:active {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        color: #007bff;
        text-decoration: none;
    }
    
    .quick-nav-icon {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .quick-nav-label {
        font-size: 0.75rem;
        text-align: center;
        line-height: 1.2;
    }

    /* 触摸友好的操作 */
    .touch-friendly {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 滑动指示器 */
    .swipe-indicator {
        text-align: center;
        color: #6c757d;
        font-size: 0.75rem;
        padding: 0.5rem;
        background: rgba(248,249,250,0.8);
        border-radius: 0 0 6px 6px;
    }
    
    /* 加载状态优化 */
    .loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255,255,255,0.9);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2000;
        flex-direction: column;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #007bff;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-bottom: 1rem;
    }
    
    .loading-text {
        color: #6c757d;
        font-size: 0.875rem;
    }

    /* 手势支持 */
    .swipeable {
        touch-action: pan-y;
        user-select: none;
    }
    
    .pull-to-refresh {
        text-align: center;
        padding: 1rem;
        color: #6c757d;
        font-size: 0.875rem;
    }
}

/* 超小屏幕优化 (480px以下) */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar a {
        font-size: 0.7rem;
        padding: 0.5rem 0.25rem;
    }
    
    .quick-nav {
        grid-template-columns: 1fr;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .form-control {
        font-size: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn + .btn {
        margin-left: 0;
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 0.75rem 0.5rem;
    }
    
    .header h1 {
        font-size: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .quick-nav {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Dark mode support for mobile */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .card {
        background: #2d2d2d;
        border: 1px solid #404040;
    }
    
    .card-header {
        background: #404040;
        border-bottom-color: #555;
    }
    
    .navbar {
        background-color: #2d2d2d;
    }
    
    .form-control {
        background: #2d2d2d;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .btn-primary {
        background-color: #0d6efd;
    }
    
    th {
        background: #404040;
        color: #e0e0e0;
    }
}

/* 打印样式移动端优化 */
@media print {
    .mobile-table-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .fab,
    .back-to-top,
    .navbar,
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* 底部跟随导航栏 */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0.5rem;
    right: 0.5rem;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0,123,255,0.1);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    border-radius: 20px 20px 0 0;
}

.mobile-bottom-nav .nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    min-width: 80px;
}

.mobile-bottom-nav .nav-btn:hover,
.mobile-bottom-nav .nav-btn:active {
    color: #007bff;
    background: rgba(0,123,255,0.1);
    transform: translateY(-2px);
}

.mobile-bottom-nav .nav-btn .icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    display: block;
}

.mobile-bottom-nav .nav-btn .label {
    font-weight: 500;
    line-height: 1;
}

/* 为有底部导航的页面添加底部间距 */
@media (max-width: 768px) {
    .has-bottom-nav {
        padding-bottom: 100px !important;
    }
    
    .has-bottom-nav .container {
        padding-bottom: 1rem;
    }
    
    /* 隐藏返回和打印按钮在移动端 */
    .desktop-buttons {
        display: none !important;
    }
    
    /* 桌面端和移动端显示控制 */
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
}