feat(ui): add responsive CSS for mobile accessibility

- Add mobile-first responsive CSS to base.html
- Wrap all tables in .table-container for horizontal scrolling on mobile
- Add breakpoints for phones (576px), tablets (768px), desktops (992px, 1200px)
- Improve mobile navigation (vertical stack) and form layouts (full-width)
- Add print styles for clean printing
- Update project_management.html editor for mobile
- Document all changes in docs/RESPONSIVE_CSS.md

No backend or JavaScript changes - pure CSS solution.
For 5 internal technical users, this is simpler and more appropriate than
HTMX or SPA approaches. Solves mobile accessibility issue with minimal changes.
This commit is contained in:
ijuanes 2026-06-20 01:20:39 +01:00
parent 531b3a9048
commit 927c323a6e
7 changed files with 547 additions and 139 deletions

View file

@ -123,7 +123,178 @@
textarea {
height: 100px;
}
</style>
/* ============================================
RESPONSIVE DESIGN - Mobile First
Added for internal technical staff mobile access
============================================ */
/* Mobile-first base styles */
.container {
max-width: 100%;
padding: 1rem;
margin: 0 auto;
}
/* Navigation - stack vertically on mobile */
.nav {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-bottom: 1rem;
}
.nav a {
padding: 0.75rem 1rem;
text-align: center;
white-space: nowrap;
}
/* Tables - responsive with horizontal scroll */
.table-container {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
margin-top: 1rem;
}
table {
min-width: 600px;
width: 100%;
}
th, td {
padding: 0.75rem;
white-space: nowrap;
}
/* Forms - full width on mobile */
form {
max-width: 100%;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
width: 100%;
padding: 0.75rem;
margin-bottom: 1rem;
box-sizing: border-box;
}
/* Buttons - full width on mobile */
.btn {
padding: 0.75rem 1.5rem;
width: 100%;
margin-bottom: 0.5rem;
display: block;
}
.btn:last-child {
margin-bottom: 0;
}
/* Cards for mobile display */
.tablet-card,
.user-card,
.loan-card {
background: white;
border-radius: 8px;
padding: 1rem;
margin-bottom: 1rem;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
border: 1px solid #e0e0e0;
}
/* Flash messages */
.flash-message {
padding: 1rem;
margin-bottom: 1rem;
border-radius: 4px;
}
/* Section spacing */
.section {
margin-bottom: 1.5rem;
}
/* ============================================
BREAKPOINTS - Tablet and Desktop
============================================ */
/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
.container {
max-width: 540px;
}
.nav {
flex-direction: row;
flex-wrap: wrap;
}
.nav a {
flex: 1 1 auto;
min-width: 120px;
}
.btn {
width: auto;
display: inline-block;
margin-bottom: 0;
margin-right: 0.5rem;
}
.btn:last-child {
margin-right: 0;
}
}
/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
body {
padding: 1rem;
}
.container {
max-width: 720px;
padding: 1.5rem;
}
table {
min-width: auto;
}
.table-container {
overflow-x: visible;
}
}
/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
.container {
max-width: 960px;
}
.nav {
flex-wrap: nowrap;
}
}
/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
.container {
max-width: 1140px;
}
}
/* Print styles */
@media print {
.nav,
.btn,
.flash-message {
display: none !important;
}
body {
background: white;
padding: 0;
}
.container {
box-shadow: none;
border: none;
max-width: 100%;
padding: 0;
}
}
</head>
<body>
<div class="container">