refactor: split frontend styles into layered modules

Split the large frontend shared stylesheet into focused layered CSS partials while preserving the stable global entrypoint and existing specialized stylesheet modules.
This commit is contained in:
Daniel Volz
2026-03-26 05:36:50 +01:00
committed by GitHub
parent f670a6355f
commit a1c7e0e62c
11 changed files with 7043 additions and 7001 deletions
+458
View File
@@ -0,0 +1,458 @@
/* biome-ignore-all lint/style/noDescendingSpecificity: extracted brownfield layer preserves intentional selector ordering while the CSS split remains behavior-compatible */
/* =============================================================================
About And Report Layer
Owns about modal, report, and adjacent informational overlay presentation.
============================================================================= */
.about-modal {
max-width: 380px;
padding: 0;
overflow-y: auto;
text-align: center;
}
.about-header {
padding: 2rem 1.5rem 1.5rem;
background: var(--bg-tertiary);
border-bottom: 1px solid var(--border-primary);
}
.about-logo {
width: 64px;
height: 64px;
margin: 0 auto 1rem;
}
.about-logo img {
width: 64px;
height: 64px;
border-radius: 16px;
}
.about-header h2 {
font-size: 1.5rem;
font-weight: 700;
margin: 0 0 0.5rem;
color: var(--text-primary);
}
.about-tagline {
font-size: 0.875rem;
color: var(--text-secondary);
margin: 0;
line-height: 1.4;
}
.about-versions {
padding: 1.25rem 1.5rem;
border-bottom: 1px solid var(--border-primary);
}
.about-version-row {
display: flex;
justify-content: center;
align-items: center;
gap: 0.75rem;
padding: 0.5rem 0;
}
.about-version-label {
font-size: 0.875rem;
color: var(--text-secondary);
}
.about-version-value {
font-size: 0.875rem;
font-weight: 600;
color: var(--text-primary);
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
background: var(--bg-tertiary);
padding: 0.25rem 0.5rem;
border-radius: 4px;
}
a.about-version-link {
color: var(--accent-primary);
text-decoration: none;
transition: text-decoration 0.15s ease;
}
a.about-version-link:hover {
text-decoration: underline;
}
.about-update-section {
padding: 1.25rem 1.5rem;
border-bottom: 1px solid var(--border-primary);
}
.about-update-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.625rem 1.25rem;
font-size: 0.875rem;
font-weight: 500;
border: 1px solid var(--border-primary);
border-radius: 8px;
background: var(--bg-secondary);
color: var(--text-primary);
cursor: pointer;
transition: all 0.2s ease;
width: 100%;
}
.about-update-btn:hover:not(:disabled) {
background: var(--bg-tertiary);
border-color: var(--accent);
color: var(--accent);
}
.about-update-btn:disabled {
opacity: 0.7;
cursor: not-allowed;
}
.about-update-btn svg {
width: 16px;
height: 16px;
}
.spinner-small {
width: 16px;
height: 16px;
border: 2px solid var(--border-primary);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.about-update-result {
margin-top: 1rem;
padding: 0.75rem;
border-radius: 8px;
font-size: 0.875rem;
}
.about-update-result.up-to-date {
background: rgba(34, 197, 94, 0.1);
color: var(--success);
}
.about-update-result.update-available {
background: rgba(59, 130, 246, 0.1);
color: var(--accent);
}
.about-update-result.error {
background: rgba(239, 68, 68, 0.1);
color: var(--error);
}
.update-status-text {
display: block;
font-weight: 500;
}
.update-status-text strong {
font-weight: 700;
}
.update-download-link {
display: inline-block;
margin-left: 0.5rem;
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
font-weight: 600;
background: var(--accent);
color: white;
border-radius: 4px;
text-decoration: none;
transition: background 0.2s ease;
}
.update-download-link:hover {
background: var(--accent-hover);
}
.about-links {
padding: 1.25rem 1.5rem;
border-bottom: 1px solid var(--border-primary);
}
.about-link {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.625rem 1.25rem;
font-size: 0.875rem;
font-weight: 500;
border: 1px solid var(--border-primary);
border-radius: 8px;
background: var(--bg-secondary);
color: var(--text-primary);
text-decoration: none;
transition: all 0.2s ease;
}
.about-link:hover {
background: var(--bg-tertiary);
border-color: var(--text-secondary);
}
.about-link svg {
width: 18px;
height: 18px;
}
.about-footer {
padding: 1.25rem 1.5rem;
background: var(--bg-tertiary);
}
.about-copyright {
font-size: 0.75rem;
color: var(--text-secondary);
margin: 0 0 0.25rem;
}
.about-license {
font-size: 0.75rem;
color: var(--text-tertiary);
margin: 0;
}
/* Share dialog styles moved to styles/share-dialog.css */
.card-head-actions {
display: flex;
gap: 0.75rem;
align-items: center;
}
.dashboard-main-sections {
display: flex;
flex-direction: column;
}
.dashboard-schedules-section {
overflow: visible;
}
.dashboard-main-sections-swapped .dashboard-schedules-section {
order: 1;
}
.dashboard-main-sections-swapped .dashboard-overview-section {
order: 2;
}
.card-head-actions > button,
.edit-header > button.btn-nav {
min-height: 3rem;
padding: 0 1.15rem;
display: inline-flex;
align-items: center;
justify-content: center;
}
/* Shared schedule + mobile edit styles moved to styles/schedule-mobile-edit.css */
/* =============================================================================
Report Modal
============================================================================= */
.report-modal {
max-width: 520px;
padding: 1.5rem;
}
.report-modal-title {
font-size: 1.25rem;
margin: 0 0 0.25rem;
padding-right: 2rem;
}
.report-modal-desc {
color: var(--text-secondary);
font-size: 0.875rem;
margin: 0 0 1.25rem;
}
/* Person filter */
.report-person-filter {
margin-bottom: 1.25rem;
}
.report-person-filter .report-format-options {
min-height: 4.5rem;
align-content: flex-start;
}
.report-person-filter h4 {
font-size: 0.85rem;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--text-muted);
margin: 0 0 0.5rem;
}
.report-person-filter .report-format-option input[type="checkbox"] {
display: none;
}
/* Medication selection area */
.report-selection {
height: 280px;
overflow-y: auto;
border: 1px solid var(--border-primary);
border-radius: 10px;
padding: 0.75rem;
margin-bottom: 1.25rem;
background: color-mix(in srgb, var(--bg-secondary) 75%, var(--bg-tertiary));
}
.report-selection-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
}
.report-selection-count {
font-size: 0.8rem;
color: var(--text-secondary);
font-weight: 500;
}
.report-group {
margin-bottom: 0.5rem;
}
.report-group-title {
font-size: 0.78rem;
font-weight: 700;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.04em;
margin: 0.5rem 0 0.35rem;
}
.report-med-list {
display: flex;
flex-direction: column;
gap: 0.2rem;
}
.report-med-item {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.4rem 0.5rem;
border-radius: 8px;
cursor: pointer;
transition: background 0.15s ease;
}
.report-med-item:hover {
background: var(--accent-bg);
}
.report-med-item input[type="checkbox"] {
width: 16px;
height: 16px;
margin: 0;
padding: 0;
flex-shrink: 0;
accent-color: var(--accent);
cursor: pointer;
}
.report-med-name {
flex: 1;
min-width: 0;
font-size: 0.9rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.report-med-name.obsolete-name {
color: var(--text-secondary);
font-style: italic;
}
.report-med-generic {
color: var(--text-secondary);
font-size: 0.8rem;
}
/* Format selection */
.report-format {
margin-bottom: 1.25rem;
}
.report-format h4 {
font-size: 0.85rem;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--text-muted);
margin: 0 0 0.5rem;
}
.report-format-options {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
.report-format-option {
display: flex;
align-items: center;
gap: 0.35rem;
padding: 0.45rem 0.85rem;
border: 1px solid var(--border-secondary);
border-radius: 8px;
cursor: pointer;
font-size: 0.85rem;
font-weight: 500;
color: var(--text-secondary);
background: transparent;
transition:
border-color 0.15s ease,
background 0.15s ease,
color 0.15s ease;
}
.report-format-option:hover {
border-color: var(--accent);
color: var(--text-primary);
background: var(--accent-bg);
}
.report-format-option.selected {
border-color: var(--accent);
background: var(--accent-bg);
color: var(--accent-light);
font-weight: 600;
}
.report-format-option input[type="radio"] {
display: none;
}
/* Actions */
.report-actions {
display: flex;
justify-content: flex-end;
gap: 0.75rem;
padding-top: 0.75rem;
border-top: 1px solid var(--border-primary);
}