devportal2 / static /css /layout.css
Akay Borana
Complete Android-first UI rebuild with mobile-first design system
81552f4
Raw
History Blame Contribute Delete
6.85 kB
/* static/css/layout.css β€” Mobile-first Android layout */
/* ── App Shell ── */
#app-layout {
display: none;
width: 100%;
height: 100%;
}
#app-layout.open { display: flex; }
/* ── Sidebar Overlay ── */
#sidebar-overlay {
display: none;
position: fixed;
inset: 0;
background: var(--scrim);
z-index: 90;
-webkit-backdrop-filter: blur(4px);
backdrop-filter: blur(4px);
}
#sidebar-overlay.active { display: block; }
/* ── Sidebar Drawer ── */
#sidebar {
position: fixed;
top: 0;
left: 0;
width: var(--sidebar-w);
height: 100%;
background: var(--bg-surface);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
transform: translateX(-100%);
transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 100;
padding-top: env(safe-area-inset-top, 0px);
padding-bottom: env(safe-area-inset-bottom, 0px);
}
#sidebar.open { transform: translateX(0); }
/* ── Logo ── */
.logo-area {
padding: var(--sp-5) var(--sp-5);
display: flex;
align-items: center;
gap: var(--sp-3);
border-bottom: 1px solid var(--divider);
min-height: 60px;
}
.logo-icon {
width: 36px;
height: 36px;
background: var(--accent-dim);
border-radius: var(--r-sm);
display: flex;
align-items: center;
justify-content: center;
color: var(--accent);
font-size: 18px;
flex-shrink: 0;
}
.logo-text {
font-size: 17px;
font-weight: 700;
letter-spacing: 0.5px;
color: var(--text-1);
}
.logo-accent { color: var(--accent); }
/* ── Nav Items ── */
.nav-section {
padding: var(--sp-3) var(--sp-3);
flex: 1;
overflow-y: auto;
}
.nav-label {
padding: var(--sp-3) var(--sp-3) var(--sp-1);
font-size: 11px;
font-weight: 600;
color: var(--text-3);
text-transform: uppercase;
letter-spacing: 0.8px;
}
.nav-item {
display: flex;
align-items: center;
gap: var(--sp-3);
padding: 0 var(--sp-3);
height: var(--touch-min);
border-radius: var(--r-md);
cursor: pointer;
color: var(--text-2);
font-size: 14px;
font-weight: 500;
transition: all 0.15s ease;
touch-action: manipulation;
user-select: none;
margin-bottom: 2px;
}
.nav-item:active { transform: scale(0.98); }
.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text-1); }
.nav-item.active {
background: var(--accent-dim);
color: var(--accent);
}
.nav-item i { width: 22px; text-align: center; font-size: 16px; flex-shrink: 0; }
.nav-divider { border: none; border-top: 1px solid var(--divider); margin: var(--sp-2) var(--sp-3); }
/* ── Main Content ── */
#main-content {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
width: 100%;
}
/* ── Top Bar ── */
#top-bar {
height: var(--topbar-h);
padding: 0 var(--sp-3);
padding-left: calc(var(--sp-3) + env(safe-area-inset-left, 0px));
padding-right: calc(var(--sp-3) + env(safe-area-inset-right, 0px));
border-bottom: 1px solid var(--divider);
display: flex;
align-items: center;
justify-content: space-between;
background: var(--bg-surface);
flex-shrink: 0;
z-index: 10;
}
.topbar-btn {
background: none;
border: none;
color: var(--text-1);
cursor: pointer;
min-width: var(--touch-min);
min-height: var(--touch-min);
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--r-sm);
font-size: 18px;
transition: background 0.15s ease;
}
.topbar-btn:active { background: rgba(255,255,255,0.08); }
.conn-badge {
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
font-weight: 600;
padding: 4px 10px;
border-radius: var(--r-full);
background: var(--error-dim);
color: var(--error);
}
.conn-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: currentColor;
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
/* ── View Container ── */
.view-container {
flex: 1;
display: none;
overflow: hidden;
min-height: 0;
}
.view-container.active { display: flex; flex-direction: column; }
/* ══════════════════════════════════════════════
BOTTOM NAVIGATION β€” Android Material Style
══════════════════════════════════════════════ */
#bottom-nav {
display: flex;
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
background: var(--bg-surface);
border-top: 1px solid var(--border);
z-index: 80;
padding-bottom: env(safe-area-inset-bottom, 0px);
align-items: stretch;
}
.bnav-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
color: var(--text-3);
font-size: 11px;
font-weight: 500;
cursor: pointer;
transition: color 0.15s ease;
touch-action: manipulation;
min-height: var(--touch-min);
position: relative;
user-select: none;
}
.bnav-item:active { transform: scale(0.92); }
.bnav-item i { font-size: 20px; transition: transform 0.15s ease; }
.bnav-item.active { color: var(--accent); }
.bnav-item.active i { transform: scale(1.1); }
/* Active indicator pill */
.bnav-item.active::before {
content: '';
position: absolute;
top: 6px;
width: 32px;
height: 3px;
background: var(--accent);
border-radius: var(--r-full);
}
/* ── Main content offset for bottom nav ── */
#main-content {
padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
}
/* ══════════════════════════════════════
RESPONSIVE: Desktop (>= 769px)
══════════════════════════════════════ */
@media (min-width: 769px) {
#sidebar {
position: relative;
transform: none;
width: var(--sidebar-w);
flex-shrink: 0;
}
#sidebar-overlay { display: none !important; }
#bottom-nav { display: none; }
#main-content { padding-bottom: 0; }
#mobile-menu-btn { display: none; }
}
/* ── Light Theme ── */
:root.light #top-bar { background: var(--bg-surface); }
:root.light #bottom-nav { background: var(--bg-surface); border-top-color: var(--border); }
:root.light .nav-item:hover { background: rgba(0,0,0,0.04); }
:root.light .nav-item.active { background: var(--accent-dim); }