Files
TimeTrack/static/css/auth.css
Jens Luedicke 80edb1be55 Add comprehensive dark mode support with UI consistency fixes
This commit introduces a complete dark mode implementation across the entire application,
along with various UI consistency improvements and mobile responsiveness fixes.

Dark Mode Implementation:
- Added new dark-mode.css with comprehensive CSS variable system
- Implemented theme switcher with localStorage persistence
- Created dark mode color palette optimized for readability
- Added smooth transitions between light and dark themes

Component-Specific Dark Mode Styling:
- Headers: Added glowing gradient effects with animations (pulse, shimmer)
- Tables: Unified table styling across all views with proper dark mode support
- Forms: Updated all form controls, inputs, and buttons for dark mode
- Cards: Fixed white backgrounds in project cards, stat cards, and activity items
- Navigation: Enhanced sidebar and mobile navigation dark mode styling
- Modals: Added dark mode support for all modal dialogs including task modal
- Charts: Updated chart colors for dark mode visibility

UI Consistency Improvements:
- Standardized container padding (1rem) across all pages
- Unified page widths (regular: 1400px, admin: 1600px)
- Fixed mobile bottom navigation to only show on devices ≤768px
- Resolved page header positioning inconsistencies
- Improved text contrast ratios for better accessibility

Table Consolidation:
- Created tables-consolidated.css for unified table styling
- Removed duplicate table styles across components
- Standardized table headers, borders, and hover states
- Added responsive table behavior for mobile devices

Mobile Improvements:
- Fixed splash screen viewport coverage
- Enhanced mobile menu accessibility
- Improved touch targets for mobile interactions
- Added proper mobile-specific dark mode adjustments

Technical Details:
- CSS variables for easy theme customization
- Proper specificity management with [data-theme="dark"] selectors
- Performance optimized with minimal repaints
- Browser compatibility for modern browsers

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 20:41:11 +02:00

698 lines
13 KiB
CSS

/* Modern Authentication Pages Styles */
/* Auth page background */
body.auth-page {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
background-attachment: fixed;
min-height: 100vh;
padding: 2rem;
overflow-x: hidden;
overflow-y: auto; /* Allow vertical scrolling */
display: flex;
align-items: flex-start; /* Align to top */
justify-content: center;
}
/* Add min-height to html to ensure full coverage */
html {
min-height: 100%;
}
/* Animated background shapes */
body.auth-page::before,
body.auth-page::after {
content: '';
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
animation: float 20s infinite ease-in-out;
}
body.auth-page::before {
width: 300px;
height: 300px;
top: -150px;
right: -150px;
}
body.auth-page::after {
width: 500px;
height: 500px;
bottom: -250px;
left: -250px;
animation-delay: 10s;
}
/* Auth container */
.auth-container {
background: white;
border-radius: 20px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
padding: 2.5rem;
width: 100%;
max-width: 480px;
animation: slideUp 0.6s ease-out;
position: relative;
z-index: 1;
margin: 2rem auto 4rem; /* Top and bottom margin */
}
/* Logo/Brand section */
.auth-brand {
text-align: center;
margin-bottom: 2rem;
}
.auth-brand h1 {
color: #333;
font-size: 2.5rem;
margin-bottom: 0.5rem;
font-weight: 700;
}
.auth-brand p {
color: #666;
font-size: 1.1rem;
}
/* Form styles */
.auth-form {
margin-top: 2rem;
}
.form-group {
margin-bottom: 1.25rem;
position: relative;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
color: #333;
font-weight: 500;
font-size: 0.95rem;
transition: all 0.3s ease;
}
.form-control {
width: 100%;
padding: 0.875rem 1rem;
border: 2px solid #e1e8ed;
border-radius: 10px;
font-size: 1rem;
transition: all 0.3s ease;
background-color: #f8f9fa;
line-height: 1.5;
height: 48px; /* Fixed height for consistent alignment */
font-family: inherit;
}
.form-control:focus {
outline: none;
border-color: #667eea;
background-color: white;
box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}
/* Floating label effect */
.form-group.floating-label {
position: relative;
margin-bottom: 2rem;
}
.form-group.floating-label label {
position: absolute;
top: 50%;
left: 1rem;
transform: translateY(-50%);
transition: all 0.3s ease;
pointer-events: none;
background: white;
padding: 0 0.5rem;
color: #999;
}
.form-group.floating-label .form-control:focus ~ label,
.form-group.floating-label .form-control:not(:placeholder-shown) ~ label {
top: 0;
font-size: 0.85rem;
color: #667eea;
}
/* Registration options */
.registration-options {
margin-bottom: 1.5rem;
}
.registration-options .alert {
border-radius: 12px;
border: none;
background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
padding: 1rem;
}
.registration-options h5 {
color: #333;
margin-bottom: 1rem;
font-size: 1.1rem;
}
.registration-options p {
margin-bottom: 0.5rem;
color: #555;
}
.registration-options .btn-outline-primary {
border: 2px solid #667eea;
color: #667eea;
border-radius: 25px;
padding: 0.5rem 1.5rem;
transition: all 0.3s ease;
text-decoration: none;
display: inline-block;
font-weight: 500;
}
.registration-options .btn-outline-primary:hover {
background: #667eea;
color: white;
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}
/* Submit button */
.btn-primary {
width: 100%;
padding: 1rem;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 10px;
color: white;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}
.btn-primary:active {
transform: translateY(0);
}
/* Ripple effect for button */
.btn-primary::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
border-radius: 50%;
background: rgba(255, 255, 255, 0.5);
transform: translate(-50%, -50%);
transition: width 0.6s, height 0.6s;
}
.btn-primary:active::after {
width: 300px;
height: 300px;
}
/* Auth links */
.auth-links {
text-align: center;
margin-top: 2rem;
}
.auth-links p {
color: #666;
margin-bottom: 0.5rem;
}
.auth-links a {
color: #667eea;
text-decoration: none;
font-weight: 500;
transition: all 0.3s ease;
}
.auth-links a:hover {
color: #764ba2;
text-decoration: underline;
}
/* Verification notice */
.verification-notice {
background: #f0f4ff;
border-radius: 10px;
padding: 1rem;
margin-top: 1.5rem;
text-align: center;
}
.verification-notice p {
color: #555;
font-size: 0.9rem;
margin: 0;
}
/* Alert messages */
.alert {
padding: 1rem;
border-radius: 10px;
margin-bottom: 1.5rem;
border: none;
animation: fadeIn 0.3s ease;
}
.alert-error {
background: #fee;
color: #c33;
}
.alert-success {
background: #efe;
color: #3c3;
}
.alert-info {
background: #eef;
color: #33c;
}
/* Password strength indicator integration */
.password-strength-container {
margin-top: 0.75rem;
animation: fadeIn 0.3s ease;
}
.password-strength-indicator {
height: 6px;
background-color: #f0f0f0;
border-radius: 3px;
overflow: hidden;
margin-bottom: 0.5rem;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.password-strength-bar {
height: 100%;
transition: all 0.4s ease;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
/* Icon inputs */
.input-icon {
position: relative;
}
.input-icon i {
position: absolute;
left: 1rem;
color: #999;
font-size: 1.2rem;
z-index: 1;
pointer-events: none;
}
.input-icon .form-control {
padding-left: 3rem;
}
.input-icon label {
position: absolute;
left: 3rem; /* Start after the icon */
top: 0.875rem;
color: #999;
pointer-events: none;
transition: all 0.3s ease;
background: white;
padding: 0 0.25rem;
}
.input-icon .form-control:focus ~ label,
.input-icon .form-control:not(:placeholder-shown) ~ label {
top: -0.5rem;
left: 2.75rem;
font-size: 0.85rem;
color: #667eea;
}
/* Checkbox styling */
.form-check {
margin-bottom: 1.5rem;
}
.form-check-input {
width: 20px;
height: 20px;
margin-right: 0.5rem;
cursor: pointer;
}
.form-check-label {
cursor: pointer;
color: #555;
}
/* Company code input special styling */
.company-code-group {
position: relative;
}
.company-code-group::before {
content: '\eebe'; /* Tabler icon building */
font-family: 'tabler-icons';
position: absolute;
left: 1rem;
top: 2.5rem; /* Position below the label */
font-size: 1.5rem;
z-index: 1;
}
.company-code-group .form-control {
padding-left: 3.5rem;
font-family: inherit;
font-size: 1.2rem;
letter-spacing: 0.1em;
text-transform: uppercase;
}
/* Animations */
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes float {
0%, 100% {
transform: translateY(0) rotate(0deg);
}
33% {
transform: translateY(-30px) rotate(120deg);
}
66% {
transform: translateY(30px) rotate(240deg);
}
}
/* Responsive design */
@media (max-width: 568px) {
body.auth-page {
padding: 1rem;
align-items: flex-start; /* Align to top on mobile */
}
.auth-container {
padding: 2rem 1.5rem;
margin: 1rem auto;
max-height: none; /* Remove height limit on mobile */
}
.auth-brand h1 {
font-size: 2rem;
}
body.auth-page::before,
body.auth-page::after {
display: none;
}
}
/* Loading state */
.btn-primary.loading {
color: transparent;
}
.btn-primary.loading::before {
content: '';
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin-left: -10px;
margin-top: -10px;
border: 2px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: spinner 0.8s linear infinite;
}
@keyframes spinner {
to {
transform: rotate(360deg);
}
}
/* Social registration options */
.social-registration {
margin-top: 2rem;
text-align: center;
}
.social-divider {
position: relative;
text-align: center;
margin: 2rem 0;
}
.social-divider::before {
content: '';
position: absolute;
top: 50%;
left: 0;
right: 0;
height: 1px;
background: #e1e8ed;
}
.social-divider span {
background: white;
padding: 0 1rem;
color: #999;
position: relative;
}
/* Progress indicator for multi-step forms */
.registration-progress {
display: flex;
justify-content: space-between;
margin-bottom: 2rem;
}
.progress-step {
flex: 1;
text-align: center;
position: relative;
}
.progress-step::after {
content: '';
position: absolute;
top: 15px;
right: -50%;
width: 100%;
height: 2px;
background: #e1e8ed;
z-index: -1;
}
.progress-step:last-child::after {
display: none;
}
.progress-step.active::after {
background: #667eea;
}
.progress-step-number {
width: 30px;
height: 30px;
background: #e1e8ed;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
margin-bottom: 0.5rem;
font-weight: 600;
color: #999;
}
.progress-step.active .progress-step-number {
background: #667eea;
color: white;
}
.progress-step.completed .progress-step-number {
background: #4caf50;
color: white;
}
.progress-step-label {
font-size: 0.85rem;
color: #666;
}
/* Form helper text alignment */
.form-text {
display: block;
margin-top: 0.25rem;
font-size: 0.875rem;
color: #6c757d;
}
.input-icon .form-text {
padding-left: 3rem; /* Align with input content */
}
/* Fix textarea height */
textarea.form-control {
height: auto;
min-height: 48px;
}
/* Better icon vertical centering */
.input-icon i {
display: flex;
align-items: center;
height: 48px; /* Match input height */
top: 0;
}
/* Dark Mode Styles for Auth Pages */
[data-theme="dark"] body.auth-page {
background: linear-gradient(135deg, #2d3561 0%, #3b2451 100%);
}
[data-theme="dark"] .auth-container {
background: var(--bg-card);
color: var(--text-primary);
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .auth-header h1 {
color: var(--text-primary);
}
[data-theme="dark"] .auth-header p {
color: var(--text-secondary);
}
[data-theme="dark"] .form-group label {
color: var(--text-secondary);
}
[data-theme="dark"] .form-control {
background-color: var(--bg-input);
border-color: var(--border-primary);
color: var(--text-primary);
}
[data-theme="dark"] .form-control:focus {
background-color: var(--bg-input);
border-color: var(--primary-color);
color: var(--text-primary);
box-shadow: 0 0 0 0.2rem rgba(122, 141, 245, 0.25);
}
[data-theme="dark"] .form-control::placeholder {
color: var(--text-tertiary);
}
[data-theme="dark"] .input-icon i {
color: var(--text-tertiary);
}
[data-theme="dark"] .auth-divider {
color: var(--text-tertiary);
}
[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after {
background-color: var(--border-primary);
}
[data-theme="dark"] .auth-footer {
color: var(--text-secondary);
}
[data-theme="dark"] .auth-footer a {
color: var(--primary-color);
}
[data-theme="dark"] .form-text {
color: var(--text-tertiary);
}
[data-theme="dark"] .progress-step-number {
background: var(--bg-tertiary);
color: var(--text-secondary);
}
[data-theme="dark"] .progress-step.active .progress-step-number {
background: var(--primary-color);
color: white;
}
[data-theme="dark"] .progress-step-label {
color: var(--text-secondary);
}
[data-theme="dark"] .invite-info {
background-color: var(--bg-secondary);
border-color: var(--border-primary);
}
[data-theme="dark"] .invite-info strong {
color: var(--text-primary);
}
[data-theme="dark"] .company-info-card {
background-color: var(--bg-secondary);
border-color: var(--primary-color);
}
[data-theme="dark"] .password-strength-bar {
background-color: var(--bg-tertiary);
}
[data-theme="dark"] .password-requirements li {
color: var(--text-secondary);
}
[data-theme="dark"] .password-requirements li.valid {
color: var(--success-color);
}
[data-theme="dark"] .social-buttons .btn-outline-dark {
background-color: transparent;
color: var(--text-primary);
border-color: var(--border-primary);
}
[data-theme="dark"] .social-buttons .btn-outline-dark:hover {
background-color: var(--bg-hover);
border-color: var(--border-hover);
}