Files
qihuaiflow/frontend/src/components/layout/FrontLayout.css
T

242 lines
4.3 KiB
CSS

/* ===== Front Layout V3 - Light Theme ===== */
.front-layout {
display: flex;
height: 100vh;
overflow: hidden;
background: #F5F7FC;
color: #1A1F36;
}
/* Sidebar */
.front-sidebar {
width: var(--sidebar-width);
min-width: var(--sidebar-width);
background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFE 100%);
border-right: 1px solid rgba(0, 0, 0, 0.08);
display: flex;
flex-direction: column;
transition: width var(--transition-slow), min-width var(--transition-slow);
overflow: hidden;
z-index: var(--z-sticky);
}
.front-sidebar.collapsed {
width: var(--sidebar-collapsed);
min-width: var(--sidebar-collapsed);
}
.sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--space-lg) var(--space-lg);
height: var(--header-height);
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.sidebar-logo {
display: flex;
align-items: center;
gap: var(--space-md);
}
.sidebar-brand {
font-size: var(--text-lg);
font-weight: 700;
color: #1A1F36;
letter-spacing: -0.02em;
white-space: nowrap;
}
.collapse-btn {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: var(--radius-md);
color: #8892B0;
transition: all var(--transition-fast);
cursor: pointer;
}
.collapse-btn:hover {
background: rgba(0, 0, 0, 0.08);
color: #8892B0;
}
/* Navigation */
.sidebar-nav {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: var(--space-sm);
overflow-y: auto;
}
.nav-section {
display: flex;
flex-direction: column;
gap: 2px;
}
.nav-group-title {
padding: 14px var(--space-md) 6px;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
color: #9CA3AF;
}
.nav-item {
position: relative;
display: flex;
align-items: center;
gap: var(--space-md);
padding: 10px var(--space-md);
border-radius: var(--radius-md);
color: #8892B0;
text-decoration: none;
font-size: var(--text-base);
font-weight: 500;
transition: all var(--transition-fast);
white-space: nowrap;
}
.nav-item:hover {
background: rgba(91, 95, 237, 0.06);
color: #1A1F36;
}
.nav-item.active {
background: rgba(91, 95, 237, 0.12);
color: #5B5FED;
}
.nav-icon {
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
flex-shrink: 0;
}
.nav-label {
flex: 1;
}
/* Active dot indicator */
.nav-active-dot {
display: none;
}
.nav-item.active .nav-active-dot {
display: block;
position: absolute;
right: 8px;
width: 6px;
height: 6px;
border-radius: 50%;
background: #5B5FED;
box-shadow: 0 0 8px rgba(91, 95, 237, 0.5);
}
/* Sidebar Footer */
.sidebar-footer {
padding: var(--space-md);
border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.sidebar-footer .nav-item {
margin-top: 2px;
}
.user-info-mini {
display: flex;
align-items: center;
gap: var(--space-md);
padding: var(--space-sm);
margin-bottom: 4px;
}
.user-avatar-sm {
width: 32px;
height: 32px;
border-radius: var(--radius-full);
background: linear-gradient(135deg, #5B5FED, #4A4ECC);
color: white;
display: flex;
align-items: center;
justify-content: center;
font-size: var(--text-sm);
font-weight: 600;
flex-shrink: 0;
}
.user-details {
display: flex;
flex-direction: column;
overflow: hidden;
}
.user-name {
font-size: var(--text-sm);
font-weight: 600;
color: #1A1F36;
line-height: 1.3;
}
.user-plan {
font-size: var(--text-xs);
color: #5B5FED;
line-height: 1.3;
}
.logout-btn:hover {
color: #EF4444 !important;
background: rgba(239, 68, 68, 0.1) !important;
}
/* Main Content */
.front-main {
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
min-width: 0;
background: #F5F7FC;
}
/* Forward-slash route for apps - hidden default route */
.front-main > * {
height: 100%;
}
/* Responsive */
@media (max-width: 768px) {
.front-sidebar {
position: fixed;
left: 0;
top: 0;
bottom: 0;
z-index: var(--z-overlay);
transform: translateX(-100%);
}
.front-sidebar.collapsed {
transform: translateX(-100%);
}
.front-sidebar.mobile-open {
transform: translateX(0);
}
}
/* Home & Admin links */
.nav-home-link {
margin-bottom: 4px;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
padding-bottom: 8px;
}