Improve mobile responsiveness with hamburger menu and drawer sidebar

This commit is contained in:
AyrisAI
2026-05-14 22:56:39 +03:00
parent 47dced6f89
commit 99f9b51db8
4 changed files with 143 additions and 19 deletions

View File

@@ -1085,6 +1085,46 @@ tr:hover td {
background: var(--danger-dim);
}
/* ── Mobile Header ── */
.mobile-header {
display: none;
align-items: center;
gap: 16px;
padding: 12px 16px;
background: var(--bg-card);
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 50;
}
.mobile-menu-btn {
background: none;
border: none;
color: var(--text-primary);
cursor: pointer;
padding: 4px;
display: flex;
align-items: center;
justify-content: center;
}
.mobile-logo {
font-weight: 700;
font-size: 16px;
color: var(--accent-hover);
}
.sidebar-overlay {
display: none;
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(4px);
z-index: 90;
animation: fadeIn 0.2s ease;
}
/* ── Responsive ── */
@media (max-width: 1024px) {
.mail-layout { grid-template-columns: 60px 280px 1fr; }
@@ -1097,12 +1137,42 @@ tr:hover td {
}
@media (max-width: 768px) {
.sidebar { display: none; }
.mail-layout { grid-template-columns: 1fr; }
.mobile-header { display: flex; }
.sidebar {
position: fixed;
left: -240px;
top: 0;
bottom: 0;
z-index: 100;
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 10px 0 30px rgba(0,0,0,0.5);
}
.sidebar-open .sidebar {
transform: translateX(240px);
}
.sidebar-open .sidebar-overlay {
display: block;
}
.mail-layout { grid-template-columns: 1fr; height: auto; overflow: visible; }
.mail-sidebar { display: none; }
.mail-detail { display: none; }
/* Show active mail view if selected */
.mail-view-active .mail-list { display: none; }
.mail-view-active .mail-detail { display: block; }
.page-body { padding: 16px; }
.page-header { padding: 16px; }
.page-header {
padding: 16px;
flex-direction: column;
align-items: flex-start;
}
.page-header .btn { width: 100%; justify-content: center; }
.stats-grid { grid-template-columns: 1fr 1fr; }
}
/* ── Language Switcher ── */