Refactor CSS styles across multiple components for improved consistency and maintainability

- Removed redundant styles and consolidated common styles in styles.scss
- Updated layout and spacing variables for better responsiveness
- Simplified component-specific styles in apartment, lease, tenant, and dashboard components
- Enhanced readability and organization of CSS by utilizing CSS layers
- Ensured consistent use of design tokens for colors, spacing, and borders
This commit is contained in:
nessar committed 2026-08-17 14:18:15 +02:00
1 parent 713ab3b2d9
commit 561c6619a1
12 files changed
+523 -795

No files matched your search

@@ -1,204 +1,123 @@
:host {
display: block;
}
.page-heading {
margin-bottom: 30px;
}
.content-region>mat-progress-bar {
margin-bottom: 16px;
}
.refresh-error {
margin-bottom: 16px;
}
.page-heading h1 {
margin-bottom: 8px;
font-size: clamp(2rem, 7vw, 3.2rem);
font-weight: 750;
letter-spacing: -0.055em;
line-height: 1.02;
}
.page-heading>div>p:last-child {
margin-bottom: 0;
color: var(--text-muted);
line-height: 1.6;
}
.page-heading .primary-action {
width: 100%;
margin-top: 20px;
}
.empty-state,
.apartment-card {
border: 1px solid var(--border);
border-radius: 22px;
background: var(--surface);
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}
.empty-state {
padding: 46px 22px;
text-align: center;
display: block;
}
.empty-illustration {
display: grid;
width: 68px;
height: 68px;
place-items: center;
margin: 0 auto 22px;
border-radius: 16px;
background: var(--surface-accent);
color: var(--accent);
display: grid;
width: 68px;
height: 68px;
place-items: center;
margin: 0 auto 22px;
border-radius: 16px;
background: var(--surface-accent);
color: var(--accent);
}
.empty-illustration fa-icon {
display: flex;
width: 34px;
height: 34px;
display: flex;
width: 34px;
height: 34px;
}
.empty-illustration fa-icon svg {
width: 100%;
height: 100%;
width: 100%;
height: 100%;
}
.empty-state h2 {
margin-bottom: 8px;
font-size: 1.45rem;
}
.empty-state>p:not(.eyebrow) {
max-width: 440px;
margin: 0 auto 22px;
color: var(--text-muted);
line-height: 1.6;
}
.empty-state .mat-mdc-outlined-button {
--mdc-outlined-button-label-text-color: var(--accent);
--mdc-outlined-button-outline-color: var(--border-strong);
border-radius: 12px;
.empty-state > p:not(.eyebrow) {
max-width: 440px;
margin: 0 auto 22px;
line-height: 1.6;
}
.apartments-grid {
display: grid;
grid-template-columns: 1fr;
gap: 16px;
}
.apartment-card {
padding: 20px;
display: grid;
grid-template-columns: 1fr;
gap: 16px;
}
.apartment-card-topline {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 14px;
margin-bottom: 22px;
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 14px;
margin-bottom: 22px;
}
.property-label {
margin: 0;
margin: 0;
}
.property-value {
font-size: 1rem;
font-weight: 800;
font-size: 1rem;
font-weight: 800;
}
.apt-info h2 {
margin-bottom: 9px;
font-size: 1.35rem;
letter-spacing: -0.035em;
margin-bottom: 9px;
font-size: 1.35rem;
letter-spacing: -0.035em;
}
.apt-address {
display: flex;
align-items: flex-start;
gap: 8px;
margin-bottom: 12px;
color: var(--text-muted);
font-size: 0.88rem;
line-height: 1.5;
display: flex;
align-items: flex-start;
gap: 8px;
margin-bottom: 12px;
color: var(--text-muted);
font-size: 0.88rem;
line-height: 1.5;
}
.apt-address fa-icon {
display: flex;
width: 17px;
height: 17px;
flex: 0 0 17px;
margin-top: 2px;
display: flex;
width: 17px;
height: 17px;
flex: 0 0 17px;
margin-top: 2px;
}
.apt-address fa-icon svg {
width: 100%;
height: 100%;
width: 100%;
height: 100%;
}
.apt-desc {
margin-bottom: 0;
color: var(--text-muted);
font-size: 0.88rem;
line-height: 1.55;
margin-bottom: 0;
color: var(--text-muted);
font-size: 0.88rem;
line-height: 1.55;
}
.apt-actions {
display: flex;
gap: 4px;
justify-content: flex-end;
margin-top: 20px;
padding-top: 12px;
border-top: 1px solid var(--border);
display: flex;
gap: 4px;
justify-content: flex-end;
margin-top: 20px;
padding-top: 12px;
border-top: 1px solid var(--border);
}
.apt-actions .mat-mdc-button {
--mdc-text-button-label-text-color: var(--accent);
--mdc-text-button-label-text-color: var(--accent);
}
.apt-actions .danger-action.mat-mdc-button {
--mdc-text-button-label-text-color: var(--danger);
}
.apt-actions mat-spinner {
display: inline-block;
margin-right: 6px;
vertical-align: middle;
--mdc-text-button-label-text-color: var(--danger);
}
.card-error {
margin: 14px 0 0;
color: var(--danger);
font-size: 0.84rem;
margin: 14px 0 0;
}
@media (min-width: 700px) {
.page-heading {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 28px;
}
.page-heading .primary-action {
width: auto;
flex: 0 0 auto;
margin-top: 0;
}
.apartments-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.apartments-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (min-width: 1180px) {
.apartments-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
.apartments-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}