Files
Novault-Frontend-web/src/components/budget/BudgetCard/BudgetCard.css

279 lines
5.6 KiB
CSS
Raw Normal View History

2026-01-25 20:12:33 +08:00
/**
* BudgetCard Component - Skeuomorphic Bill/Receipt Style
2026-01-25 20:12:33 +08:00
*/
.budget-card {
display: flex;
flex-direction: column;
gap: 1.25rem;
2026-01-25 20:12:33 +08:00
padding: 1.5rem;
background: #FFF9F0;
/* Creamy receipt background */
border-radius: 20px;
/* Smooth rounded corners */
box-shadow:
0 4px 24px rgba(74, 55, 40, 0.08),
0 1px 2px rgba(74, 55, 40, 0.04);
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
2026-01-25 20:12:33 +08:00
position: relative;
overflow: hidden;
border: 1px solid rgba(74, 55, 40, 0.03);
color: #4A3728;
/* Warm brown text */
2026-01-25 20:12:33 +08:00
}
/* Subtle paper texture */
.budget-card::before {
2026-01-25 20:12:33 +08:00
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
pointer-events: none;
opacity: 0.5;
}
/* Hover effect - Lift */
2026-01-25 20:12:33 +08:00
.budget-card--clickable:hover {
transform: translateY(-4px);
box-shadow:
0 12px 32px rgba(74, 55, 40, 0.12),
0 2px 4px rgba(74, 55, 40, 0.06);
2026-01-25 20:12:33 +08:00
}
/* Header */
.budget-card__header {
display: flex;
justify-content: space-between;
align-items: flex-start;
min-height: 48px;
position: relative;
z-index: 1;
2026-01-25 20:12:33 +08:00
}
.budget-card__title-section {
display: flex;
flex-direction: column;
gap: 6px;
2026-01-25 20:12:33 +08:00
flex: 1;
}
.budget-card__name {
margin: 0;
font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-size: 1.35rem;
2026-01-25 20:12:33 +08:00
font-weight: 700;
color: #2D241E;
/* Darker brown for title */
letter-spacing: -0.02em;
2026-01-25 20:12:33 +08:00
}
.budget-card__meta {
display: flex;
align-items: center;
gap: 8px;
2026-01-25 20:12:33 +08:00
flex-wrap: wrap;
}
.budget-card__period {
font-size: 0.75rem;
font-weight: 600;
color: #8C7B6D;
/* Muted brown */
text-transform: uppercase;
letter-spacing: 0.05em;
2026-01-25 20:12:33 +08:00
}
/* Amount Section */
2026-01-25 20:12:33 +08:00
.budget-card__amount-section {
text-align: right;
2026-01-25 20:12:33 +08:00
display: flex;
flex-direction: column;
align-items: flex-end;
}
.budget-card__amount {
font-family: 'Outfit', monospace;
/* Monospace vibe for numbers */
font-size: 1.75rem;
2026-01-25 20:12:33 +08:00
font-weight: 800;
color: #2D241E;
letter-spacing: -0.03em;
font-variant-numeric: tabular-nums;
2026-01-25 20:12:33 +08:00
}
/* Status Badges - Soft/Pastel look */
2026-01-25 20:12:33 +08:00
.budget-card__status {
margin-top: 6px;
font-size: 0.75rem;
2026-01-25 20:12:33 +08:00
font-weight: 700;
padding: 4px 10px;
border-radius: 8px;
/* Slightly squarer than pill */
letter-spacing: 0.02em;
2026-01-25 20:12:33 +08:00
}
.budget-card__status--normal {
background: #E6F4EA;
/* Soft Green */
color: #1E8E3E;
2026-01-25 20:12:33 +08:00
}
.budget-card__status--warning {
background: #FEF7E0;
/* Soft Amber */
color: #F9AB00;
2026-01-25 20:12:33 +08:00
}
.budget-card__status--over {
background: #FCE8E6;
/* Soft Red */
color: #D93025;
2026-01-25 20:12:33 +08:00
}
/* Progress Bar Container Override */
.budget-card__progress-section {
position: relative;
z-index: 1;
padding: 8px 0;
}
/* Footer Stats - Separated by dashed line */
2026-01-25 20:12:33 +08:00
.budget-card__footer {
display: flex;
justify-content: space-between;
align-items: flex-end;
/* Align bottom to match numbers */
margin-top: 0.25rem;
padding-top: 1.25rem;
border-top: 2px dashed #E6DCCD;
/* Dashed separator */
position: relative;
z-index: 1;
2026-01-25 20:12:33 +08:00
}
.budget-card__stats {
display: flex;
width: 100%;
justify-content: space-between;
2026-01-25 20:12:33 +08:00
}
.budget-card__stat {
display: flex;
flex-direction: column;
gap: 4px;
2026-01-25 20:12:33 +08:00
}
.budget-card__stat-label {
font-size: 0.75rem;
color: #8C7B6D;
2026-01-25 20:12:33 +08:00
font-weight: 600;
}
.budget-card__stat-value {
font-family: 'Outfit', monospace;
font-weight: 700;
font-size: 1.25rem;
color: #4A3728;
2026-01-25 20:12:33 +08:00
}
.budget-card__stat-value--negative {
color: #D93025;
2026-01-25 20:12:33 +08:00
}
/* Actions */
.budget-card__actions {
display: flex;
gap: 0.5rem;
position: absolute;
right: 1.5rem;
bottom: 5.5rem;
/* Position above footer */
opacity: 0;
transform: translateY(10px);
transition: all 0.2s ease;
z-index: 2;
2026-01-25 20:12:33 +08:00
}
.budget-card:hover .budget-card__actions {
opacity: 1;
transform: translateY(0);
2026-01-25 20:12:33 +08:00
}
.budget-card__action-btn {
width: 36px;
height: 36px;
2026-01-25 20:12:33 +08:00
display: flex;
align-items: center;
justify-content: center;
border-radius: 10px;
border: none;
background: #FFF;
color: #8C7B6D;
box-shadow: 0 2px 8px rgba(74, 55, 40, 0.1);
cursor: pointer;
transition: all 0.2s ease;
2026-01-25 20:12:33 +08:00
}
.budget-card__action-btn:hover {
background: #4A3728;
color: #FFF;
transform: scale(1.05);
2026-01-25 20:12:33 +08:00
}
.budget-card__action-btn--delete:hover {
background: #D93025;
color: #FFF;
}
/* Dark Mode Adaptation - "Dark Receipt" */
[data-theme="dark"] .budget-card {
background: #1F1B18;
border-color: #38302A;
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .budget-card__name,
[data-theme="dark"] .budget-card__amount,
[data-theme="dark"] .budget-card__stat-value {
color: #E6DCCD;
}
[data-theme="dark"] .budget-card__footer {
border-top-color: #38302A;
}
[data-theme="dark"] .budget-card__period,
[data-theme="dark"] .budget-card__stat-label {
color: #8C7B6D;
}
[data-theme="dark"] .budget-card__status--normal {
background: rgba(30, 142, 62, 0.2);
color: #81C995;
}
[data-theme="dark"] .budget-card__status--warning {
background: rgba(249, 171, 0, 0.2);
color: #FDD663;
}
[data-theme="dark"] .budget-card__status--over {
background: rgba(217, 48, 37, 0.2);
color: #F28B82;
2026-01-25 20:12:33 +08:00
}
/* Mobile */
@media (max-width: 600px) {
.budget-card__actions {
opacity: 1;
transform: none;
position: relative;
right: auto;
bottom: auto;
margin-top: 1rem;
justify-content: flex-end;
2026-01-25 20:12:33 +08:00
}
}