Convert hardcoded rgba colors across all dashboard CSS files to use --ok-bg, --warn-bg, --alert-bg tokens from tokens.css per §8e design system. Home page status banner and card tags now use proper semantic tokens. Add layout.css import to live.html for shared nav structure. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
313 lines
6.8 KiB
CSS
313 lines
6.8 KiB
CSS
/* Sleep Quality Monitoring UI */
|
|
|
|
/* ── Morning Summary Card ────────────────────────────────────────────────── */
|
|
|
|
.sleep-summary-card {
|
|
position: fixed;
|
|
top: 16px;
|
|
right: 16px;
|
|
z-index: 1000;
|
|
background: var(--bg-card, var(--bg-card));
|
|
border: 1px solid var(--border-color, var(--slate-5));
|
|
border-radius: 12px;
|
|
padding: 16px;
|
|
max-width: 380px;
|
|
width: 100%;
|
|
box-shadow: 0 8px 32px var(--shadow-lg);
|
|
animation: sleep-slide-in 0.3s ease-out;
|
|
color: var(--text-color, var(--slate-11));
|
|
}
|
|
|
|
@keyframes sleep-slide-in {
|
|
from { transform: translateY(-20px); opacity: 0; }
|
|
to { transform: translateY(0); opacity: 1; }
|
|
}
|
|
|
|
.sleep-summary-card.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.sleep-summary-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-bottom: 12px;
|
|
padding-bottom: 8px;
|
|
border-bottom: 1px solid var(--border-color, var(--slate-5));
|
|
}
|
|
|
|
.sleep-summary-icon {
|
|
color: var(--blue-10);
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.sleep-summary-title {
|
|
font-weight: 600;
|
|
font-size: var(--text-sm);
|
|
flex: 1;
|
|
}
|
|
|
|
.sleep-summary-dismiss {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-muted, var(--text-muted));
|
|
font-size: 18px;
|
|
cursor: pointer;
|
|
padding: 2px 6px;
|
|
line-height: 1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.sleep-summary-dismiss:hover {
|
|
background: var(--bg-hover, var(--slate-5));
|
|
color: var(--text-color, var(--slate-11));
|
|
}
|
|
|
|
.sleep-summary-body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.sleep-summary-body > div {
|
|
font-size: 13px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.sleep-summary-duration {
|
|
font-weight: 600;
|
|
font-size: 18px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.sleep-efficiency-dot {
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
margin-right: 4px;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.sleep-efficiency-dot.green { background: var(--ok); }
|
|
.sleep-efficiency-dot.amber { background: var(--warn); }
|
|
.sleep-efficiency-dot.red { background: var(--alert); }
|
|
|
|
.sleep-anomaly-warning {
|
|
color: var(--warn);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.sleep-summary-details-btn {
|
|
margin-top: 8px;
|
|
padding: 6px 12px;
|
|
background: var(--bg-hover);
|
|
border: 1px solid var(--border-color, var(--slate-6));
|
|
border-radius: var(--radius-control);
|
|
color: var(--text-color, var(--slate-11));
|
|
font-size: var(--text-xs);
|
|
cursor: pointer;
|
|
text-align: center;
|
|
}
|
|
|
|
.sleep-summary-details-btn:hover {
|
|
background: var(--bg-active);
|
|
}
|
|
|
|
.sleep-summary-details-btn.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.sleep-summary-anomaly.hidden {
|
|
display: none;
|
|
}
|
|
|
|
/* ── Sleep Panel ──────────────────────────────────────────────────────────── */
|
|
|
|
.sleep-panel {
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
width: 360px;
|
|
height: 100%;
|
|
background: var(--bg-panel, var(--bg-card));
|
|
border-left: 1px solid var(--border-color, var(--slate-5));
|
|
z-index: 900;
|
|
display: flex;
|
|
flex-direction: column;
|
|
box-shadow: -4px 0 24px var(--shadow);
|
|
overflow: hidden;
|
|
color: var(--text-color, var(--slate-11));
|
|
}
|
|
|
|
.sleep-panel.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.sleep-panel-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 16px;
|
|
border-bottom: 1px solid var(--border-color, var(--slate-5));
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.sleep-panel-header h3 {
|
|
margin: 0;
|
|
font-size: var(--text-base);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.sleep-panel-close {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-muted, var(--text-muted));
|
|
font-size: var(--text-lg);
|
|
cursor: pointer;
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.sleep-panel-close:hover {
|
|
background: var(--bg-hover, var(--slate-5));
|
|
color: var(--text-color, var(--slate-11));
|
|
}
|
|
|
|
.sleep-panel-content {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 16px;
|
|
}
|
|
|
|
.sleep-panel-section {
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.sleep-panel-section h4 {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
color: var(--text-muted, var(--text-muted));
|
|
margin: 0 0 12px 0;
|
|
}
|
|
|
|
/* ── Trends ───────────────────────────────────────────────────────────────── */
|
|
|
|
.sleep-trends-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.sleep-trend-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.sleep-trend-label {
|
|
font-size: var(--text-xs);
|
|
color: var(--text-muted, var(--text-muted));
|
|
min-width: 100px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.sleep-sparkline {
|
|
flex: 1;
|
|
height: 30px;
|
|
}
|
|
|
|
.sleep-sparkline-svg {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.sleep-trend-value {
|
|
font-size: var(--text-xs);
|
|
font-weight: 600;
|
|
min-width: 60px;
|
|
text-align: right;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.sleep-week-comparison {
|
|
font-size: var(--text-xs);
|
|
color: var(--text-muted, var(--text-muted));
|
|
margin-top: 8px;
|
|
padding: 8px;
|
|
background: var(--bg-card, var(--bg-card));
|
|
border-radius: var(--radius-control);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* ── Breathing Stats ──────────────────────────────────────────────────────── */
|
|
|
|
.sleep-breathing-stats {
|
|
display: flex;
|
|
gap: 16px;
|
|
}
|
|
|
|
.sleep-stat {
|
|
flex: 1;
|
|
background: var(--bg-card, var(--bg-card));
|
|
border-radius: 8px;
|
|
padding: 12px;
|
|
text-align: center;
|
|
}
|
|
|
|
.sleep-stat-label {
|
|
display: block;
|
|
font-size: 11px;
|
|
color: var(--text-muted, var(--text-muted));
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.sleep-stat-value {
|
|
display: block;
|
|
font-size: var(--text-lg);
|
|
font-weight: 700;
|
|
color: var(--blue-9);
|
|
}
|
|
|
|
/* ── History ──────────────────────────────────────────────────────────────── */
|
|
|
|
.sleep-history {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.sleep-history-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 8px 10px;
|
|
background: var(--bg-card, var(--bg-card));
|
|
border-radius: var(--radius-control);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.sleep-history-date {
|
|
min-width: 90px;
|
|
color: var(--text-muted, var(--text-muted));
|
|
}
|
|
|
|
.sleep-history-duration {
|
|
flex: 1;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.sleep-history-breathing {
|
|
color: var(--blue-9);
|
|
font-size: var(--text-xs);
|
|
}
|
|
|
|
.sleep-history-empty {
|
|
text-align: center;
|
|
color: var(--text-muted, var(--text-muted));
|
|
font-size: 13px;
|
|
padding: 24px 0;
|
|
}
|