/**
 * 移动端共享样式（全局壳 + 订单/收货等页面 ≤768px）
 *
 * base.html 全局引入；桌面（>768px）完全不受影响。
 *
 * 兼容约束（微信内置浏览器：iOS=WKWebView / Android=X5 内核）：
 *   - 仅标准 CSS，不使用 dvh / container queries / :has() 等新特性
 *   - 输入控件 font-size ≥16px（规避 iOS 聚焦自动放大页面）
 *   - 触控目标 ≥40px（可接受下限，常规保持 44px）
 */

/* 桌面默认：移动端 UI 隐藏（JS/模板无条件渲染，CSS 控制可见性——否则桌面会裸显示） */
.mobile-cards {
    display: none;
}
.mobile-modal {
    display: none;
}
.mobile-save-bar {
    display: none;
}
.mobile-menu-btn,
.mobile-menu-mask {
    display: none;
}
.mobile-bottom-nav {
    display: none;
}
.orders-mobile-list {
    display: none;
}

@media (max-width: 768px) {
    /* 卡片边距单一来源（C4 收敛）：content 12px + card 12px 14px = 两侧 26px 留白。
       supplier_fill.html inline @media 引用此变量保证双端一致，禁止两处各写魔数 */
    :root {
        --mobile-card-padding: 12px 14px;
        /* 底部固定操作栏相对屏幕底部的偏移（底部导航约 68px + 间距），
           .main-area .mobile-save-bar 与 .recv-fixed-confirm 共用，避免魔数漂移 */
        --mobile-fixed-bar-offset: 76px;
    }

    /* ── 页面骨架：移动端使用独立底部导航，不复用桌面侧栏 ── */
    .sidebar {
        display: none;
    }
    .topbar-right { display: none; }
    /* 顶栏标题占满，移动端不显示桌面菜单按钮 */
    .topbar {
        padding: 8px 12px;
        justify-content: flex-start;
        gap: 10px;
    }
    .topbar h2 {
        flex: 1;
        min-width: 0;
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .content { padding: 12px; }
    .card { padding: var(--mobile-card-padding); }

    .mobile-menu-btn,
    .mobile-menu-mask { display: none !important; }

    /* ── 固定底部导航：仅首页/订单/收货/卡牌四个移动入口 ── */
    .mobile-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1000;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid #e0e0e0;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 -3px 12px rgba(15, 23, 42, .08);
    }
    .mobile-bottom-nav-item {
        display: flex;
        min-height: 56px;
        align-items: center;
        justify-content: center;
        gap: 3px;
        flex-direction: column;
        border-radius: 8px;
        color: #687385;
        font-size: 12px;
        line-height: 1.2;
        text-decoration: none;
    }
    .mobile-bottom-nav-item.active {
        background: #e8f0fe;
        color: #1a73e8;
        font-weight: 600;
    }
    .mobile-bottom-nav-item:focus-visible {
        outline: 2px solid #1a73e8;
        outline-offset: -2px;
    }
    .mobile-bottom-nav-icon { width: 22px; height: 22px; }

    /* ── 宽表格隐藏，卡片列表显示（卡片由共享核心 JS 渲染）── */
    .table-container .editable-table { display: none; }
    .table-container { margin-bottom: 12px; }

    .mobile-cards { display: block; }
    .mobile-cards .mobile-empty {
        text-align: center;
        padding: 40px 16px;
        color: #909399;
        font-size: 14px;
    }
    .mobile-card {
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 10px 12px;
        margin-bottom: 10px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    }
    /* 头部：缩略图 + 名称（两行截断）+ 删除按钮（右上角），紧凑单行 */
    .mobile-card-head {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 8px;
    }
    .mobile-card-thumb {
        width: 64px;
        height: 64px;
        border-radius: 6px;
        object-fit: cover;
        border: 1px solid #eee;
        flex-shrink: 0;
        background: #f5f5f5;
    }
    .mobile-card-thumb.empty {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        color: #bbb;
    }
    .mobile-card-main {
        flex: 1;
        min-width: 0;
    }
    .mobile-card-title {
        font-size: 15px;
        font-weight: 600;
        color: #333;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-all;
    }
    .mobile-card-detail .mobile-card-title {
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .mobile-card-detail .mobile-card-thumb {
        width: 56px;
        height: 56px;
    }
    .mobile-card-spec {
        margin-top: 3px;
        color: #888;
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mobile-card-del {
        flex-shrink: 0;
        min-height: 40px;
        padding: 4px 10px;
        font-size: 13px;
    }
    /* 字段网格：label+value 同行紧凑排布 */
    .mobile-card-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px 10px;
    }
    .mobile-card-field {
        display: flex;
        align-items: baseline;
        gap: 4px;
        min-width: 0;
    }
    .mobile-card-label {
        flex-shrink: 0;
        font-size: 11px;
        color: #888;
    }
    .mobile-card-value {
        font-size: 13px;
        color: #333;
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-card-op {
        display: flex;
        gap: 8px;
        margin-top: 8px;
    }
    .mobile-card-op .btn {
        flex: 1;
        min-height: 44px;
    }
    .mobile-card-op .mobile-card-del {
        background: #fff;
        color: #ef6c6c;
        border-color: #f1b3b3;
    }

    /* 卡片脏标记（草稿未持久化，镜像表格行 dirty 语义） */
    .mobile-card.is-dirty {
        border-color: #ff9800;
        box-shadow: 0 0 0 1px #ff9800 inset;
    }

    /* ── 移动端编辑弹窗（底部弹起 sheet）── */
    .mobile-modal {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0, 0, 0, .5);
        z-index: 1100;
        display: none;
        align-items: flex-end;
        justify-content: center;
    }
    .mobile-modal.show { display: flex; }
    .mobile-modal-sheet {
        background: #fff;
        width: 100%;
        max-width: 640px;
        border-radius: 12px 12px 0 0;
        max-height: 92vh;
        display: flex;
        flex-direction: column;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, .2);
    }
    .mobile-modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 16px;
        border-bottom: 1px solid #eee;
        flex-shrink: 0;
    }
    .mobile-modal-header .mobile-modal-title {
        font-size: 16px;
        font-weight: 600;
    }
    .mobile-modal-header .btn { min-height: 40px; }
    .mobile-modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 16px;
    }
    .mobile-modal-footer {
        padding: 12px 16px;
        border-top: 1px solid #eee;
        display: flex;
        gap: 10px;
        flex-shrink: 0;
    }
    .mobile-modal-footer .btn { flex: 1; }

    .mobile-form-field { margin-bottom: 14px; }
    .mobile-form-field label {
        display: block;
        font-size: 13px;
        color: #555;
        margin-bottom: 6px;
    }
    .mobile-form-field input,
    .mobile-form-field select {
        width: 100%;
        font-size: 16px;
        padding: 10px 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        background: #fff;
        box-sizing: border-box;
        min-height: 44px;
    }
    .mobile-form-field input[readonly] {
        background: #f5f5f5;
        color: #666;
    }
    .mobile-form-row {
        display: flex;
        gap: 8px;
    }
    .mobile-form-row input { flex: 1; }
    .mobile-form-row .btn { white-space: nowrap; }

    /* 图片上传区 */
    .mobile-img-section {
        background: #f8f9fa;
        border: 1px dashed #ccc;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 16px;
    }
    .mobile-img-preview {
        text-align: center;
        margin-bottom: 10px;
        min-height: 40px;
    }
    .mobile-img-preview img {
        max-width: 120px;
        max-height: 120px;
        border-radius: 6px;
        object-fit: cover;
    }
    .mobile-img-preview .mobile-img-empty {
        font-size: 13px;
        color: #909399;
        padding: 8px;
    }
    .mobile-img-actions {
        display: flex;
        gap: 10px;
    }
    .mobile-img-actions .btn { flex: 1; }

    /* ── 底部 sticky 保存栏 ── */
    .mobile-save-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #e0e0e0;
        padding: 10px 12px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        display: flex;
        gap: 10px;
        z-index: 900;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, .06);
    }
    .mobile-save-bar .btn { flex: 1; min-height: 44px; }
    /* 团队编辑页同时拥有保存栏与全局底部导航：保存栏置于导航上方，避免关键操作被盖住。
       供应商页（supplier_fill.html）无底部导航、无 .main-area，仍保持贴底。
       偏移量单一来源：--mobile-fixed-bar-offset（底部导航 68px + 间距），
       与 移动端悬浮固定操作栏（.recv-fixed-confirm 等）共用一个变量，避免魔数漂移。 */
    .main-area .mobile-save-bar,
    .main-area .recv-fixed-confirm {
        bottom: calc(var(--mobile-fixed-bar-offset) + env(safe-area-inset-bottom, 0px));
        left: 10px;
        right: 10px;
        width: auto;
        z-index: 1010;
        border-radius: 10px;
        box-shadow: 0 -3px 12px rgba(15, 23, 42, .1);
    }
    /* 底部保存栏不遮挡内容（底部导航高度预留） */
    .content { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
    /* 带固定底部操作栏的页面（编辑/收货操作）：导航 + 悬浮栏双层预留 */
    .main-area .content.bottom-bar-page {
        padding-bottom: calc(164px + env(safe-area-inset-bottom, 0px));
    }

    /* ── 订单列表：桌面宽表格转换为同一数据源的任务卡片 ── */
    .orders-page-card { padding: 12px 14px; }
    .orders-toolbar { display: block !important; }
    .status-filter-scroll {
        overflow-x: auto;
        margin: -2px -2px 10px;
        padding: 2px;
        -webkit-overflow-scrolling: touch;
    }
    .status-filters {
        flex-wrap: nowrap;
        width: max-content;
        margin-bottom: 0;
    }
    .status-filters a {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
    }
    .orders-create-btn {
        display: flex;
        width: 100%;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }
    .mobile-order-filters {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px !important;
        margin: 0 0 12px !important;
        padding-top: 10px;
        border-top: 1px solid #eef1f4;
    }
    .mobile-order-filters input,
    .mobile-order-filters select {
        width: 100% !important;
        min-width: 0;
        min-height: 44px;
        padding: 9px 10px !important;
        font-size: 16px !important;
    }
    .mobile-order-filters .order-filter-supplier-field,
    .mobile-order-filters .order-filter-date-range,
    .mobile-order-filters .order-filter-select,
    .mobile-order-filters button,
    .mobile-order-filters a {
        grid-column: 1 / -1;
    }
    .mobile-order-filters .order-filter-supplier-field {
        width: 100%;
        min-width: 0;
    }
    .mobile-order-filters .order-filter-field-label {
        display: block;
        margin-bottom: 2px;
        color: #667085;
        font-size: 12px;
        line-height: 1.4;
    }
    .mobile-order-filters .order-filter-date-range {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: end;
        gap: 8px;
    }
    .mobile-order-filters .order-filter-date-field {
        display: flex;
        min-width: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }
    .mobile-order-filters .order-filter-date-separator {
        padding-bottom: 12px;
    }
    .mobile-order-filters button,
    .mobile-order-filters a { text-align: center; }

    /* ── 窄屏分页：信息、四个导航按钮、跳转表单分层显示，避免文字挤压/溢出 ── */
    .pagination {
        display: block;
        width: 100%;
    }
    .pagination .page-info {
        display: block;
        margin: 0 0 8px;
        line-height: 1.4;
    }
    .pagination .page-controls {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-areas:
            "first prev next last"
            "jump jump jump jump";
        gap: 8px;
    }
    .pagination .page-controls > :nth-child(1) { grid-area: first; }
    .pagination .page-controls > :nth-child(2) { grid-area: prev; }
    .pagination .page-controls > :nth-child(4) { grid-area: next; }
    .pagination .page-controls > :nth-child(5) { grid-area: last; }
    .pagination .page-controls > :nth-child(3) {
        grid-area: jump;
        justify-content: center;
        min-width: 0;
    }
    .pagination .page-controls > .page-btn {
        display: inline-flex;
        width: 100%;
        min-width: 0;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        padding: 6px 4px;
        overflow: visible;
        font-size: 13px;
        white-space: nowrap;
    }
    .pagination .page-jump .page-btn {
        display: inline-flex;
        width: auto;
        min-width: 72px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }
    .pagination .page-jump input {
        min-height: 44px;
        font-size: 16px;
    }

    .orders-desktop-table { display: none; }
    .orders-mobile-list {
        display: grid;
        gap: 10px;
    }
    .mobile-order-card {
        min-width: 0;
        padding: 14px;
        border: 1px solid #e1e6ec;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,.06);
    }
    .mobile-order-card.is-overdue {
        border-color: #f0b4b4;
        box-shadow: 0 0 0 1px #f0b4b4 inset;
    }
    .mobile-order-card-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        min-width: 0;
    }
    .mobile-order-primary { min-width: 0; flex: 1; }
    .mobile-order-number {
        display: block;
        color: #1a73e8;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }
    .mobile-order-markers {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 5px;
    }
    .mobile-order-marker {
        display: inline-flex;
        align-items: center;
        min-height: 22px;
        padding: 1px 7px;
        border-radius: 10px;
        font-size: 11px;
        line-height: 1.2;
    }
    .mobile-order-marker.danger { color: #c62828; background: #ffebee; }
    .mobile-order-marker.warning { color: #e65100; background: #fff3e0; }
    .mobile-order-marker.success { color: #2e7d32; background: #e8f5e9; }
    .mobile-order-marker.muted { color: #607d8b; background: #f1f4f6; }
    .mobile-order-card-head > .badge { flex-shrink: 0; }
    .mobile-order-supplier {
        display: flex;
        align-items: baseline;
        gap: 8px;
        min-width: 0;
        margin-top: 12px;
        padding-top: 10px;
        border-top: 1px solid #eef1f4;
    }
    .mobile-order-supplier strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 500;
    }
    .mobile-order-label { color: #888; font-size: 12px; flex-shrink: 0; }
    .mobile-order-meta {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-top: 12px;
    }
    .mobile-order-meta > div { min-width: 0; }
    .mobile-order-meta .mobile-order-label,
    .mobile-order-meta strong { display: block; }
    .mobile-order-meta strong {
        margin-top: 3px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
        font-weight: 500;
    }
    .mobile-order-meta strong.is-danger { color: #c62828; }
    .mobile-order-context {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 12px;
        margin-top: 10px;
        color: #888;
        font-size: 11px;
        line-height: 1.4;
    }
    .mobile-order-notes {
        margin-top: 8px;
        color: #555;
        font-size: 12px;
        line-height: 1.5;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-order-actions {
        display: flex;
        gap: 8px;
        margin-top: 12px;
    }
    .mobile-order-actions .btn {
        flex: 1;
        min-height: 44px;
        text-align: center;
    }
    .orders-empty { padding: 28px 12px !important; }

    /* ── 新建订单：字段与动作在窄屏下纵向排列，候选项保持可点 ── */
    .order-new-card {
        max-width: none !important;
        padding: 14px;
    }
    .mobile-order-form label { font-size: 13px !important; }
    .mobile-order-form #supplier-search,
    .mobile-order-form .mobile-order-notes {
        min-height: 46px;
        font-size: 16px !important;
        padding: 11px 12px !important;
    }
    .mobile-order-form .mobile-order-notes { min-height: 104px; }
    .mobile-order-form #supplier-dropdown { max-height: 44vh; }
    .mobile-order-form .supplier-option {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 9px 12px;
    }
    .mobile-order-form .supplier-option > span:first-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-order-form .mobile-order-actions {
        flex-direction: column;
        margin-top: 0;
    }
    .mobile-order-form .mobile-order-actions .btn { width: 100%; }

    /* orders_edit.html 的桌面内联样式位于本文件之后，移动端需明确覆盖其 align-items:center */
    .order-info-card { flex-direction: column; align-items: stretch !important; gap: 10px !important; }
    .order-info { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px !important; padding: 0 !important; }
    .order-info-item { display: flex; align-items: center; gap: 4px; min-width: 0 !important; }
    .order-info-item > span:not(.badge), .order-info-item > strong {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .order-info-item > span:not(.badge) { flex: 0 0 auto; margin-bottom: 0 !important; }
    .order-info-item > strong { flex: 1 1 auto; }
    .order-info-item > .badge { display: inline-flex; width: auto; flex: 0 0 auto; }
    .order-actions { justify-content: flex-start; flex-wrap: wrap; gap: 8px !important; }

    /* 顶部工具栏移动端收窄：团队编辑页保存草稿移入底部栏，供应商页由页面样式保留在顶部工具栏；提示条隐藏 */
    .table-toolbar #save-draft-btn, .toolbar #save-draft-btn { display: none; }
    .table-toolbar .hint-text, .toolbar .hint-text { display: none; }
    #table-toolbar { padding: 10px; border-radius: 8px; }
    .toolbar-row-primary { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    /* Excel 导入仅供桌面端使用；移动端隐藏入口和卡牌导入弹层。 */
    .mobile-import-entry { display: none !important; }
    .mobile-card-import-entry { display: none !important; }
    .desktop-card-import { display: none !important; }
    .toolbar-row-view { display: grid !important; grid-template-columns: 100px minmax(0, 1fr); gap: 8px; }
    .toolbar-row-view { margin-top: 8px; padding-top: 8px; }
    .toolbar-row .btn, .toolbar-row select, .toolbar-row input { width: 100%; box-sizing: border-box; }
    .toolbar-label { grid-column: 1 / -1; }
    .toolbar-more-wrap { width: auto; }
    .toolbar-more-wrap > .btn { width: 100%; }
    .toolbar-more-menu { left: 0; right: 0; }
    .arrival-control { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; width: 100%; }
    .arrival-control input { flex: 1; min-width: 0; width: auto !important; }
    .arrival-control .btn { width: auto; flex: 0 0 auto; white-space: nowrap; }
    .batch-status-bar, .pending-delete-strip { align-items: stretch; }
    .batch-status-bar > *, .pending-delete-strip > * { flex: 1 1 auto; }
    .batch-dialog { align-items: flex-end; padding: 0; }
    .batch-dialog-card { border-radius: 12px 12px 0 0; width: 100%; max-height: 82vh; padding: 18px 16px; }
    .toolbar-row-primary .dirty-status { grid-column: 1 / -1; margin-left: 0; order: 5; }
    .toolbar-row-primary > a.btn-confirm-primary { display: none; }
    .toolbar-row-view .toolbar-label { margin-top: 2px; }
    .toolbar-preset-wrap { width: auto; }
    .view-filter-group { grid-column: auto; width: 100%; min-width: 0; }
    .view-filter-group .btn { width: auto !important; flex: 1; }
    .toolbar-preset-wrap > .btn { width: auto; min-width: 100px; text-align: left; }
    .toolbar-row-view > #view-search { grid-column: 1 / -1; width: 100%; min-height: 44px; }
    .toolbar-row-view > .arrival-control { grid-column: 1 / -1; }
    .arrival-control .btn { padding: 6px 8px; }
    .batch-select-cell { width: 44px; }
    .mobile-card-select-hit-area {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-card-select { width: 24px; height: 24px; margin: 4px 0 0; }

    /* 金额调整：摘要、字段和最终金额分层，避免窄屏下输入错位。 */
    #amount-summary-card > .amount-summary-layout { display: block !important; }
    #amount-summary-card .amount-summary-head {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 12px !important;
        align-items: baseline !important;
        margin-bottom: 12px;
        font-size: 14px !important;
    }
    #amount-summary-card .amount-summary-head > strong { grid-column: 1 / -1; }
    #amount-summary-card .amount-summary-stat { margin-left: 0 !important; color: #555; white-space: nowrap; }
    #amount-summary-card .amount-summary-stat b { color: #333; font-weight: 600; }
    #amount-summary-card .amount-adjustments {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px !important;
        align-items: stretch !important;
        font-size: 13px !important;
    }
    #amount-summary-card .amount-adjustment-field {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 5px;
        min-width: 0;
        color: #555;
        white-space: nowrap;
    }
    #amount-summary-card .amount-adjustment-field > span:first-child { overflow: hidden; text-overflow: ellipsis; }
    #amount-summary-card .amount-adjustment-input,
    #amount-summary-card #adj-surcharge-note {
        box-sizing: border-box;
        width: 100% !important;
        min-width: 0;
        min-height: 44px;
        padding: 8px 10px !important;
        border: 1px solid #c9d2df;
        border-radius: 4px;
        background: #fff;
        color: #333;
        font-size: 16px !important;
    }
    #amount-summary-card .amount-adjustment-input:focus,
    #amount-summary-card #adj-surcharge-note:focus { border-color: #1a73e8; outline: 2px solid rgba(26, 115, 232, .14); outline-offset: 0; }
    #amount-summary-card .amount-adjustment-unit { color: #6b7280; }
    #amount-summary-card .amount-note-field { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr); }
    #amount-summary-card .amount-note-field input { width: 100% !important; }
    #amount-summary-card .amount-final {
        grid-column: 1 / -1;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        min-height: 44px;
        padding: 8px 10px;
        border-top: 1px solid #e5e7eb;
        background: #f8f9fa;
        color: #555;
    }
    #amount-summary-card .amount-final b { color: #172033; font-size: 18px; font-weight: 600; }

    /* 供应商页（独立页面）：贴边 + 底部留白（保存栏不遮挡）+ 中部提交按钮移入底部栏 */
    .container {
        padding: 12px 12px 84px;
    }
    .header {
        padding: 16px 18px;
    }
    .btn-submit { display: none; }

    /* 移动端零 emoji：包裹在 span.mobile-hide-emoji 中的符号隐藏 */
    .mobile-hide-emoji { display: none; }

    /* 品类/卡牌选择弹窗移动端近全屏，且层级高于移动编辑弹窗（z-index 1100）。
       注意：orders_edit.html inline <style> 的 .modal z-index:1000 在 <link> 之后加载，
       类选择器会被覆盖——必须用 id 特异性 */
    #category-modal, #card-modal {
        z-index: 1200;
    }
    #category-modal .modal-content, #card-modal .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
    }

    /* ── 移动端通用：输入 ≥16px、触控目标 ≥44px ── */
    .editing-input,
    .editing-select,
    .editing-textarea {
        font-size: 16px;
    }
    .modal-content input,
    .modal-content select,
    .modal-content textarea {
        font-size: 16px;
    }
    .btn {
        min-height: 44px;
    }
    .btn-sm {
        min-height: 44px;
        padding: 6px 12px;
    }
}
