Files
cameleer-server/ui/src/components/layout/AppSidebar.module.css
2026-03-17 16:09:23 +01:00

288 lines
4.6 KiB
CSS

/* ─── Sidebar Container ─── */
.sidebar {
width: 240px;
flex-shrink: 0;
display: flex;
flex-direction: column;
background: var(--bg-surface);
border-right: 1px solid var(--border-subtle);
height: calc(100vh - 56px);
position: sticky;
top: 56px;
overflow: hidden;
transition: width 0.2s ease;
}
.sidebarCollapsed {
width: 48px;
}
/* ─── Search ─── */
.search {
padding: 12px;
border-bottom: 1px solid var(--border-subtle);
}
.sidebarCollapsed .search {
display: none;
}
.searchInput {
width: 100%;
padding: 6px 10px;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--bg-raised);
color: var(--text-primary);
font-size: 12px;
font-family: var(--font-body);
outline: none;
transition: border-color 0.15s;
}
.searchInput::placeholder {
color: var(--text-muted);
}
.searchInput:focus {
border-color: var(--amber);
}
/* ─── App List ─── */
.appList {
flex: 1;
overflow-y: auto;
padding: 8px 0;
}
/* ─── Section Divider ─── */
.divider {
height: 1px;
background: var(--border-subtle);
margin: 4px 12px;
}
.sidebarCollapsed .divider {
margin: 4px 8px;
}
/* ─── App Item ─── */
.appItem {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
padding: 8px 16px;
border: none;
background: none;
color: var(--text-secondary);
font-size: 13px;
font-family: var(--font-body);
cursor: pointer;
transition: all 0.1s;
text-align: left;
white-space: nowrap;
overflow: hidden;
}
.appItem:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.appItemActive {
background: var(--amber-glow);
color: var(--amber);
}
.sidebarCollapsed .appItem {
padding: 8px 0;
justify-content: center;
gap: 0;
}
/* ─── Health Dot ─── */
.healthDot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
.dotLive { background: var(--green); }
.dotStale { background: var(--amber); }
.dotDead { background: var(--text-muted); }
/* ─── App Info (hidden when collapsed) ─── */
.appInfo {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
}
.sidebarCollapsed .appInfo {
display: none;
}
.appName {
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
}
.appMeta {
font-size: 11px;
color: var(--text-muted);
}
/* ─── All Item icon ─── */
.allIcon {
width: 8px;
height: 8px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
font-weight: 700;
color: var(--text-muted);
line-height: 1;
}
.appItemActive .allIcon {
color: var(--amber);
}
/* ─── Bottom Section ─── */
.bottom {
border-top: 1px solid var(--border-subtle);
padding: 8px 0;
}
.bottomItem {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
padding: 8px 16px;
border: none;
background: none;
color: var(--text-muted);
font-size: 12px;
font-family: var(--font-body);
cursor: pointer;
transition: all 0.1s;
text-decoration: none;
white-space: nowrap;
}
.bottomItem:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.bottomItemActive {
color: var(--amber);
background: var(--amber-glow);
}
.sidebarCollapsed .bottomItem {
padding: 8px 0;
justify-content: center;
gap: 0;
}
.bottomLabel {
overflow: hidden;
text-overflow: ellipsis;
}
.sidebarCollapsed .bottomLabel {
display: none;
}
.bottomIcon {
font-size: 14px;
flex-shrink: 0;
width: 16px;
text-align: center;
}
/* ─── Admin Sub-Menu ─── */
.adminChevron {
margin-left: 6px;
font-size: 8px;
color: var(--text-muted);
}
.adminSubMenu {
display: flex;
flex-direction: column;
}
.adminSubItem {
display: block;
padding: 6px 16px 6px 42px;
font-size: 12px;
color: var(--text-muted);
text-decoration: none;
transition: all 0.1s;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.adminSubItem:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.adminSubItemActive {
color: var(--amber);
background: var(--amber-glow);
}
.sidebarCollapsed .adminSubMenu {
display: none;
}
/* ─── Responsive ─── */
@media (max-width: 1024px) {
.sidebar {
width: 48px;
}
.sidebar .search {
display: none;
}
.sidebar .appInfo {
display: none;
}
.sidebar .appItem {
padding: 8px 0;
justify-content: center;
gap: 0;
}
.sidebar .divider {
margin: 4px 8px;
}
.sidebar .bottomItem {
padding: 8px 0;
justify-content: center;
gap: 0;
}
.sidebar .bottomLabel {
display: none;
}
.sidebar .adminSubMenu {
display: none;
}
}