/* Mobile presentation only. Desktop and printed invoices keep their styles. */
@media screen and (max-width: 767px) {
    .app-container, .main-wrapper, #app-content { min-width: 0; }
    .app-header { gap: 8px; }
    .header-search-wrapper { flex: 1; min-width: 0; width: auto; }
    .header-actions { gap: 6px !important; }
    #header-user-role-text { display: none; }
    #profile-dropdown-btn { padding: 4px !important; }
    .header-search-input { font-size: 16px; width: 100%; }
    #app-content { padding: 16px 12px 28px; }
    .view-header { flex-wrap: wrap; gap: 12px; }
    .view-header h1 { font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
    .iphone-billing-heading > div { min-width: 0; width: 100%; }
    .iphone-billing-heading button { flex: 1; white-space: normal; }
    .billing-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .billing-grid > *, .billing-grid .form-group { min-width: 0; }
    .billing-grid .card { padding: 16px; border-radius: 16px; }
    .billing-grid .card > div[style*="display:flex"],
    .billing-grid .card > div[style*="display: flex"] { flex-wrap: wrap; }
    .billing-grid input, .billing-grid select, .billing-grid textarea,
    .modal-content input, .modal-content select, .modal-content textarea {
        font-size: 16px !important; max-width: 100%; min-height: 46px;
    }
    .billing-grid button, .modal-content button, #menu-toggle,
    .iphone-cards button, .iphone-cards .btn { min-height: 44px; touch-action: manipulation; }
    .billing-grid .serial-select-pill { min-height: 44px; padding: 10px !important; }
    #form-group-serial-picker { width: 100%; }
    .billing-items-table { border: 0; overflow: visible; }
    .iphone-cards, .iphone-cards tbody { display: block; width: 100%; min-width: 0 !important; }
    .iphone-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .iphone-cards tbody tr { display: block; padding: 12px; margin: 12px 0; border: 1px solid var(--border-color); border-radius: 14px; background: var(--input-bg); }
    .iphone-cards tbody td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 !important; border: 0; white-space: normal; text-align: right; overflow-wrap: anywhere; min-width: 0; }
    .iphone-cards tbody td::before { content: attr(data-mobile-label); text-align: left; color: var(--text-secondary); flex: 0 0 32%; font-size: 13px; }
    .iphone-cards tbody td:first-child { display: block; text-align: left; }
    .iphone-cards tbody td:first-child::before { display: none; }
    .iphone-cards tbody td[colspan] { display: block; text-align: center; }
    .iphone-cards tbody td[colspan]::before { display: none; }
    .iphone-cards td > * { min-width: 0; max-width: 100%; }
    .iphone-cards .action-update-price { width: 115px !important; }
    .selected-serial-badge { white-space: normal; overflow-wrap: anywhere; font-size: 13px; }
    .billing-grid .summary-row { gap: 12px; }
    .billing-grid .summary-row.total { font-size: 22px; flex-wrap: wrap; }
    #btn-save-billing { height: auto !important; min-height: 52px; white-space: normal; font-size: 16px; }
    .modal-content { width: calc(100% - 16px) !important; max-width: 100% !important; max-height: 90dvh; overflow-y: auto; border-radius: 18px; }
    .modal-header, .modal-body, .modal-footer { padding: 16px; }
    .modal-footer { flex-wrap: wrap; gap: 10px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
    .modal-footer .btn { flex: 1; white-space: normal; }
    #abono-amount { font-size: 24px !important; min-height: 56px; }
    #safe-sync-status { max-height: 35dvh; overflow: auto; bottom: max(12px, env(safe-area-inset-bottom)) !important; }
    #safe-sync-status button { min-height: 44px; margin-top: 8px; }
}
