- Implemented DetailPage for detailed KPI analysis including charts and status badges. - Created HomePage to display an overview of KPIs categorized by security, quality, delays, costs, and maintenance. - Introduced KPI types and data structures for better type safety. - Added styles for DetailPage, HomePage, KPICard, and charts for improved UI. - Integrated web vitals reporting and setup tests for better performance tracking and testing. - Included a CSV file with mathematical formulas for KPI calculations.
291 lines
4.1 KiB
CSS
291 lines
4.1 KiB
CSS
.detail-page {
|
|
color: white;
|
|
}
|
|
|
|
.detail-header {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.detail-header h1 {
|
|
font-size: 2rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.detail-header p {
|
|
font-size: 1.1rem;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.detail-layout {
|
|
display: grid;
|
|
grid-template-columns: 300px 1fr;
|
|
gap: 2rem;
|
|
}
|
|
|
|
/* KPI LIST */
|
|
.kpi-list {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
border-radius: 12px;
|
|
padding: 1.5rem;
|
|
color: #333;
|
|
height: fit-content;
|
|
}
|
|
|
|
.kpi-list h2 {
|
|
font-size: 1.2rem;
|
|
margin-bottom: 1rem;
|
|
color: #333;
|
|
}
|
|
|
|
.kpi-list-items {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.kpi-list-item {
|
|
padding: 1rem;
|
|
border-left: 3px solid #ddd;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
background: white;
|
|
}
|
|
|
|
.kpi-list-item:hover {
|
|
background: #f5f7fa;
|
|
}
|
|
|
|
.kpi-list-item.active {
|
|
background: #f0f2ff;
|
|
}
|
|
|
|
.kpi-list-name {
|
|
font-weight: 600;
|
|
margin-bottom: 0.5rem;
|
|
color: #333;
|
|
}
|
|
|
|
.kpi-list-value {
|
|
font-size: 0.9rem;
|
|
color: #666;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 0.25rem 0.6rem;
|
|
border-radius: 12px;
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.badge-good {
|
|
background: #d4edda;
|
|
color: #155724;
|
|
}
|
|
|
|
.badge-warning {
|
|
background: #fff3cd;
|
|
color: #856404;
|
|
}
|
|
|
|
.badge-critical {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
}
|
|
|
|
/* DETAIL SECTION */
|
|
.kpi-detail {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
border-radius: 12px;
|
|
padding: 2rem;
|
|
color: #333;
|
|
}
|
|
|
|
.detail-header-card {
|
|
border-top: 4px solid;
|
|
padding-bottom: 1.5rem;
|
|
margin-bottom: 1.5rem;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
}
|
|
|
|
.detail-header-card h2 {
|
|
font-size: 1.8rem;
|
|
margin-bottom: 1rem;
|
|
margin-top: 0;
|
|
}
|
|
|
|
.detail-value-section {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.detail-value {
|
|
font-size: 2.5rem;
|
|
font-weight: bold;
|
|
color: #333;
|
|
}
|
|
|
|
.detail-unit {
|
|
font-size: 1rem;
|
|
color: #999;
|
|
}
|
|
|
|
/* INFO SECTION */
|
|
.detail-info {
|
|
margin-bottom: 2rem;
|
|
padding-bottom: 2rem;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
}
|
|
|
|
.info-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 1rem;
|
|
padding: 0.75rem;
|
|
background: #f9f9f9;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.info-label {
|
|
font-weight: 600;
|
|
color: #666;
|
|
}
|
|
|
|
.info-value {
|
|
color: #333;
|
|
}
|
|
|
|
/* DESCRIPTION & FORMULA */
|
|
.detail-description,
|
|
.detail-formula {
|
|
margin-bottom: 2rem;
|
|
padding-bottom: 2rem;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
}
|
|
|
|
.detail-description h3,
|
|
.detail-formula h3 {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
margin-bottom: 1rem;
|
|
color: #333;
|
|
}
|
|
|
|
.detail-description p {
|
|
color: #666;
|
|
line-height: 1.6;
|
|
margin: 0;
|
|
}
|
|
|
|
.detail-formula pre {
|
|
background: #f5f7fa;
|
|
padding: 1rem;
|
|
border-radius: 4px;
|
|
overflow-x: auto;
|
|
font-size: 0.9rem;
|
|
line-height: 1.4;
|
|
color: #333;
|
|
}
|
|
|
|
/* CHART DETAIL */
|
|
.detail-chart {
|
|
margin-bottom: 2rem;
|
|
padding-bottom: 2rem;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
}
|
|
|
|
.detail-chart h3 {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
margin-bottom: 1rem;
|
|
color: #333;
|
|
}
|
|
|
|
.chart-container-detail {
|
|
position: relative;
|
|
height: 350px;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
/* ACTIONS */
|
|
.detail-actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.btn {
|
|
padding: 0.75rem 1.5rem;
|
|
border: none;
|
|
border-radius: 6px;
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: #667eea;
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: #764ba2;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: #f0f0f0;
|
|
color: #333;
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: #e0e0e0;
|
|
}
|
|
|
|
.no-selection {
|
|
text-align: center;
|
|
padding: 3rem;
|
|
color: #999;
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
/* RESPONSIVE */
|
|
@media (max-width: 1024px) {
|
|
.detail-layout {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.kpi-list {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
|
height: auto;
|
|
}
|
|
|
|
.kpi-list-items {
|
|
grid-column: 1 / -1;
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.detail-header h1 {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.detail-value {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.detail-actions {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.btn {
|
|
width: 100%;
|
|
}
|
|
}
|