@charset "UTF-8";
/* css/mobile.css — 手机端/平板端自适应样式 */

/* 手机端：屏幕宽度 <= 768px */
@media screen and (max-width: 768px) {
    /* 左侧菜单改为可折叠汉堡菜单 */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 60px;
        bottom: 0;
        z-index: 1000;
        transition: left 0.3s;
        width: 280px;
        overflow-y: auto;
    }
    .sidebar.open {
        left: 0;
        box-shadow: 2px 0 8px rgba(0,0,0,0.3);
    }

    /* 主内容区全宽 */
    .main-content {
        margin-left: 0 !important;
        padding: 10px !important;
    }

    /* 顶部导航精简 */
    .app-header {
        padding: 0 10px;
        height: 50px;
    }
    .header-left h1 { font-size: 16px; }
    .header-center .search-bar { display: none; }
    .header-right span.welcome-text { display: none; }
    .font-size-control { padding: 1px 4px; }
    .font-size-control input[type="range"] { width: 48px; }
    .font-size-value { display: none; }

    /* 汉堡按钮 */
    .menu-toggle {
        display: inline-flex !important;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 22px;
        cursor: pointer;
        padding: 0 8px;
    }

    /* 表格横向滚动 */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table { min-width: 600px; }

    /* 卡片 2 列 */
    .stat-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .stat-card { padding: 10px !important; }
    .stat-value { font-size: 16px !important; }
    .stat-title { font-size: 12px !important; }

    /* 弹窗全屏 */
    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        height: 100vh;
    }
    .modal-overlay { padding: 0 !important; }
    .modal-fullscreen {
        width: 100% !important;
        max-width: 100% !important;
    }
    .modal-body {
        max-height: none !important;
        overflow: hidden;
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    /* 表单全宽 */
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100% !important;
    }

    /* 筛选栏堆叠 */
    .filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .filter-bar > * {
        width: 100% !important;
        margin-bottom: 8px;
    }

    /* 卡片网格单列 */
    .card-grid {
        grid-template-columns: 1fr !important;
    }

    /* 班次卡片单列 */
    .shift-cards {
        flex-direction: column !important;
    }
    .settle-card { width: 100% !important; }

    /* Excel 表格横向滚动 */
    .excel-table-wrapper {
        overflow-x: auto;
    }

    /* 隐藏桌面端分页大小选项中的部分 */
    .pagination-info { font-size: 12px; }

    /* 账目对比卡片：移动端缩小字号、保持水平居中 */
    .acc-compare-body {
        gap: 24px;
    }
    .acc-compare-value,
    .acc-compare-result {
        font-size: 22px;
    }
    .acc-compare-label {
        font-size: 12px;
    }
    .acc-compare-sep {
        height: 36px;
    }

    /* 筛选栏：移动端允许换行，避免溢出 */
    .acc-filter-bar {
        flex-wrap: wrap;
    }
    .acc-filter-bar .acc-search-input {
        min-width: 0 !important;
    }
}

/* 平板端：768px - 1024px */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .sidebar { width: 200px; }
    .stat-cards { grid-template-columns: repeat(3, 1fr) !important; }
    .menu-toggle { display: none !important; }
}

/* PC 端：> 1024px */
@media screen and (min-width: 1025px) {
    .sidebar { width: 250px; }
    .stat-cards { grid-template-columns: repeat(5, 1fr); }
    .menu-toggle { display: none !important; }
}

/* 遮罩层（移动端菜单打开时） */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}
.sidebar-overlay.show {
    display: block;
}
