Files
infmap/app/static/style.css
2026-03-07 19:32:02 +13:00

319 lines
5.3 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background: #0f172a;
color: #e2e8f0;
min-height: 100vh;
}
header {
background: #1e293b;
border-bottom: 1px solid #334155;
padding: 20px 32px;
display: flex;
align-items: baseline;
gap: 16px;
}
header h1 {
font-size: 1.5rem;
font-weight: 600;
color: #f1f5f9;
}
.subtitle {
font-size: 0.8rem;
color: #64748b;
}
main {
max-width: 1400px;
margin: 0 auto;
padding: 24px;
}
/* --- Group --- */
.group {
margin-bottom: 32px;
}
.group-header {
font-size: 1.1rem;
font-weight: 600;
color: #3b82f6;
padding: 8px 0 12px 0;
border-bottom: 2px solid #1e3a5f;
margin-bottom: 16px;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.server-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 12px;
}
/* --- Server Card --- */
.server-card {
background: #1e293b;
border: 1px solid #334155;
border-radius: 10px;
padding: 16px;
cursor: pointer;
transition: all 0.2s ease;
position: relative;
}
.server-card:hover {
border-color: #475569;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.server-card.expanded {
grid-column: 1 / -1;
border-color: #3b82f6;
box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}
.server-card.offline .card-summary {
opacity: 0.6;
}
.card-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 4px;
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
.status-dot.online {
background: #22c55e;
box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}
.status-dot.offline {
background: #ef4444;
box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}
.server-name {
font-weight: 600;
font-size: 0.95rem;
color: #f1f5f9;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.server-ip {
font-size: 0.8rem;
color: #94a3b8;
margin-bottom: 2px;
font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}
.server-os {
font-size: 0.75rem;
color: #64748b;
margin-bottom: 10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.offline-label {
font-size: 0.8rem;
color: #ef4444;
font-style: italic;
margin-top: 8px;
}
/* --- Usage Bars --- */
.usage-bars {
display: flex;
flex-direction: column;
gap: 5px;
}
.usage-row {
display: flex;
align-items: center;
gap: 6px;
}
.usage-label {
font-size: 0.65rem;
font-weight: 600;
color: #64748b;
width: 30px;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.usage-bar-bg {
flex: 1;
height: 6px;
background: #334155;
border-radius: 3px;
overflow: hidden;
}
.usage-bar-fill {
height: 100%;
border-radius: 3px;
transition: width 0.5s ease;
min-width: 2px;
}
.usage-pct {
font-size: 0.7rem;
color: #94a3b8;
width: 30px;
text-align: right;
font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}
/* --- Card Details --- */
.card-details {
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid #334155;
}
.details-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 16px;
}
.detail-section {
background: #0f172a;
border-radius: 8px;
padding: 12px;
border: 1px solid #1e3a5f;
}
.detail-section.wide {
grid-column: 1 / -1;
}
.detail-section h4 {
font-size: 0.75rem;
font-weight: 600;
color: #3b82f6;
text-transform: uppercase;
letter-spacing: 0.1em;
margin-bottom: 8px;
}
.detail-section table {
width: 100%;
border-collapse: collapse;
font-size: 0.8rem;
}
.detail-section td {
padding: 3px 8px 3px 0;
vertical-align: top;
}
.detail-section td:first-child {
color: #64748b;
white-space: nowrap;
width: 1%;
}
.detail-section td:last-child {
color: #cbd5e1;
word-break: break-all;
}
.table-header td {
font-weight: 600;
color: #94a3b8 !important;
border-bottom: 1px solid #334155;
padding-bottom: 4px;
margin-bottom: 4px;
font-size: 0.7rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.disk-pct {
font-weight: 600;
font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}
.error-text {
color: #ef4444;
font-size: 0.8rem;
font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}
.last-updated {
margin-top: 12px;
font-size: 0.7rem;
color: #475569;
text-align: right;
}
/* --- Empty State --- */
.empty-state {
text-align: center;
padding: 80px 24px;
color: #64748b;
}
.empty-state h2 {
font-size: 1.2rem;
margin-bottom: 8px;
color: #94a3b8;
}
.empty-state code {
background: #1e293b;
padding: 2px 8px;
border-radius: 4px;
font-size: 0.85rem;
color: #3b82f6;
}
/* --- Responsive --- */
@media (max-width: 600px) {
header {
padding: 16px;
}
main {
padding: 12px;
}
.server-grid {
grid-template-columns: 1fr;
}
.details-grid {
grid-template-columns: 1fr;
}
}