activity-simulation / src /index.css
Augusto Diaz
Space: dashboard only
5b7eaab
Raw
History Blame Contribute Delete
6.45 kB
/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: #f8fafc;
color: #1e293b;
line-height: 1.5;
}
/* Dashboard layout */
.dashboard {
max-width: 1400px;
margin: 0 auto;
padding: 20px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
}
/* Card styles */
.card {
background: white;
border-radius: 12px;
padding: 20px;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
border: 1px solid #e2e8f0;
transition: all 0.2s ease;
}
.card:hover {
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.card h3 {
font-size: 18px;
font-weight: 600;
margin-bottom: 16px;
color: #1e293b;
display: flex;
align-items: center;
gap: 8px;
}
/* Risk score styles */
.risk-score {
font-size: 32px;
font-weight: 700;
margin: 8px 0;
}
.risk-low { color: #059669; }
.risk-medium { color: #d97706; }
.risk-high { color: #dc2626; }
/* Progress bars */
.bar {
height: 8px;
background: #e2e8f0;
border-radius: 999px;
overflow: hidden;
margin: 4px 0;
}
.bar > div {
height: 100%;
border-radius: 999px;
transition: width 0.3s ease, background-color 0.3s ease;
}
/* Button styles */
.btn {
background: #3b82f6;
color: white;
border: none;
border-radius: 8px;
padding: 10px 16px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
display: inline-flex;
align-items: center;
gap: 6px;
}
.btn:hover {
background: #2563eb;
transform: translateY(-1px);
}
.btn:active {
transform: translateY(0);
}
.btn-secondary {
background: #6b7280;
}
.btn-secondary:hover {
background: #4b5563;
}
.btn-success {
background: #059669;
}
.btn-success:hover {
background: #047857;
}
.btn-danger {
background: #dc2626;
}
.btn-danger:hover {
background: #b91c1c;
}
/* Help button */
.help-btn {
background: #8b5cf6;
color: white;
border: none;
border-radius: 50%;
width: 24px;
height: 24px;
font-size: 12px;
font-weight: bold;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
margin-left: 8px;
transition: all 0.2s ease;
}
.help-btn:hover {
background: #7c3aed;
transform: scale(1.1);
}
/* Muted text */
.muted {
color: #64748b;
font-size: 14px;
}
/* Evidence display */
.evidence {
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 12px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 12px;
line-height: 1.4;
max-height: 200px;
overflow-y: auto;
white-space: pre-wrap;
}
/* Device list */
.device-list {
list-style: none;
}
.device-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 0;
border-bottom: 1px solid #e2e8f0;
}
.device-item:last-child {
border-bottom: none;
}
.device-id {
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 12px;
color: #475569;
}
.device-count {
background: #e2e8f0;
color: #475569;
padding: 2px 8px;
border-radius: 12px;
font-size: 12px;
font-weight: 500;
}
/* Machine list */
.machine-list {
list-style: none;
}
.machine-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 0;
border-bottom: 1px solid #e2e8f0;
}
.machine-item:last-child {
border-bottom: none;
}
.machine-id {
font-weight: 500;
color: #1e293b;
}
.machine-time {
font-size: 12px;
color: #64748b;
}
/* History list */
.history-list {
list-style: none;
max-height: 200px;
overflow-y: auto;
}
.history-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 0;
border-bottom: 1px solid #e2e8f0;
font-size: 14px;
}
.history-item:last-child {
border-bottom: none;
}
.history-time {
color: #64748b;
}
.history-score {
font-weight: 500;
}
/* Control buttons */
.controls {
grid-column: 1 / -1;
display: flex;
gap: 12px;
justify-content: center;
margin-top: 20px;
}
/* Loading states */
.loading {
opacity: 0.6;
pointer-events: none;
}
.spinner {
display: inline-block;
width: 16px;
height: 16px;
border: 2px solid #e2e8f0;
border-radius: 50%;
border-top-color: #3b82f6;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Responsive design */
@media (max-width: 768px) {
.dashboard {
grid-template-columns: 1fr;
padding: 16px;
}
.controls {
flex-direction: column;
align-items: center;
}
.card h3 {
font-size: 16px;
}
.risk-score {
font-size: 24px;
}
}
/* Help modal styles */
.help-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 20px;
}
.help-content {
background: white;
border-radius: 12px;
max-width: 800px;
max-height: 80vh;
overflow-y: auto;
padding: 24px;
position: relative;
}
.help-close {
position: absolute;
top: 16px;
right: 16px;
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #64748b;
}
.help-close:hover {
color: #1e293b;
}
.help-section {
margin-bottom: 24px;
}
.help-section h3 {
color: #1e293b;
margin-bottom: 12px;
font-size: 18px;
}
.help-section p {
color: #475569;
line-height: 1.6;
margin-bottom: 8px;
}
.device-reference {
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 16px;
margin-top: 16px;
}
.device-reference h4 {
color: #1e293b;
margin-bottom: 12px;
font-size: 16px;
}
.device-table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}
.device-table th,
.device-table td {
text-align: left;
padding: 8px 12px;
border-bottom: 1px solid #e2e8f0;
}
.device-table th {
background: #f1f5f9;
font-weight: 600;
color: #374151;
}
.device-table td {
color: #475569;
}
.device-table code {
background: #e2e8f0;
padding: 2px 6px;
border-radius: 4px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 12px;
}