studyrag / frontend /src /components /sidebar.css
beerohan
Rebuild frontend in React, add doc/session management, fix broken deps
dd4a03a
Raw History Blame Contribute Delete
5.87 kB
.sidebar {
width: 280px;
background: var(--bg-sidebar);
color: white;
display: flex;
flex-direction: column;
position: fixed;
height: 100vh;
left: 0;
top: 0;
z-index: 100;
box-shadow: var(--shadow-lg);
}
.logo-section {
padding: 2rem 1.5rem;
display: flex;
align-items: center;
gap: 1rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
flex-shrink: 0;
}
.logo-icon {
flex-shrink: 0;
}
.logo-text {
font-size: 1.5rem;
font-weight: 700;
background: var(--gradient-primary);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.nav-menu {
padding: 1.5rem 1rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
flex-shrink: 0;
}
.nav-item {
display: flex;
align-items: center;
gap: 1rem;
padding: 1rem 1.25rem;
background: transparent;
border: none;
border-radius: 12px;
color: rgba(255, 255, 255, 0.7);
cursor: pointer;
transition: all 0.3s ease;
font-size: 0.95rem;
font-weight: 500;
width: 100%;
text-align: left;
}
.nav-item:hover {
background: rgba(255, 255, 255, 0.08);
color: white;
transform: translateX(4px);
}
.nav-item.active {
background: var(--gradient-primary);
color: white;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.nav-icon {
font-size: 1.5rem;
}
/* ===== DOCUMENT LIST ===== */
.doc-list-section {
flex: 1;
min-height: 0;
padding: 0.5rem 1.5rem;
display: flex;
flex-direction: column;
overflow: hidden;
}
.doc-list-header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: rgba(255, 255, 255, 0.5);
padding: 0.5rem 0;
flex-shrink: 0;
}
.doc-list-count {
background: rgba(255, 255, 255, 0.1);
border-radius: 10px;
padding: 0.1rem 0.5rem;
font-weight: 600;
}
.doc-list-empty {
color: rgba(255, 255, 255, 0.4);
font-size: 0.85rem;
padding: 0.5rem 0;
}
.doc-list {
list-style: none;
overflow-y: auto;
flex: 1;
display: flex;
flex-direction: column;
gap: 0.35rem;
padding-bottom: 0.5rem;
}
.doc-list-item {
display: flex;
align-items: center;
gap: 0.5rem;
background: rgba(255, 255, 255, 0.05);
border-radius: 8px;
padding: 0.5rem 0.5rem 0.5rem 0.75rem;
font-size: 0.8rem;
}
.doc-list-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: rgba(255, 255, 255, 0.85);
}
.doc-delete-btn {
flex-shrink: 0;
width: 22px;
height: 22px;
border-radius: 6px;
border: none;
background: rgba(245, 101, 101, 0.15);
color: #fc8181;
cursor: pointer;
font-size: 1rem;
line-height: 1;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
}
.doc-delete-btn:hover:not(:disabled) {
background: rgba(245, 101, 101, 0.35);
}
.doc-delete-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.sidebar-footer {
padding: 1.5rem 1rem;
border-top: 1px solid rgba(255, 255, 255, 0.1);
flex-shrink: 0;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.stats-card {
background: rgba(255, 255, 255, 0.05);
padding: 1rem;
border-radius: 12px;
}
.stat-item {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.75rem;
}
.stat-label {
font-size: 0.85rem;
color: rgba(255, 255, 255, 0.6);
}
.stat-value {
font-size: 1.5rem;
font-weight: 700;
color: var(--accent);
}
.stat-indicator {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.85rem;
color: rgba(255, 255, 255, 0.7);
}
.pulse-dot {
width: 8px;
height: 8px;
background: var(--success);
border-radius: 50%;
animation: pulse 2s infinite;
flex-shrink: 0;
}
.btn-theme-toggle {
width: 100%;
padding: 0.875rem 1rem;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 10px;
color: rgba(255, 255, 255, 0.85);
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
}
.btn-theme-toggle:hover {
background: rgba(255, 255, 255, 0.12);
}
.btn-reset {
width: 100%;
padding: 0.875rem 1rem;
background: rgba(245, 101, 101, 0.1);
border: 1px solid rgba(245, 101, 101, 0.3);
border-radius: 10px;
color: #fc8181;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
}
.btn-reset:hover:not(:disabled) {
background: rgba(245, 101, 101, 0.2);
border-color: rgba(245, 101, 101, 0.5);
}
.btn-reset:disabled {
opacity: 0.6;
cursor: not-allowed;
}
/* ===== MAIN CONTENT (shared shell) ===== */
.main-content {
margin-left: 280px;
flex: 1;
min-height: 100vh;
display: flex;
flex-direction: column;
}
.topbar {
background: var(--bg-card);
padding: 1.5rem 2.5rem;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: var(--shadow-sm);
position: sticky;
top: 0;
z-index: 50;
}
.breadcrumb-item {
font-size: 1.25rem;
font-weight: 600;
color: var(--text-primary);
}
.status-badge {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: var(--bg-main);
border-radius: 20px;
font-size: 0.875rem;
font-weight: 500;
color: var(--text-primary);
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
animation: pulse 2s infinite;
flex-shrink: 0;
}
/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
.sidebar {
width: 240px;
}
.main-content {
margin-left: 240px;
}
}
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
transition: transform 0.3s ease;
}
.main-content {
margin-left: 0;
}
.topbar {
padding: 1rem 1.5rem;
}
}