init
This commit is contained in:
306
src/components/budget/BudgetCard/BudgetCard.css
Normal file
306
src/components/budget/BudgetCard/BudgetCard.css
Normal file
@@ -0,0 +1,306 @@
|
||||
/**
|
||||
* BudgetCard Component - Premium Glassmorphism Style
|
||||
*/
|
||||
|
||||
.budget-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
padding: 1.5rem;
|
||||
background: var(--glass-panel-bg);
|
||||
backdrop-filter: blur(12px);
|
||||
border: 1px solid var(--glass-border);
|
||||
border-radius: var(--radius-xl);
|
||||
box-shadow: var(--shadow-sm);
|
||||
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.budget-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 4px;
|
||||
background: var(--color-primary);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.budget-card--clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.budget-card--clickable:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: var(--shadow-lg), 0 0 20px rgba(99, 102, 241, 0.1);
|
||||
border-color: rgba(99, 102, 241, 0.3);
|
||||
}
|
||||
|
||||
.budget-card--clickable:active {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.budget-card__header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.budget-card__title-section {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.budget-card__name {
|
||||
margin: 0 0 0.5rem 0;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
color: var(--color-text);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.budget-card__meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
font-size: 0.75rem;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.budget-card__meta-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.budget-card__meta-icon {
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.budget-card__period {
|
||||
font-weight: 600;
|
||||
background: rgba(99, 102, 241, 0.1);
|
||||
color: var(--color-primary);
|
||||
padding: 2px 8px;
|
||||
border-radius: var(--radius-full);
|
||||
}
|
||||
|
||||
.budget-card__separator {
|
||||
color: var(--glass-border);
|
||||
}
|
||||
|
||||
.budget-card__category,
|
||||
.budget-card__account {
|
||||
color: var(--color-text-secondary);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
|
||||
.budget-card__rolling-badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
padding: 2px 8px;
|
||||
background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
|
||||
color: white;
|
||||
border-radius: var(--radius-full);
|
||||
font-size: 0.625rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
|
||||
}
|
||||
|
||||
.budget-card__amount-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.budget-card__amount {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 800;
|
||||
color: var(--color-text);
|
||||
font-family: 'Outfit', sans-serif;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.budget-card__status {
|
||||
padding: 0.125rem 0.5rem;
|
||||
border-radius: var(--radius-full);
|
||||
font-size: 0.6875rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.budget-card__status--normal {
|
||||
background: rgba(16, 185, 129, 0.1);
|
||||
color: var(--color-success);
|
||||
}
|
||||
|
||||
.budget-card__status--warning {
|
||||
background: rgba(245, 158, 11, 0.1);
|
||||
color: var(--color-warning);
|
||||
}
|
||||
|
||||
.budget-card__status--over {
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
color: var(--color-error);
|
||||
}
|
||||
|
||||
/* Progress section */
|
||||
.budget-card__progress-section {
|
||||
width: 100%;
|
||||
padding: 0.25rem 0;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
.budget-card__footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid var(--glass-border);
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.budget-card__stats {
|
||||
display: flex;
|
||||
gap: 1.5rem;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.budget-card__stat {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.125rem;
|
||||
}
|
||||
|
||||
.budget-card__stat-label {
|
||||
font-size: 0.6875rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text-secondary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.budget-card__stat-value {
|
||||
font-size: 1.125rem;
|
||||
font-weight: 700;
|
||||
color: var(--color-text);
|
||||
font-family: 'Outfit', sans-serif;
|
||||
}
|
||||
|
||||
.budget-card__stat-value--negative {
|
||||
color: var(--color-error);
|
||||
}
|
||||
|
||||
/* Actions */
|
||||
.budget-card__actions {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
opacity: 0.8;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.budget-card:hover .budget-card__actions {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.budget-card__action-btn {
|
||||
background: var(--glass-bg);
|
||||
border: 1px solid var(--glass-border);
|
||||
padding: 0.5rem;
|
||||
cursor: pointer;
|
||||
border-radius: 50%;
|
||||
font-size: 1rem;
|
||||
transition: all 0.2s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--color-text-secondary);
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.budget-card__action-btn:hover {
|
||||
background: white;
|
||||
transform: scale(1.1);
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
|
||||
color: var(--color-primary);
|
||||
border-color: var(--color-primary-light);
|
||||
}
|
||||
|
||||
.budget-card__action-btn--delete:hover {
|
||||
color: var(--color-error);
|
||||
border-color: rgba(239, 68, 68, 0.3);
|
||||
background: rgba(254, 242, 242, 0.5);
|
||||
}
|
||||
|
||||
/* Mobile */
|
||||
@media (max-width: 768px) {
|
||||
.budget-card {
|
||||
padding: 1.25rem;
|
||||
}
|
||||
|
||||
.budget-card__header {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.budget-card__amount-section {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: 1px dashed var(--glass-border);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.budget-card__name {
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
|
||||
.budget-card__amount {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.budget-card {
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.budget-card__stats {
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.budget-card__stat-value {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.budget-card__footer {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.budget-card__actions {
|
||||
justify-content: flex-end;
|
||||
opacity: 1;
|
||||
border-top: 1px dashed var(--glass-border);
|
||||
padding-top: 0.75rem;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user