feat: aggiunti: loggica random, tema scuro, correzioni mail, miglioramenti generali, cache;

This commit is contained in:
StefanoSalemi
2026-04-17 18:27:37 +02:00
parent a7ef46640d
commit 104ad53a9a
26 changed files with 861 additions and 216 deletions

View File

@@ -16,6 +16,8 @@
--warning-bg: #fde68a;
--danger: #dc2626;
--danger-bg: #fee2e2;
--info: #3b82f6;
--info-bg: #dbeafe;
--text: #1f1f1f;
--text-secondary: #666;
--text-muted: #999;
@@ -25,6 +27,49 @@
--bg-white: #fff;
--sidebar-width: 260px;
--header-height: 64px;
--bg-weekend: #f5f5f5;
--bg-holiday: #fff7ed;
--bg-closed: #e5e7eb;
--text-closed: #9ca3af;
--border-closed: #d1d5db;
--spot-free-bg: #f0fdf4;
--spot-free-border: #22c55e;
--spot-free-text: #15803d;
--spot-occ-bg: #fefce8;
--spot-occ-border: #eab308;
--spot-occ-text: #a16207;
}
[data-theme='dark'] {
--primary: #60a5fa;
--primary-hover: #93c5fd;
--secondary: #9ca3af;
--success: #22c55e;
--success-bg: #064e3b;
--warning: #fbbf24;
--warning-bg: #78350f;
--danger: #ef4444;
--danger-bg: #7f1d1d;
--info: #60a5fa;
--info-bg: #1e3a8a;
--text: #f3f4f6;
--text-secondary: #9ca3af;
--text-muted: #6b7280;
--border: #374151;
--border-dark: #4b5563;
--bg: #111827;
--bg-white: #1f2937;
--bg-weekend: #111827; /* Dark background for weekend */
--bg-holiday: #451a03; /* Dark brown/orange for holiday */
--bg-closed: #374151; /* Gray-700 for closed */
--text-closed: #6b7280; /* Gray-500 for closed date text */
--border-closed: #4b5563; /* Gray-600 for closed border */
--spot-free-bg: #064e3b;
--spot-free-border: #059669;
--spot-free-text: #4ade80;
--spot-occ-bg: #422006;
--spot-occ-border: #ca8a04;
--spot-occ-text: #fde047;
}
/* ============================================================================
@@ -46,6 +91,31 @@ body {
min-height: 100vh;
}
/* ============================================================================
Dark mode global overrides for native browser elements
============================================================================ */
[data-theme='dark'] input,
[data-theme='dark'] select,
[data-theme='dark'] textarea {
background: var(--bg-white);
color: var(--text);
border-color: var(--border-dark);
color-scheme: dark;
}
[data-theme='dark'] input[type="date"]::-webkit-calendar-picker-indicator {
filter: invert(1);
}
[data-theme='dark'] input::placeholder,
[data-theme='dark'] textarea::placeholder {
color: var(--text-muted);
}
[data-theme='dark'] .user-button:hover {
background: var(--bg);
}
a {
color: inherit;
text-decoration: none;
@@ -72,7 +142,7 @@ textarea {
top: 0;
bottom: 0;
width: var(--sidebar-width);
background: white;
background: var(--bg-white);
color: var(--text);
border-right: 1px solid var(--border);
display: flex;
@@ -183,7 +253,7 @@ textarea {
left: 0;
right: 0;
margin-bottom: 0.5rem;
background: white;
background: var(--bg-white);
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
overflow: hidden;
@@ -226,7 +296,7 @@ textarea {
justify-content: space-between;
padding: 0 1.5rem;
min-height: 53px;
background: white;
background: var(--bg-white);
border-bottom: 1px solid var(--border);
gap: 0.75rem;
}
@@ -253,7 +323,7 @@ textarea {
Cards
============================================================================ */
.card {
background: white;
background: var(--bg-white);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1rem;
@@ -302,7 +372,7 @@ textarea {
}
.btn-secondary {
background: white;
background: var(--bg-white);
color: var(--text);
border: 1px solid var(--border-dark);
}
@@ -330,10 +400,12 @@ textarea {
display: flex;
align-items: center;
justify-content: center;
color: var(--text);
}
.btn-icon:hover {
background: var(--bg);
color: var(--text);
}
.btn-full {
@@ -364,7 +436,8 @@ textarea {
font-size: 0.9rem;
border: 1px solid var(--border-dark);
border-radius: 6px;
background: white;
background: var(--bg-white);
color: var(--text);
}
.form-input:focus,
@@ -430,7 +503,7 @@ textarea {
}
.modal-content {
background: white;
background: var(--bg-white);
border-radius: 12px;
width: 100%;
max-width: 480px;
@@ -490,12 +563,12 @@ textarea {
.message.success {
background: var(--success-bg);
color: #166534;
color: var(--success);
}
.message.error {
background: var(--danger-bg);
color: #991b1b;
color: var(--danger);
}
.badge {
@@ -508,17 +581,17 @@ textarea {
.badge-success {
background: var(--success-bg);
color: #166534;
color: var(--success);
}
.badge-warning {
background: var(--warning-bg);
color: #92400e;
color: var(--warning);
}
.badge-danger {
background: var(--danger-bg);
color: #991b1b;
color: var(--danger);
}
/* ============================================================================
@@ -591,11 +664,11 @@ textarea {
}
.calendar-day.weekend {
background: #f5f5f5;
background: var(--bg-weekend);
}
.calendar-day.holiday {
background: #fff7ed;
background: var(--bg-holiday);
}
.calendar-day.today {
@@ -643,8 +716,8 @@ textarea {
}
.status-remote {
background: #dbeafe !important;
border-color: #3b82f6 !important;
background: var(--info-bg) !important;
border-color: var(--info) !important;
}
.status-absent {
@@ -658,19 +731,19 @@ textarea {
}
.status-nodata {
background: white;
background: var(--bg-white);
}
/* Closed Day */
.calendar-day.closed {
background: #e5e7eb;
color: #9ca3af;
background: var(--bg-closed);
color: var(--text-closed);
cursor: not-allowed;
border-color: #d1d5db;
border-color: var(--border-closed);
}
.calendar-day.closed:hover {
border-color: #d1d5db;
border-color: var(--border-closed);
}
.calendar-day.closed .day-number {
@@ -678,8 +751,8 @@ textarea {
}
.team-calendar td.closed {
background: #e5e7eb;
color: #9ca3af;
background: var(--bg-closed);
color: var(--text-closed);
cursor: not-allowed;
}
@@ -723,7 +796,7 @@ textarea {
align-items: center;
gap: 0.5rem;
padding: 1rem;
background: white;
background: var(--bg-white);
border: 2px solid var(--border);
border-radius: 8px;
cursor: pointer;
@@ -789,12 +862,12 @@ textarea {
.team-calendar th.weekend,
.team-calendar td.weekend {
background: #f5f5f5;
background: var(--bg-weekend);
}
.team-calendar th.holiday,
.team-calendar td.holiday {
background: #fff7ed;
background: var(--bg-holiday);
}
.team-calendar th.today {
@@ -820,7 +893,7 @@ textarea {
min-width: 150px;
position: sticky;
left: 0;
background: white;
background: var(--bg-white);
z-index: 1;
}
@@ -828,7 +901,7 @@ textarea {
text-align: left !important;
position: sticky;
left: 0;
background: white;
background: var(--bg-white);
z-index: 1;
}
@@ -880,7 +953,7 @@ textarea {
}
.parking-spot {
background: white;
background: var(--bg-white);
border: 2px solid var(--border);
border-radius: 8px;
padding: 1rem;
@@ -1009,7 +1082,7 @@ textarea {
width: 20px;
left: 3px;
bottom: 3px;
background-color: white;
background-color: var(--bg-white);
transition: 0.3s;
border-radius: 50%;
}
@@ -1034,7 +1107,7 @@ textarea {
}
.auth-card {
background: white;
background: var(--bg-white);
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
padding: 2.5rem;
@@ -1078,7 +1151,7 @@ textarea {
.settings-section,
.profile-section {
background: white;
background: var(--bg-white);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1.5rem;
@@ -1136,6 +1209,8 @@ textarea {
border-radius: 4px;
font-size: 0.9rem;
min-width: 140px;
background: var(--bg-white);
color: var(--text);
}
.profile-field {
@@ -1194,7 +1269,7 @@ textarea {
}
.rule-section {
background: white;
background: var(--bg-white);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1.5rem;
@@ -1265,7 +1340,7 @@ textarea {
justify-content: space-between;
align-items: center;
padding: 0.75rem;
background: white;
background: var(--bg-white);
border: 1px solid var(--border);
border-radius: 4px;
}
@@ -1298,14 +1373,15 @@ textarea {
border: 1px solid var(--border-dark);
border-radius: 4px;
font-size: 0.9rem;
background: white;
background: var(--bg-white);
color: var(--text);
}
/* ============================================================================
Admin Tables
============================================================================ */
.admin-table {
background: white;
background: var(--bg-white);
border: 1px solid var(--border);
border-radius: 8px;
overflow: hidden;
@@ -1433,12 +1509,18 @@ textarea {
.team-calendar-table th.weekend,
.team-calendar-table td.weekend {
background: #f5f5f5;
background: var(--bg-weekend);
}
.team-calendar-table th.holiday,
.team-calendar-table td.holiday {
background: #fff7ed;
background: var(--bg-holiday);
}
.team-calendar-table th.closed,
.team-calendar-table td.closed {
background: var(--bg-closed);
color: var(--text-closed);
}
.team-calendar-table .member-name {
@@ -1482,7 +1564,7 @@ textarea {
}
.team-calendar-table .calendar-cell.status-remote {
background: #dbeafe !important;
background: var(--info-bg) !important;
border-color: var(--border) !important;
}
@@ -1530,8 +1612,8 @@ textarea {
.parking-badge-sm {
display: inline-block;
background: #dbeafe;
color: #1e40af;
background: var(--info-bg);
color: var(--info);
font-size: 0.55rem;
font-weight: 600;
padding: 0.1rem 0.25rem;
@@ -1647,7 +1729,8 @@ textarea {
border: 1px solid var(--border-dark);
border-radius: 6px;
font-size: 0.9rem;
background: white;
background: var(--bg-white);
color: var(--text);
min-width: 150px;
}