Files
dashboards/apps/business/src/components/DailyActivityChart.module.css
T
Alireza HassaniandCursor e324ae5763 Refine category select tree gutters and tighten activity charts.
Restore RTL tree lines in category dropdowns, require product category on add, and improve chart bar density with Y-axis tooltips.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 23:52:33 +03:30

285 lines
4.4 KiB
CSS

.card {
background: var(--glass-bg);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid var(--glass-border);
border-radius: var(--radius);
box-shadow: var(--glass-shadow);
padding: 24px;
height: 100%;
box-sizing: border-box;
}
.header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
margin-bottom: 24px;
}
.title {
font-size: 16px;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 4px;
}
.subtitle {
font-size: 13px;
color: var(--text-secondary);
}
.legend {
display: flex;
flex-wrap: wrap;
gap: 12px;
font-size: 12px;
color: var(--text-secondary);
}
.legendItem {
display: inline-flex;
align-items: center;
gap: 6px;
}
.legendDot {
width: 10px;
height: 10px;
border-radius: 3px;
}
.tonePrimary {
background: var(--primary);
}
.toneAccent {
background: var(--chart-accent, #a855f7);
}
.status,
.error {
font-size: 14px;
text-align: center;
padding: 40px 12px;
}
.status {
color: var(--text-muted);
}
.error {
color: #dc2626;
}
.chartPanel {
display: flex;
flex-direction: row;
align-items: flex-end;
gap: 8px;
direction: ltr;
unicode-bidi: isolate;
}
.yAxis {
display: flex;
flex-direction: column;
justify-content: space-between;
flex-shrink: 0;
width: 40px;
padding-bottom: 28px;
box-sizing: border-box;
direction: ltr;
}
.yTick {
font-size: 10px;
color: var(--text-muted);
font-weight: 500;
font-family: var(--font-ui);
line-height: 1;
text-align: right;
}
.chartWrap {
position: relative;
flex: 1;
min-width: 0;
overflow: hidden;
}
.chartWrapScroll {
overflow-x: auto;
}
.chartGrid {
position: absolute;
inset-inline: 0;
bottom: 28px;
pointer-events: none;
z-index: 0;
}
.gridLine {
position: absolute;
left: 0;
right: 0;
border-top: 1px dashed color-mix(in srgb, var(--text-muted) 28%, transparent);
}
.chart {
position: relative;
z-index: 1;
display: flex;
flex-direction: row;
align-items: flex-end;
width: 100%;
padding-bottom: 4px;
direction: ltr;
unicode-bidi: isolate;
}
.chartDay {
gap: 1px;
}
.chartMonth {
gap: 6px;
overflow-x: auto;
}
.group {
flex: 1 1 0;
min-width: 0;
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
}
.chartDay .group {
gap: 4px;
}
.chartMonth .group {
flex: 1;
min-width: 36px;
}
.bars {
display: flex;
align-items: flex-end;
justify-content: center;
width: 100%;
height: 180px;
gap: 1px;
}
.barWrap {
position: relative;
display: flex;
flex: 1 1 0;
min-width: 0;
align-items: flex-end;
justify-content: center;
height: 100%;
}
.barWrap:hover .barTooltip,
.barWrap:focus-within .barTooltip {
opacity: 1;
visibility: visible;
}
.barTooltip {
position: absolute;
bottom: calc(100% + 6px);
left: 50%;
transform: translateX(-50%);
padding: 4px 8px;
font-size: 11px;
font-weight: 500;
font-family: var(--font-ui);
line-height: 1.35;
color: var(--text-primary);
white-space: nowrap;
pointer-events: none;
opacity: 0;
visibility: hidden;
transition: opacity 0.12s ease, visibility 0.12s;
background: rgba(255, 255, 255, 0.96);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid var(--glass-border);
border-radius: 6px;
box-shadow: 0 4px 12px rgba(31, 38, 135, 0.12);
z-index: 4;
}
.bar {
flex: 1 1 0;
width: 100%;
max-width: 8px;
min-width: 2px;
border-radius: 3px 3px 1px 1px;
transition: height 0.3s ease;
cursor: default;
}
.chartMonth .bar {
flex: none;
width: 10px;
max-width: none;
min-width: 10px;
border-radius: 4px 4px 2px 2px;
}
.barWrap:hover .bar,
.barWrap:focus-within .bar {
filter: brightness(1.06);
}
.barMonth {
width: 10px;
max-width: 10px;
}
.label {
font-size: 9px;
color: var(--text-muted);
font-weight: 500;
font-family: var(--font-ui);
line-height: 1;
text-align: center;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.chartMonth .label {
font-size: 10px;
}
.barPrimary {
background: linear-gradient(
180deg,
color-mix(in srgb, var(--primary) 55%, #ffffff) 0%,
var(--primary) 100%
);
}
.barAccent {
background: linear-gradient(
180deg,
color-mix(in srgb, var(--chart-accent, #a855f7) 55%, #ffffff) 0%,
var(--chart-accent, #a855f7) 100%
);
}
@media (max-width: 768px) {
.header {
flex-direction: column;
}
}