doli-front/src/styles/sidebar.css

202 lines
3.4 KiB
CSS
Raw Normal View History

2026-02-06 22:00:04 +00:00
/* ===================== SIDEBAR STYLES ===================== */
.app-layout {
display: flex;
min-height: 100vh;
width: 100%;
}
.sidebar {
2026-02-11 15:17:32 +00:00
width: 240px;
2026-02-06 22:00:04 +00:00
background-color: var(--sidebar-bg);
display: flex;
flex-direction: column;
2026-02-11 15:17:32 +00:00
transition: width 0.2s ease;
2026-02-06 22:00:04 +00:00
position: relative;
z-index: 100;
2026-02-11 15:17:32 +00:00
border-right: 1px solid rgba(255, 255, 255, 0.06);
2026-02-06 22:00:04 +00:00
}
.sidebar-header {
2026-02-11 15:17:32 +00:00
padding: 1.25rem 0.875rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
2026-02-06 22:00:04 +00:00
display: flex;
justify-content: space-between;
align-items: center;
gap: 0.5rem;
2026-02-11 15:17:32 +00:00
min-height: 60px;
2026-02-06 22:00:04 +00:00
box-sizing: border-box;
}
.sidebar-logo-link {
display: flex;
align-items: center;
gap: 0.6rem;
text-decoration: none;
color: #fff;
2026-02-11 15:17:32 +00:00
transition: opacity 0.15s;
2026-02-06 22:00:04 +00:00
overflow: hidden;
flex: 1;
min-width: 0;
}
.sidebar-logo-link:hover {
opacity: 0.85;
}
.sidebar-logo-icon {
color: var(--sidebar-active);
flex-shrink: 0;
}
.sidebar-header h2 {
margin: 0;
2026-02-11 15:17:32 +00:00
font-size: 1.125rem;
2026-02-06 22:00:04 +00:00
color: #ffffff;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
2026-02-11 15:17:32 +00:00
font-weight: 600;
letter-spacing: -0.015em;
2026-02-06 22:00:04 +00:00
}
.sidebar-toggle {
background: transparent;
border: none;
cursor: pointer;
2026-02-11 15:17:32 +00:00
padding: 0.4rem;
2026-02-06 22:00:04 +00:00
color: var(--sidebar-text);
2026-02-11 15:17:32 +00:00
font-size: 1.125rem;
border-radius: var(--radius-sm);
transition: background-color 0.15s, color 0.15s;
2026-02-06 22:00:04 +00:00
flex-shrink: 0;
2026-02-11 15:17:32 +00:00
width: 32px;
height: 32px;
2026-02-06 22:00:04 +00:00
display: flex;
align-items: center;
justify-content: center;
}
.sidebar-toggle:hover {
2026-02-11 15:17:32 +00:00
background-color: rgba(255, 255, 255, 0.06);
2026-02-06 22:00:04 +00:00
border-color: transparent;
color: #fff;
}
.sidebar-nav {
flex: 1;
overflow-y: auto;
2026-02-11 15:17:32 +00:00
padding: 0.75rem 0;
2026-02-06 22:00:04 +00:00
}
.sidebar-menu {
list-style: none;
margin: 0;
padding: 0;
}
.sidebar-menu li {
2026-02-11 15:17:32 +00:00
margin: 1px 0;
2026-02-06 22:00:04 +00:00
}
.sidebar-link {
display: flex;
align-items: center;
2026-02-11 15:17:32 +00:00
padding: 0.6rem 1rem;
margin: 0 0.5rem;
2026-02-06 22:00:04 +00:00
color: var(--sidebar-text);
text-decoration: none;
2026-02-11 15:17:32 +00:00
transition: background-color 0.15s, color 0.15s;
2026-02-06 22:00:04 +00:00
cursor: pointer;
2026-02-11 15:17:32 +00:00
border-radius: var(--radius-sm);
font-size: 0.875rem;
2026-02-06 22:00:04 +00:00
}
.sidebar-link:hover {
2026-02-11 15:17:32 +00:00
background-color: rgba(255, 255, 255, 0.06);
2026-02-06 22:00:04 +00:00
color: #e2e8f0;
}
.sidebar-link.active {
2026-02-11 15:17:32 +00:00
background-color: rgba(37, 99, 235, 0.12);
2026-02-06 22:00:04 +00:00
color: var(--sidebar-active);
}
.sidebar-icon {
2026-02-11 15:17:32 +00:00
font-size: 1.125rem;
margin-right: 0.625rem;
min-width: 1.25rem;
2026-02-06 22:00:04 +00:00
text-align: center;
}
.sidebar-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
2026-02-11 15:17:32 +00:00
/* Collapsed */
2026-02-06 22:00:04 +00:00
.sidebar.collapsed {
2026-02-11 15:17:32 +00:00
width: 64px;
2026-02-06 22:00:04 +00:00
}
.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .sidebar-text {
opacity: 0;
width: 0;
overflow: hidden;
}
.sidebar.collapsed .sidebar-logo-link {
flex: 0 0 auto;
gap: 0;
}
.sidebar.collapsed .sidebar-header {
padding: 1.25rem 0.5rem;
justify-content: center;
}
.sidebar.collapsed .sidebar-icon {
margin-right: 0;
}
2026-02-11 15:17:32 +00:00
.sidebar.collapsed .sidebar-link {
justify-content: center;
padding: 0.6rem;
margin: 1px 0.375rem;
}
/* Main content */
2026-02-06 22:00:04 +00:00
.main-content {
flex: 1;
overflow-y: auto;
2026-02-11 15:17:32 +00:00
background-color: #f8fafc;
2026-02-06 22:00:04 +00:00
}
2026-02-11 15:17:32 +00:00
.main-content > div {
2026-02-06 22:00:04 +00:00
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
}
2026-02-11 15:17:32 +00:00
/* Responsive */
2026-02-06 22:00:04 +00:00
@media (max-width: 768px) {
.sidebar {
position: fixed;
left: 0;
top: 0;
bottom: 0;
z-index: 1000;
transform: translateX(0);
}
.sidebar.collapsed {
transform: translateX(-100%);
2026-02-11 15:17:32 +00:00
width: 240px;
2026-02-06 22:00:04 +00:00
}
.main-content {
margin-left: 0;
}
}