Files
X-Financial/web/src/assets/styles/views/budget-center-view.css

716 lines
12 KiB
CSS
Raw Normal View History

.budget-center-page {
min-width: 0;
display: grid;
gap: 14px;
color: #1f2937;
}
.budget-summary-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 12px;
}
.budget-summary-card {
--accent: #10b981;
position: relative;
min-height: 112px;
padding: 12px 14px 10px;
display: flex;
flex-direction: column;
border: 1px solid #dbe4ee;
border-left: 3px solid var(--accent);
border-radius: 8px;
background: #fff;
box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
animation: dashboardItemIn 520ms var(--ease) both;
animation-delay: var(--delay, 0ms);
transition: box-shadow 200ms ease, transform 200ms ease;
}
.budget-summary-card:hover {
box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
transform: translateY(-1px);
}
.budget-summary-card.green {
--accent: #10b981;
}
.budget-summary-card.blue {
--accent: #3b82f6;
}
.budget-summary-card.orange {
--accent: #f59e0b;
}
.budget-summary-head {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
min-width: 0;
}
.summary-icon {
width: 26px;
height: 26px;
border-radius: 7px;
display: grid;
place-items: center;
background: color-mix(in srgb, var(--accent) 10%, white);
color: var(--accent);
font-size: 14px;
flex: 0 0 auto;
animation: iconPop 560ms var(--ease) both;
animation-delay: calc(var(--delay, 0ms) + 100ms);
}
.budget-summary-card .summary-label {
display: block;
min-width: 0;
color: #64748b;
font-size: 11px;
font-weight: 500;
line-height: 1.2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.summary-value {
display: block;
min-height: 22px;
margin-bottom: 6px;
color: #0f172a;
font-size: clamp(16px, 1.2vw, 20px);
line-height: 1;
font-weight: 800;
font-variant-numeric: tabular-nums;
white-space: nowrap;
letter-spacing: 0;
}
.summary-comparison-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
padding-top: 6px;
border-top: 1px solid #f1f5f9;
min-width: 0;
flex-wrap: wrap;
}
.comparison-pill {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 2px;
padding: 1px 6px;
border-radius: 4px;
font-size: 11px;
line-height: 1.45;
font-weight: 700;
white-space: nowrap;
}
.comparison-pill b {
color: inherit;
font-size: 11px;
font-weight: 600;
}
.comparison-pill em {
font-style: normal;
font-variant-numeric: tabular-nums;
}
.comparison-pill i {
font-size: 11px;
}
.comparison-pill.up {
background: rgba(22, 163, 74, .08);
color: #16a34a;
}
.comparison-pill.down {
background: rgba(239, 68, 68, .08);
color: #dc2626;
}
.budget-filter-bar {
border: 1px solid #e2e8f0;
border-radius: 8px;
background: #fff;
padding: 14px 16px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.budget-filter-set,
.budget-action-set {
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
min-width: 0;
}
.budget-filter-bar label {
display: inline-flex;
align-items: center;
gap: 8px;
color: #64748b;
font-size: 13px;
font-weight: 750;
white-space: nowrap;
}
.budget-filter-bar select {
min-height: 38px;
min-width: 128px;
border: 1px solid #d7e0ea;
border-radius: 8px;
background: #fff;
color: #334155;
padding: 0 34px 0 14px;
font-size: 14px;
font-weight: 750;
transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}
.budget-filter-bar select:hover {
border-color: rgba(16, 185, 129, .32);
color: #0f9f78;
}
.budget-filter-bar select:focus {
border-color: #10b981;
box-shadow: 0 0 0 3px rgba(16, 185, 129, .14);
outline: none;
}
.budget-primary-btn {
min-height: 40px;
border: 0;
border-radius: 10px;
background: linear-gradient(135deg, #10b981, #059669);
color: #fff;
padding: 0 18px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
font-size: 14px;
font-weight: 800;
white-space: nowrap;
cursor: pointer;
box-shadow: 0 10px 24px rgba(5, 150, 105, .2);
transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.budget-primary-btn:hover {
transform: translateY(-1px);
box-shadow: 0 14px 28px rgba(5, 150, 105, .24);
filter: saturate(1.02);
}
.budget-ghost-btn {
min-height: 38px;
border: 1px solid #d7e0ea;
border-radius: 8px;
background: #fff;
color: #334155;
padding: 0 14px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 9px;
font-size: 14px;
font-weight: 750;
white-space: nowrap;
cursor: pointer;
transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.budget-ghost-btn:hover {
border-color: rgba(16, 185, 129, .32);
color: #0f9f78;
box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}
.budget-work-grid {
display: grid;
grid-template-columns: 240px minmax(0, 1fr);
gap: 10px;
}
.budget-work-grid.single-department {
grid-template-columns: minmax(0, 1fr);
}
.budget-department-panel,
.budget-table-panel,
.budget-chart-panel,
.budget-alert-panel {
border: 1px solid #e5eaf1;
border-radius: 8px;
background: #fff;
overflow: hidden;
}
.budget-department-panel header,
.budget-table-panel > header,
.budget-card-head {
min-height: 48px;
padding: 13px 18px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #edf1f6;
}
.budget-department-panel strong,
.budget-table-panel > header strong,
.budget-card-head strong {
color: #111827;
font-size: 16px;
font-weight: 800;
}
.department-search {
position: relative;
margin: 12px 14px 8px;
}
.department-search i {
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
color: #9aa5b5;
}
.department-search input {
width: 100%;
height: 36px;
border: 1px solid #e2e8f0;
border-radius: 5px;
padding: 0 12px 0 34px;
background: #fff;
color: #1f2937;
}
.department-list {
display: grid;
gap: 4px;
padding: 8px 12px 16px;
}
.department-list button {
height: 38px;
border: 0;
border-radius: 5px;
background: transparent;
color: #4b5563;
padding: 0 12px;
display: flex;
align-items: center;
gap: 10px;
font-size: 14px;
font-weight: 700;
text-align: left;
}
.department-list button.active {
background: #e9f7f1;
color: #07965f;
}
.budget-table-wrap {
overflow-x: auto;
}
.budget-table-panel table {
width: 100%;
min-width: 1040px;
border-collapse: collapse;
}
.budget-table-panel th,
.budget-table-panel td {
padding: 13px 18px;
border-bottom: 1px solid #edf1f6;
border-right: 1px solid #edf1f6;
color: #273142;
font-size: 14px;
text-align: center;
white-space: nowrap;
}
.budget-table-panel th:last-child,
.budget-table-panel td:last-child {
border-right: 0;
}
.budget-table-panel th {
background: #fafbfd;
color: #1f2937;
font-weight: 800;
}
.budget-rate {
width: 96px;
display: grid;
gap: 6px;
margin: 0 auto;
}
.budget-rate span {
color: #273142;
font-size: 13px;
}
.budget-rate div {
height: 6px;
border-radius: 999px;
background: #e9edf3;
overflow: hidden;
}
.budget-rate em {
display: block;
height: 100%;
border-radius: inherit;
}
.budget-rate em.ok {
background: #13a66b;
}
.budget-rate em.warn {
background: #f2a51a;
}
.budget-rate em.danger {
background: #ef4444;
}
.budget-warning-red {
color: #e24b4b !important;
font-weight: 800;
}
.budget-warning-yellow {
color: #e3a008 !important;
font-weight: 800;
}
.budget-row-actions {
display: flex;
align-items: center;
justify-content: center;
gap: 14px;
}
.budget-row-actions button {
border: 0;
background: transparent;
color: #1c7ed6;
font-size: 14px;
font-weight: 800;
}
.budget-table-foot {
min-height: 52px;
padding: 10px 18px;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 10px;
}
.budget-page-summary {
color: #64748b;
font-size: 14px;
font-weight: 650;
}
.budget-pager {
display: inline-flex;
justify-content: center;
gap: 6px;
padding: 4px;
border: 1px solid #e2e8f0;
border-radius: 12px;
background: #f8fafc;
}
.budget-pager button {
width: 32px;
height: 32px;
border: 0;
border-radius: 9px;
background: transparent;
color: #334155;
font-size: 14px;
font-weight: 800;
transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.budget-pager button:hover:not(.active):not(:disabled) {
background: #fff;
color: #059669;
box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}
.budget-pager button.active {
background: #059669;
color: #fff;
box-shadow: 0 8px 16px rgba(5, 150, 105, .20);
}
.budget-pager button:disabled {
color: #94a3b8;
cursor: not-allowed;
}
.budget-page-size {
min-height: 38px;
min-width: 112px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 9px;
padding: 0 14px;
border: 1px solid #d7e0ea;
border-radius: 10px;
background: #fff;
color: #334155;
font-size: 14px;
font-weight: 750;
white-space: nowrap;
box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
cursor: pointer;
transition: border-color 160ms ease, color 160ms ease;
}
.budget-page-size:hover {
border-color: rgba(16, 185, 129, .32);
color: #0f9f78;
}
.budget-page-size select {
appearance: none;
border: 0;
background: transparent;
color: inherit;
font: inherit;
outline: none;
cursor: pointer;
}
.budget-bottom-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
gap: 10px;
}
.budget-card-head button {
border: 0;
background: transparent;
color: #1c7ed6;
font-size: 14px;
font-weight: 800;
}
.budget-chart-legend {
display: flex;
align-items: center;
gap: 22px;
color: #4b5563;
font-size: 13px;
}
.budget-chart-legend span {
display: inline-flex;
align-items: center;
gap: 7px;
}
.legend-line {
width: 18px;
height: 0;
border-top: 2px dashed #2f7fd7;
}
.legend-line.used {
border-top-style: solid;
border-top-color: #13a66b;
}
.budget-chart-panel {
padding-bottom: 16px;
}
.budget-chart-panel .budget-trend-chart {
margin: 12px 18px 0;
}
.budget-alert-list {
display: grid;
padding: 12px 20px 18px;
}
.budget-alert-row {
min-height: 46px;
display: grid;
grid-template-columns: 12px 120px minmax(0, 1fr) 92px;
gap: 12px;
align-items: center;
border-bottom: 1px solid #edf1f6;
}
.budget-alert-row:last-child {
border-bottom: 0;
}
.budget-alert-row i {
width: 8px;
height: 8px;
border-radius: 999px;
}
.budget-alert-row i.danger {
background: #ef4444;
}
.budget-alert-row i.warn {
background: #f59e0b;
}
.budget-alert-row i.ok {
background: #13a66b;
}
.budget-alert-row strong {
color: #273142;
font-size: 14px;
font-weight: 800;
}
.budget-alert-row span {
min-width: 0;
color: #4b5563;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.budget-alert-row time {
color: #6b7280;
font-size: 13px;
text-align: right;
}
@keyframes dashboardItemIn {
from {
opacity: 0;
transform: translateY(12px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes iconPop {
0% {
opacity: 0;
transform: scale(.82);
}
70% {
opacity: 1;
transform: scale(1.04);
}
100% {
opacity: 1;
transform: scale(1);
}
}
@media (max-width: 1280px) {
.budget-summary-grid,
.budget-bottom-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.budget-work-grid {
grid-template-columns: 1fr;
}
.budget-department-panel {
min-height: auto;
}
.department-list {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (max-width: 760px) {
.budget-summary-grid,
.budget-bottom-grid {
grid-template-columns: 1fr;
}
.budget-filter-bar {
align-items: stretch;
flex-direction: column;
}
.budget-filter-bar label,
.budget-filter-bar select,
.budget-filter-set,
.budget-action-set,
.budget-primary-btn,
.budget-ghost-btn {
width: 100%;
}
.budget-filter-bar label {
justify-content: space-between;
}
.budget-table-foot {
justify-content: flex-start;
flex-wrap: wrap;
}
.budget-pager,
.budget-page-size {
width: 100%;
}
.department-list {
grid-template-columns: 1fr;
}
.budget-alert-row {
grid-template-columns: 12px minmax(0, 1fr);
}
.budget-alert-row span,
.budget-alert-row time {
grid-column: 2;
}
}