Improve mobile UI/UX.
This commit is contained in:
125
static/css/mobile-bottom-nav.css
Normal file
125
static/css/mobile-bottom-nav.css
Normal file
@@ -0,0 +1,125 @@
|
||||
/* Mobile Bottom Navigation Bar */
|
||||
@media (max-width: 768px) {
|
||||
/* Bottom Navigation Container */
|
||||
.mobile-bottom-nav {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: white;
|
||||
border-top: 1px solid var(--border-color, #e0e0e0);
|
||||
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
padding: 8px 0;
|
||||
padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
|
||||
}
|
||||
|
||||
/* Hide on desktop */
|
||||
@media (min-width: 769px) {
|
||||
.mobile-bottom-nav {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Navigation Items */
|
||||
.bottom-nav-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 48px;
|
||||
padding: 4px;
|
||||
text-decoration: none;
|
||||
color: var(--text-secondary, #666);
|
||||
transition: all 0.2s ease;
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Icon styling */
|
||||
.bottom-nav-item i {
|
||||
font-size: 24px;
|
||||
margin-bottom: 2px;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
/* Label styling */
|
||||
.bottom-nav-item span {
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Active state */
|
||||
.bottom-nav-item.active {
|
||||
color: var(--primary-color, #667eea);
|
||||
}
|
||||
|
||||
.bottom-nav-item.active i {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
/* Touch feedback */
|
||||
.bottom-nav-item:active {
|
||||
opacity: 0.7;
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
/* Center FAB-style time tracking button */
|
||||
.bottom-nav-item.nav-fab {
|
||||
position: relative;
|
||||
top: -10px;
|
||||
}
|
||||
|
||||
.bottom-nav-item.nav-fab .fab-button {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.bottom-nav-item.nav-fab .fab-button i {
|
||||
color: white;
|
||||
font-size: 28px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.bottom-nav-item.nav-fab span {
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Notification badge */
|
||||
.nav-badge {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: calc(50% - 16px);
|
||||
background: #ff3b30;
|
||||
color: white;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
padding: 2px 4px;
|
||||
border-radius: 10px;
|
||||
min-width: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Adjust main content to avoid overlap */
|
||||
.has-bottom-nav .content {
|
||||
padding-bottom: calc(80px + env(safe-area-inset-bottom, 0)) !important;
|
||||
}
|
||||
|
||||
/* Keep sidebar for hamburger menu functionality */
|
||||
/* Removed the rule that was hiding sidebar */
|
||||
}
|
||||
495
static/css/mobile-forms.css
Normal file
495
static/css/mobile-forms.css
Normal file
@@ -0,0 +1,495 @@
|
||||
/* Mobile Form Enhancements for TimeTrack */
|
||||
/* This file contains mobile-specific form optimizations */
|
||||
|
||||
/* ===== Form Container Improvements ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* Form wrapper adjustments */
|
||||
.form-container,
|
||||
.auth-container,
|
||||
.profile-container {
|
||||
padding: var(--mobile-edge-padding);
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Form sections with better spacing */
|
||||
.form-section {
|
||||
margin-bottom: 24px;
|
||||
padding: 16px;
|
||||
background: var(--bg-light);
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.form-section-title {
|
||||
font-size: 1.125rem;
|
||||
margin-bottom: 12px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Enhanced Input Fields ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* Base input improvements */
|
||||
input[type="text"],
|
||||
input[type="email"],
|
||||
input[type="password"],
|
||||
input[type="number"],
|
||||
input[type="tel"],
|
||||
input[type="date"],
|
||||
input[type="time"],
|
||||
input[type="datetime-local"],
|
||||
input[type="search"],
|
||||
input[type="url"],
|
||||
select,
|
||||
textarea {
|
||||
width: 100%;
|
||||
min-height: var(--mobile-input-height);
|
||||
padding: 14px 16px;
|
||||
font-size: 16px; /* Prevents zoom on iOS */
|
||||
border: 2px solid var(--border-color);
|
||||
transition: border-color 0.2s ease;
|
||||
-webkit-appearance: none;
|
||||
border-radius: 8px;
|
||||
background-color: var(--bg-light);
|
||||
}
|
||||
|
||||
/* Focus states with better visibility */
|
||||
input:focus,
|
||||
select:focus,
|
||||
textarea:focus {
|
||||
border-color: var(--primary-color);
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
|
||||
}
|
||||
|
||||
/* Textarea specific */
|
||||
textarea {
|
||||
min-height: 100px;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
/* Select dropdown improvements */
|
||||
select {
|
||||
background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23667eea' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 16px center;
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
/* Checkbox and radio improvements */
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: 12px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Label improvements for checkboxes/radios */
|
||||
.checkbox-wrapper,
|
||||
.radio-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: var(--mobile-touch-target);
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.checkbox-wrapper label,
|
||||
.radio-wrapper label {
|
||||
cursor: pointer;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Form Labels and Helpers ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* Label styling */
|
||||
label,
|
||||
.form-label {
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Required field indicator */
|
||||
label.required::after,
|
||||
.form-label.required::after {
|
||||
content: " *";
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
/* Help text */
|
||||
.form-help,
|
||||
.help-text {
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
font-size: 13px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* Error messages */
|
||||
.form-error,
|
||||
.error-message {
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
font-size: 13px;
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
/* Input with error state */
|
||||
.has-error input,
|
||||
.has-error select,
|
||||
.has-error textarea {
|
||||
border-color: var(--danger);
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Form Groups and Layouts ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* Form group spacing */
|
||||
.form-group,
|
||||
.mb-3 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* Stack form columns on mobile */
|
||||
.form-row,
|
||||
.row {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.form-row > *,
|
||||
.row > * {
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.form-row > *:last-child,
|
||||
.row > *:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Inline form groups */
|
||||
.form-inline {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.form-inline > * {
|
||||
width: 100%;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Button Groups and Actions ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* Form action buttons */
|
||||
.form-actions,
|
||||
.button-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.form-actions .btn,
|
||||
.button-group .btn {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Primary action emphasis */
|
||||
.form-actions .btn-primary,
|
||||
.button-group .btn-primary {
|
||||
order: -1; /* Move primary button to top */
|
||||
}
|
||||
|
||||
/* Horizontal button groups on larger mobiles */
|
||||
@media (min-width: 480px) {
|
||||
.form-actions.horizontal,
|
||||
.button-group.horizontal {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.form-actions.horizontal .btn,
|
||||
.button-group.horizontal .btn {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== File Upload Enhancements ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* File input styling */
|
||||
input[type="file"] {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
border: 2px dashed var(--border-color);
|
||||
border-radius: 8px;
|
||||
background: var(--bg-light);
|
||||
}
|
||||
|
||||
/* Custom file upload area */
|
||||
.file-upload-area {
|
||||
position: relative;
|
||||
padding: 32px 16px;
|
||||
border: 2px dashed var(--primary-color);
|
||||
border-radius: 12px;
|
||||
text-align: center;
|
||||
background: rgba(102, 126, 234, 0.05);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.file-upload-area:hover,
|
||||
.file-upload-area.drag-over {
|
||||
background: rgba(102, 126, 234, 0.1);
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
|
||||
.file-upload-area input[type="file"] {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Search and Filter Forms ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* Search input with icon */
|
||||
.search-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.search-wrapper input[type="search"] {
|
||||
padding-left: 44px;
|
||||
}
|
||||
|
||||
.search-wrapper .search-icon {
|
||||
position: absolute;
|
||||
left: 16px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* Filter form improvements */
|
||||
.filter-form {
|
||||
background: var(--bg-light);
|
||||
padding: 16px;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.filter-toggle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
margin-bottom: 16px;
|
||||
background: var(--primary-color);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.filter-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.filter-content.show {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Keyboard and Focus Management ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* Adjust layout when keyboard is visible */
|
||||
.keyboard-visible .form-actions {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: var(--bg-light);
|
||||
padding: 16px;
|
||||
box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
/* Tab focus indicators */
|
||||
.form-tab-nav {
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.form-tab-nav button {
|
||||
flex-shrink: 0;
|
||||
padding: 12px 20px;
|
||||
border: none;
|
||||
background: none;
|
||||
font-size: 16px;
|
||||
color: var(--text-secondary);
|
||||
border-bottom: 2px solid transparent;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.form-tab-nav button.active {
|
||||
color: var(--primary-color);
|
||||
border-bottom-color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Time Entry Form Specific ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* Timer display adjustments */
|
||||
.timer-form {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.timer-display {
|
||||
font-size: clamp(2.5rem, 10vw, 4rem);
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
/* Project/task selectors */
|
||||
.time-entry-selectors {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* Timer controls */
|
||||
.timer-controls {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.timer-controls .btn {
|
||||
flex: 1;
|
||||
max-width: 160px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Login/Register Form Specific ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* Auth forms centering */
|
||||
.auth-wrapper {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.auth-form {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Registration type selector */
|
||||
.registration-type-selector {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 12px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.registration-type-option {
|
||||
padding: 16px;
|
||||
border: 2px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.registration-type-option.active {
|
||||
border-color: var(--primary-color);
|
||||
background: rgba(102, 126, 234, 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Progressive Enhancement ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* Collapsible form sections */
|
||||
.collapsible-section {
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
margin-bottom: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.collapsible-header {
|
||||
padding: 16px;
|
||||
background: var(--bg-light);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.collapsible-header::after {
|
||||
content: "▼";
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.collapsible-section.collapsed .collapsible-header::after {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.collapsible-content {
|
||||
padding: 16px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.collapsible-section.collapsed .collapsible-content {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Accessibility Improvements ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* Skip to form content link */
|
||||
.skip-to-form {
|
||||
position: absolute;
|
||||
top: -40px;
|
||||
left: 0;
|
||||
background: var(--primary-color);
|
||||
color: white;
|
||||
padding: 8px 16px;
|
||||
text-decoration: none;
|
||||
border-radius: 0 0 8px 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.skip-to-form:focus {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* Focus visible improvements */
|
||||
*:focus-visible {
|
||||
outline: 3px solid var(--primary-color);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Reduced motion support */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
* {
|
||||
transition-duration: 0.01ms !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
567
static/css/mobile-optimized.css
Normal file
567
static/css/mobile-optimized.css
Normal file
@@ -0,0 +1,567 @@
|
||||
/* Mobile-Optimized CSS for TimeTrack */
|
||||
/* This file contains mobile-first responsive styles to improve the mobile experience */
|
||||
|
||||
/* ===== CSS Variables for Mobile ===== */
|
||||
:root {
|
||||
/* Touch-friendly sizes */
|
||||
--mobile-touch-target: 44px;
|
||||
--mobile-input-height: 48px;
|
||||
--mobile-button-padding: 12px 16px;
|
||||
|
||||
/* Spacing */
|
||||
--mobile-edge-padding: 16px;
|
||||
--mobile-content-padding: 20px;
|
||||
|
||||
/* Typography scaling */
|
||||
--mobile-base-font: 16px;
|
||||
--mobile-small-font: 14px;
|
||||
|
||||
/* Z-index layers */
|
||||
--z-mobile-header: 100;
|
||||
--z-mobile-nav: 300;
|
||||
--z-mobile-overlay: 290;
|
||||
--z-bottom-nav: 100;
|
||||
}
|
||||
|
||||
/* ===== Base Mobile Styles ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* Prevent horizontal scroll */
|
||||
html, body {
|
||||
overflow-x: hidden;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
/* Better viewport handling for mobile browsers */
|
||||
.sidebar {
|
||||
height: 100dvh !important; /* Use dvh for better mobile support */
|
||||
max-height: -webkit-fill-available;
|
||||
}
|
||||
|
||||
/* Improved mobile header */
|
||||
.mobile-header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: var(--z-mobile-header);
|
||||
background: #ffffff !important; /* Override green background */
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
||||
padding: 8px var(--mobile-edge-padding);
|
||||
height: 56px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
/* Ensure content doesn't hide behind fixed header */
|
||||
.content {
|
||||
padding-top: calc(56px + var(--mobile-content-padding)) !important;
|
||||
padding-left: var(--mobile-edge-padding) !important;
|
||||
padding-right: var(--mobile-edge-padding) !important;
|
||||
padding-bottom: env(safe-area-inset-bottom, 20px);
|
||||
}
|
||||
|
||||
/* ===== Typography Optimization ===== */
|
||||
body {
|
||||
font-size: var(--mobile-base-font);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(1.5rem, 5vw, 2rem);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: clamp(1.25rem, 4vw, 1.75rem);
|
||||
margin-bottom: 0.875rem;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: clamp(1.125rem, 3.5vw, 1.5rem);
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
h4, h5, h6 {
|
||||
font-size: clamp(1rem, 3vw, 1.25rem);
|
||||
margin-bottom: 0.625rem;
|
||||
}
|
||||
|
||||
/* ===== Mobile Navigation Improvements ===== */
|
||||
.sidebar {
|
||||
transform: translateX(-100%);
|
||||
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
width: 85vw;
|
||||
max-width: 320px;
|
||||
border-radius: 0;
|
||||
box-shadow: 2px 0 20px rgba(0,0,0,0.15);
|
||||
z-index: var(--z-mobile-nav) !important;
|
||||
position: fixed !important;
|
||||
}
|
||||
|
||||
.sidebar.active {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
/* Mobile navigation overlay */
|
||||
.mobile-nav-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.3s ease, visibility 0.3s ease;
|
||||
z-index: var(--z-mobile-overlay);
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.mobile-nav-overlay.active {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* Mobile menu toggle button */
|
||||
.mobile-menu-toggle,
|
||||
.mobile-nav-toggle,
|
||||
#mobile-nav-toggle {
|
||||
min-width: var(--mobile-touch-target);
|
||||
min-height: var(--mobile-touch-target);
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Hamburger menu lines - override white color with higher specificity */
|
||||
.mobile-menu-toggle span,
|
||||
.mobile-nav-toggle span,
|
||||
#mobile-nav-toggle span,
|
||||
.mobile-header .mobile-nav-toggle span {
|
||||
display: block !important;
|
||||
height: 3px !important;
|
||||
width: 24px !important;
|
||||
background-color: var(--primary-color, #667eea) !important;
|
||||
border-radius: 2px !important;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
opacity: 1 !important;
|
||||
visibility: visible !important;
|
||||
}
|
||||
|
||||
/* Hover state */
|
||||
.mobile-menu-toggle:hover span,
|
||||
.mobile-nav-toggle:hover span,
|
||||
#mobile-nav-toggle:hover span {
|
||||
background-color: var(--primary-gradient-end, #764ba2) !important;
|
||||
}
|
||||
|
||||
/* Active/open state animations */
|
||||
.mobile-menu-toggle.active span:nth-child(1),
|
||||
.mobile-nav-toggle.active span:nth-child(1),
|
||||
#mobile-nav-toggle.active span:nth-child(1) {
|
||||
transform: rotate(45deg) translate(6px, 6px);
|
||||
}
|
||||
|
||||
.mobile-menu-toggle.active span:nth-child(2),
|
||||
.mobile-nav-toggle.active span:nth-child(2),
|
||||
#mobile-nav-toggle.active span:nth-child(2) {
|
||||
opacity: 0 !important;
|
||||
transform: scaleX(0);
|
||||
}
|
||||
|
||||
.mobile-menu-toggle.active span:nth-child(3),
|
||||
.mobile-nav-toggle.active span:nth-child(3),
|
||||
#mobile-nav-toggle.active span:nth-child(3) {
|
||||
transform: rotate(-45deg) translate(6px, -6px);
|
||||
}
|
||||
|
||||
/* Fallback: If spans still not visible, add pseudo-element hamburger */
|
||||
#mobile-nav-toggle::before {
|
||||
content: "☰";
|
||||
font-size: 24px;
|
||||
color: var(--primary-color, #667eea);
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Show fallback if spans are hidden */
|
||||
#mobile-nav-toggle:not(.active) span:first-child:not(:visible) ~ ::before {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Mobile brand/logo styling */
|
||||
.mobile-nav-brand {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: var(--primary-color, #667eea);
|
||||
}
|
||||
|
||||
.mobile-nav-brand a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.mobile-logo {
|
||||
max-height: 32px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* ===== Touch-Friendly Form Elements ===== */
|
||||
input[type="text"],
|
||||
input[type="email"],
|
||||
input[type="password"],
|
||||
input[type="number"],
|
||||
input[type="tel"],
|
||||
input[type="date"],
|
||||
input[type="time"],
|
||||
input[type="datetime-local"],
|
||||
select,
|
||||
textarea {
|
||||
min-height: var(--mobile-input-height);
|
||||
font-size: var(--mobile-base-font);
|
||||
padding: 12px;
|
||||
border-radius: 8px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
/* Prevent zoom on input focus */
|
||||
input[type="text"]:focus,
|
||||
input[type="email"]:focus,
|
||||
input[type="password"]:focus,
|
||||
input[type="number"]:focus,
|
||||
input[type="tel"]:focus,
|
||||
select:focus,
|
||||
textarea:focus {
|
||||
font-size: var(--mobile-base-font);
|
||||
}
|
||||
|
||||
/* Touch-friendly buttons */
|
||||
.btn,
|
||||
button,
|
||||
.button,
|
||||
input[type="submit"],
|
||||
input[type="button"] {
|
||||
min-height: var(--mobile-touch-target);
|
||||
padding: var(--mobile-button-padding);
|
||||
font-size: var(--mobile-base-font);
|
||||
touch-action: manipulation;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
/* Icon buttons need proper sizing */
|
||||
.btn-icon,
|
||||
.icon-button {
|
||||
min-width: var(--mobile-touch-target);
|
||||
min-height: var(--mobile-touch-target);
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* ===== Table Responsiveness ===== */
|
||||
.table-responsive {
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
margin-left: calc(-1 * var(--mobile-edge-padding));
|
||||
margin-right: calc(-1 * var(--mobile-edge-padding));
|
||||
padding-left: var(--mobile-edge-padding);
|
||||
padding-right: var(--mobile-edge-padding);
|
||||
}
|
||||
|
||||
/* Visual scroll indicator for tables */
|
||||
.table-responsive::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 30px;
|
||||
background: linear-gradient(to right, transparent, rgba(255,255,255,0.8));
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
|
||||
.table-responsive.scrollable::after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Compact table styling */
|
||||
.data-table {
|
||||
font-size: var(--mobile-small-font);
|
||||
}
|
||||
|
||||
.data-table th,
|
||||
.data-table td {
|
||||
padding: 8px 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Card-based layout for complex data */
|
||||
.mobile-card-view {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.hide-on-mobile {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.show-on-mobile {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.mobile-card-view {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.desktop-table-view {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Modal Improvements ===== */
|
||||
.modal {
|
||||
margin: 0;
|
||||
max-height: 100dvh;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
margin: 0;
|
||||
max-width: 100%;
|
||||
height: 100dvh;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
border-radius: 16px 16px 0 0;
|
||||
max-height: 90dvh;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
/* Account for mobile keyboard */
|
||||
.modal-open .modal-content {
|
||||
padding-bottom: env(keyboard-inset-height, 0);
|
||||
}
|
||||
|
||||
/* ===== Card and Container Adjustments ===== */
|
||||
.card {
|
||||
border-radius: 12px;
|
||||
padding: var(--mobile-content-padding);
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
margin: calc(-1 * var(--mobile-content-padding));
|
||||
margin-bottom: var(--mobile-content-padding);
|
||||
padding: 16px var(--mobile-content-padding);
|
||||
}
|
||||
|
||||
/* ===== Mobile-Specific Components ===== */
|
||||
/* Bottom action bar for primary actions */
|
||||
.mobile-action-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: var(--bg-light);
|
||||
border-top: 1px solid var(--border-color);
|
||||
padding: 12px var(--mobile-edge-padding);
|
||||
padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
z-index: 90;
|
||||
}
|
||||
|
||||
.mobile-action-bar .btn {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Content adjustment when action bar is present */
|
||||
.has-mobile-action-bar .content {
|
||||
padding-bottom: calc(80px + env(safe-area-inset-bottom, 0)) !important;
|
||||
}
|
||||
|
||||
/* ===== Time Tracking Specific ===== */
|
||||
/* Fix page header on mobile */
|
||||
.page-header {
|
||||
padding: 1.5rem var(--mobile-edge-padding) !important;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.header-left {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: clamp(1.5rem, 5vw, 2rem);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.page-subtitle {
|
||||
font-size: 0.875rem;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
/* Header action buttons */
|
||||
.header-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.header-actions .btn {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
padding: 0.75rem 1rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
/* For slightly larger phones, show buttons side by side */
|
||||
@media (min-width: 400px) {
|
||||
.header-actions {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.header-actions .btn {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Timer display and controls */
|
||||
.timer-display,
|
||||
#timer {
|
||||
font-size: clamp(1.5rem, 5vw, 2rem) !important;
|
||||
}
|
||||
|
||||
.timer-controls {
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.timer-controls .btn {
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
/* Timer card adjustments */
|
||||
.timer-card {
|
||||
padding: 1.5rem var(--mobile-edge-padding);
|
||||
}
|
||||
|
||||
/* Stats cards in grid */
|
||||
.stats-grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
@media (min-width: 480px) {
|
||||
.stats-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Performance Optimizations ===== */
|
||||
/* Reduce motion for users who prefer it */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Landscape Orientation Handling ===== */
|
||||
@media (max-height: 500px) and (orientation: landscape) {
|
||||
.mobile-header {
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-top: calc(48px + 12px) !important;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
max-height: 100dvh;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Mobile Utilities ===== */
|
||||
@media (max-width: 768px) {
|
||||
/* Spacing utilities */
|
||||
.mobile-mt-1 { margin-top: 8px !important; }
|
||||
.mobile-mt-2 { margin-top: 16px !important; }
|
||||
.mobile-mt-3 { margin-top: 24px !important; }
|
||||
.mobile-mb-1 { margin-bottom: 8px !important; }
|
||||
.mobile-mb-2 { margin-bottom: 16px !important; }
|
||||
.mobile-mb-3 { margin-bottom: 24px !important; }
|
||||
|
||||
/* Text alignment */
|
||||
.mobile-text-center { text-align: center !important; }
|
||||
.mobile-text-left { text-align: left !important; }
|
||||
.mobile-text-right { text-align: right !important; }
|
||||
|
||||
/* Flexbox utilities */
|
||||
.mobile-flex-column { flex-direction: column !important; }
|
||||
.mobile-flex-wrap { flex-wrap: wrap !important; }
|
||||
|
||||
/* Full width on mobile */
|
||||
.mobile-full-width {
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Improved Focus States for Accessibility ===== */
|
||||
@media (max-width: 768px) {
|
||||
*:focus {
|
||||
outline: 3px solid var(--primary-color);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
input:focus,
|
||||
select:focus,
|
||||
textarea:focus {
|
||||
outline-offset: 0;
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user