fix: critical mobile viewport fixes - login, modals, page constraints

- Remove min-h-screen or make responsive (md:min-h-screen for desktop only)
- Login modal: p-8 → p-4 md:p-6, space-y-8 → space-y-3 md:space-y-4
- NewItemDialog: responsive spacing p-4 md:p-6, gaps 3 md:gap-4
- StockAdjustmentPanel: p-6 → p-4 md:p-6, gaps/spacing reduced for mobile
- All container padding and gaps now follow mobile-first pattern
- Fixes viewport overflow on 375px portrait mode
- Tests: 291/291 passing
This commit is contained in:
2026-04-19 19:04:17 +03:00
parent f05fe4b1b6
commit 2cbc036eb2
9 changed files with 43 additions and 43 deletions

View File

@@ -244,15 +244,15 @@ export default function InventoryPage() {
return (
<PageShell>
<div className="p-3 md:p-8 max-w-7xl mx-auto space-y-6">
<div className="p-3 md:p-8 max-w-7xl mx-auto space-y-3 md:space-y-4">
<datalist id="existing-types">
{existingTypes.map(t => <option key={t} value={t} />)}
</datalist>
<datalist id="existing-boxes">
{existingBoxes.map(b => <option key={b} value={b} />)}
</datalist>
<header className="flex items-center gap-4 mb-6 md:mb-10">
<header className="flex items-center gap-4 mb-4 md:mb-6">
<div className="p-3 md:p-4 bg-primary/10 rounded-3xl text-primary border border-primary/20 shadow-xl shadow-primary/5">
<Package size={28} className="md:w-8 md:h-8" />
</div>
@@ -260,7 +260,7 @@ export default function InventoryPage() {
<h1 className="text-2xl md:text-3xl font-normal tracking-tight text-white leading-tight">Inventory Catalog</h1>
<p className="text-xs md:text-sm text-secondary font-normal mt-1 tracking-widest">Enterprise Stock Overview</p>
</div>
<button
<button
onClick={() => setShowBoxManager(true)}
className="ml-auto p-3 bg-surface border border-slate-800 text-secondary rounded-2xl hover:text-primary transition-all active:scale-95 shadow-xl"
title="Manage Boxes"
@@ -269,7 +269,7 @@ export default function InventoryPage() {
</button>
</header>
<div className="w-full space-y-6 md:space-y-8">
<div className="w-full space-y-3 md:space-y-4">
{/* Stats Dashboard */}
<section className="grid grid-cols-2 md:grid-cols-4 gap-2.5 md:gap-4">
<StatCard
@@ -318,7 +318,7 @@ export default function InventoryPage() {
{selectedItem && (
<div className="fixed inset-0 z-50 flex items-end sm:items-center justify-center p-0 sm:p-4 bg-background/80 animate-in fade-in duration-200">
<div className="w-full max-w-lg bg-surface border-x border-t sm:border border-slate-800 rounded-t-[2.5rem] sm:rounded-[2.5rem] shadow-2xl p-5 sm:p-8 overflow-hidden animate-in slide-in-from-bottom-10 duration-300">
<div className="flex justify-between items-center mb-6">
<div className="flex justify-between items-center mb-3 md:mb-4">
<h3 className="text-xl font-normal tracking-tight flex items-center gap-2">
{isEditing ? "Edit Item" : selectedItem.name}
{!isEditing && (
@@ -361,7 +361,7 @@ export default function InventoryPage() {
</div>
{isEditing ? (
<div className="max-h-[60vh] overflow-y-auto pr-2 space-y-4 mb-6 scrollbar-hide">
<div className="max-h-[60vh] overflow-y-auto pr-2 space-y-2 md:space-y-3 mb-4 md:mb-6 scrollbar-hide">
<div>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Item Name</label>
<input
@@ -380,7 +380,7 @@ export default function InventoryPage() {
className="w-full bg-background border border-slate-800 rounded-xl py-3 px-4 text-sm font-normal outline-none text-secondary placeholder:text-muted"
/>
</div>
<div className="grid grid-cols-2 gap-4">
<div className="grid grid-cols-2 gap-2 md:gap-3">
<div>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Category</label>
<input
@@ -484,7 +484,7 @@ export default function InventoryPage() {
</div>
) : (
<>
<div className="flex p-1 bg-background rounded-2xl mb-8">
<div className="flex p-1 bg-background rounded-2xl mb-4 md:mb-6">
{[
{ id: 'ADD', label: 'Buy More', icon: Plus, color: 'text-primary' },
{ id: 'REMOVE', label: 'Subtract', icon: Minus, color: 'text-amber-500' },