:root {
    --primary: #ff7b25;
    --primary-dark: #e05a00;
    --primary-light: #ff9e58;
    --text: #333333;
    --text-light: #666666;
    --bg: #f8f8f8;
    --card-bg: #ffffff;
    --error: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.stats-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary);
}

.stats-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-card.wide {
    grid-column: span 2;
}

.stats-card.full-width {
    grid-column: 1 / -1;
}

.chart-container {
    height: 200px;
    width: 100%;
}

#uptime-chart, #response-chart {
    width: 100% !important;
    height: 100% !important;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.service-item {
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    background: #f0f0f0;
    transition: all 0.2s ease;
}

.service-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.service-item.up {
    background: var(--success);
    color: white;
}

.service-item.down {
    background: var(--error);
    color: white;
}

.events-log {
    max-height: 300px;
    overflow-y: auto;
}

.event-item {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.event-item:last-child {
    border-bottom: none;
}

.event-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--primary-light);
    color: white;
}

.event-info {
    flex: 1;
}

.event-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

#add-system-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#add-system-form input, 
#add-system-form select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}

#add-system-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

#add-system-form button:hover {
    background: var(--primary-dark);
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-card.wide, 
    .stats-card.full-width {
        grid-column: auto;
    }
}