/**
 * 手机断点样式(≤767px,桌面不受影响)。
 * 对应设计稿 ~/.gstack/projects/stv930510-account/designs/bills-invoices-mobile-20260721/
 * 主要治理 Bills / Invoices 创建、编辑表单在手机上的跑版。
 */
@media (max-width: 767px) {
    /* 输入框 16px:iOS Safari 聚焦时不再自动放大整页(<16px 会触发缩放) */
    .fi-input,
    .fi-select-input,
    textarea,
    .choices__inner,
    .choices__input,
    .choices__list--single .choices__item {
        font-size: 16px !important;
    }

    /* 长内容(附件名/单号/表格)不再把整页往外推,margin 不再乱跑 */
    body {
        overflow-x: clip;
    }

    /* 页面左右留白收紧,375px 屏多留内容宽度 */
    .fi-main {
        padding-inline: 0.625rem;
    }

    /* 表单保存条吸底:滚到哪里都够得着 Save,含 iPhone 底部安全区 */
    .fi-form-actions {
        position: sticky;
        bottom: 0;
        z-index: 15;
        background: rgba(255, 255, 255, 0.95);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        border-top: 1px solid #eef0f2;
        margin-inline: -0.625rem;
        padding: 0.625rem 0.625rem calc(0.625rem + env(safe-area-inset-bottom));
    }

    .dark .fi-form-actions {
        background: rgba(24, 24, 27, 0.95);
        border-top-color: rgb(63 63 70);
    }

    .fi-form-actions > div,
    .fi-form-actions .fi-ac {
        width: 100%;
    }

    .fi-form-actions .fi-btn {
        flex: 1;
        min-height: 44px;
    }

    /* 行项目卡片化:浅灰底,和设计稿的 item-card 一致;手柄/删除按钮放大到可点 */
    .fi-fo-repeater-item {
        background: #f9fafb;
    }

    .dark .fi-fo-repeater-item {
        background: rgba(255, 255, 255, 0.03);
    }

    .fi-fo-repeater-item-header .fi-icon-btn {
        min-width: 2.5rem;
        min-height: 2.5rem;
    }

    /* 行小计:右对齐 + 等宽数字(设计稿卡底 Line amount 行) */
    .line-amount,
    .line-amount .fi-fo-placeholder {
        text-align: right;
        font-family: 'IBM Plex Mono', ui-monospace, monospace;
        font-variant-numeric: tabular-nums;
    }

    /* 快速模式金额:大号等宽数字,一眼确认(设计稿 22px hero 输入) */
    input.bill-total-input {
        font-size: 22px !important;
        font-weight: 600;
        font-family: 'IBM Plex Mono', ui-monospace, monospace;
        font-variant-numeric: tabular-nums;
    }

    /* 实时汇总框整宽(覆盖桌面用的内联 max-width:320/340px 右浮) */
    .totals-box {
        max-width: none !important;
    }

    /* 表格行内操作、图标按钮:触控目标 ≥36px */
    .fi-icon-btn {
        min-width: 2.25rem;
        min-height: 2.25rem;
    }
}
