* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
}

/* HEADER */
.header {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.left {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.center h1 {
    font-size: 1.5rem;
    color: #333;
}

.center p {
    font-size: 0.9rem;
    color: #666;
}

.right {
    text-align: right;
}

.status.online {
    color: #4caf50;
    font-weight: bold;
}

/* PUMP SELECTOR */
.pump-selector {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 2px solid #e0e0e0;
}

.pump-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pump-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.pump-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* DASHBOARD */
.dashboard {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card h2 {
    margin-bottom: 1rem;
    color: #667eea;
    border-left: 4px solid #667eea;
    padding-left: 1rem;
}

/* STATUS INDICATOR */
.status-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    border-radius: 50px;
}

.status-led {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-led.on {
    background: #4caf50;
    box-shadow: 0 0 10px #4caf50;
}

.status-led.off {
    background: #f44336;
}

.status-text {
    font-size: 1.5rem;
    font-weight: bold;
}

.status-text.on {
    color: #4caf50;
}

.status-text.off {
    color: #f44336;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

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

.box {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.box.highlight {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border: 1px solid #667eea30;
}

.box:hover {
    background: #e9ecef;
    transform: scale(1.02);
}

.value {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

.time-value {
    font-family: monospace;
    font-size: 1.1rem;
}

/* Progress Bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* ALERTS */
.alerts ul {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

.alerts li {
    padding: 0.75rem;
    background: #fff3cd;
    margin-bottom: 0.5rem;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* TABLES */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #f8f9fa;
    font-weight: bold;
    color: #667eea;
}

tr:hover {
    background: #f8f9fa;
}

button {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: none;
    background: #667eea;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 1.5rem;
    background: white;
    color: #666;
    margin-top: 2rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
    }
    
    .right {
        text-align: center;
    }
    
    .pump-selector {
        justify-content: center;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
}