:root {
    --primary: #5e9bff;
    --primary-dark: #4a8aff;
    --secondary: #0fd9a8;
    --danger: #ff6b6b;
    --warning: #ffd166;
    --dark: #121826;
    --darker: #0d1117;
    --card-bg: #1a2236;
    --text: #e5e9f0;
    --text-secondary: #a3b1cc;
    --border: #2d3748;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--darker), var(--dark));
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    padding: 15px;
}

.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
}

.header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(26, 34, 54, 0.8);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    gap: 15px;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.header h1 {
    font-weight: 600;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.header h1 i {
    font-size: 1.8rem;
    color: var(--primary);
    background: rgba(94, 155, 255, 0.1);
    padding: 10px;
    border-radius: 50%;
}

.header-info {
    text-align: right;
}

.location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    margin-top: 8px;
    color: var(--text-secondary);
}

.location i {
    color: var(--warning);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 16px 16px 0 0;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

.card-title i {
    font-size: 1.4rem;
    color: var(--primary);
    background: rgba(94, 155, 255, 0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.chart-container {
    height: 220px;
    position: relative;
}

.gauge-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.gauge-item {
    text-align: center;
    min-width: 160px;
}

.gauge-title {
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.gauge {
    width: 160px;
    height: 120px;
    margin: 0 auto;
}

.status-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.status-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 15px;
    background: rgba(26, 34, 54, 0.7);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.status-item:hover {
    background: rgba(32, 42, 68, 0.8);
    transform: translateX(3px);
}

.status-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.status-label i {
    font-size: 1.2rem;
}

.status-value {
    font-weight: 600;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-top: 5px;
}

.status-normal {
    background-color: rgba(15, 217, 168, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(15, 217, 168, 0.3);
}

.status-warning {
    background-color: rgba(255, 209, 102, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 209, 102, 0.3);
}

.status-danger {
    background-color: rgba(255, 107, 107, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.last-update {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 12px;
}

.alert-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(26, 34, 54, 0.8), rgba(32, 42, 68, 0.8));
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 20px;
    gap: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 209, 102, 0.3);
}

.alert-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--warning), #ffb347);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(255, 209, 102, 0.4);
}

.alert-icon i {
    font-size: 1.8rem;
    color: var(--dark);
}

.alert-content {
    flex: 1;
    min-width: 250px;
}

.alert-content h3 {
    color: var(--warning);
    margin-bottom: 6px;
    font-size: 1.3rem;
}

.alert-content p {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 25px;
    background: rgba(26, 34, 54, 0.6);
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* Animasi untuk elemen */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive design */
@media (max-width: 1200px) {
    .header h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 992px) {
    .header h1 {
        font-size: 1.3rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .gauge-item {
        min-width: 140px;
    }

    .gauge {
        width: 140px;
        height: 110px;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }

    .header h1 {
        justify-content: center;
        font-size: 1.4rem;
    }

    .header-info {
        text-align: center;
        width: 100%;
    }

    .gauge-container {
        flex-direction: column;
        align-items: center;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .status-item {
        flex-direction: column;
        gap: 8px;
    }

    .status-value {
        align-self: flex-start;
    }

    .alert-card {
        flex-direction: column;
        text-align: center;
    }

    .alert-content {
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.2rem;
    }

    .header h1 i {
        font-size: 1.5rem;
        padding: 8px;
    }

    .card {
        padding: 15px;
    }

    .card-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .chart-container {
        height: 200px;
    }

    .gauge-item {
        min-width: 100%;
    }

    .gauge {
        width: 100%;
        max-width: 200px;
    }

    .status-label {
        font-size: 0.9rem;
    }

    .alert-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 400px) {
    .header h1 {
        font-size: 1.1rem;
    }

    .location {
        font-size: 0.8rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .status-value {
        padding: 5px 12px;
        font-size: 0.85rem;
    }
}