/* Shared sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 230px;
    height: 100vh;
    overflow-y: auto;
    background: #ffffff;
    border-left: 1px solid var(--border-color, #e5e7eb);
    padding: 12px;
    z-index: 1200;
    transition: transform 0.2s ease;
}
.with-sidebar { padding-right: 240px; }
.sidebar-title { font-weight: 700; color: var(--text-primary, #111827); }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sidebar-toggle {
    background: var(--info-bg, #f1f5f9);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
}
.sidebar-toggle:hover { filter: brightness(0.98); }
.sidebar-section { margin-bottom: 12px; }
.sidebar-section-title { font-size: 0.85rem; color: var(--text-secondary, #6b7280); margin-bottom: 6px; }
.sidebar a { display: block; padding: 6px 8px; text-decoration: none; color: var(--text-primary, #1f2937); border-radius: 8px; }
.sidebar a:hover { background: var(--info-bg, #f1f5f9); color: var(--text-primary, #0f172a); }
.sidebar a.active { background: var(--info-bg, #e0f2fe); color: var(--text-primary, #0f172a); font-weight: 700; }
.sidebar-fab {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1301;
    background: var(--text-primary, #1f2937);
    color: #fff;
    border: none;
    border-radius: 999px;
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
body.sidebar-collapsed .sidebar { transform: translateX(100%); }
body.sidebar-collapsed.with-sidebar { padding-right: 0; }
body.sidebar-collapsed .sidebar-fab { display: inline-flex; }

@media (max-width: 768px) {
    .sidebar {
        position: fixed !important;
        width: 260px !important;
        height: 100vh !important;
        border-left: 1px solid var(--border-color, #e5e7eb) !important;
        border-bottom: none !important;
        transform: translateX(100%) !important;
    }
    body:not(.sidebar-collapsed) .sidebar { transform: translateX(0) !important; }
    .with-sidebar { padding-right: 0; }
    .sidebar-fab { display: inline-flex; }
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1100;
}
body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 769px) {
    .sidebar-toggle { display: none; }
    .sidebar-fab { display: none !important; }
    .sidebar-overlay { display: none; }
}

/* Make buttons more prominent */
.sidebar-links a {
    background: linear-gradient(135deg, #eef2ff, #e0f2fe);
    border: 1px solid #dbeafe;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.12);
    font-weight: 600;
}
.sidebar-links a:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(2, 132, 199, 0.18);
}
.sidebar-links a.active {
    background: linear-gradient(135deg, #bae6fd, #c7d2fe);
    border-color: #93c5fd;
}
