/* Custom CSS untuk Tampilan Dashboard IoT */

body {
    font-family: 'Poppins', sans-serif;
    background-color: #1a1a1a !important;
    overflow-x: hidden !important; /* Mencegah overflow horizontal */
}

/* Kartu Utama */
.custom-card {
    background-color: #1f1f1f;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Penting untuk menjaga konten tetap di batas kartu */
}

.text-success {
    color: #38c172 !important; /* Warna hijau menonjol */
}

/* Gauge Besar (Setengah Lingkaran) */
.large-gauge {
    width: 150px;
    height: 75px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    border-radius: 150px 150px 0 0;
    transition: background 0.5s ease;
}

.gauge-inner {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 65px;
    background-color: #1f1f1f;
    border-radius: 130px 130px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 15px;
}

/* Gauge Kecil (Lingkaran Penuh) */
.small-circular-gauge {
    width: 120px;
    height: 120px;
    position: relative;
    margin: 0 auto;
    border-radius: 50%;
    transition: background 0.5s ease;
}

.small-circular-inner {
    width: 90px;
    height: 90px;
    background-color: #1f1f1f;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Controls Gauges (Input Interaktif) */
.gauge-control {
    width: 60px;
    height: 30px;
    line-height: 30px;
    margin: 15px auto 5px;
    position: relative;
    overflow: hidden;
    border-radius: 60px 60px 0 0;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background 0.5s ease;
    z-index: 10;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    cursor: pointer; /* Menandakan elemen dapat diklik */
}

.gauge-control::after {
    content: ''; 
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 25px;
    background-color: #1f1f1f;
    border-radius: 50px 50px 0 0;
    z-index: -1; /* Menempatkan angka di atas warna dalam */
}

/* Styling untuk input field yang muncul saat editing */
.form-control.form-control-sm {
    padding: 0;
    font-size: 1.1rem;
    font-weight: bold;
    height: 30px; 
    line-height: 30px; 
    border-radius: 0.25rem;
    border: 1px solid #38c172; 
    margin: 15px auto 5px;
    text-align: center;
}

/* Toggle Switches */
.custom-toggle {
    width: 4.5rem !important;
    height: 2.5rem !important;
    background-color: #555;
    border: none;
    box-shadow: none;
    transition: background-color 0.3s ease;
}

.custom-toggle:checked {
    background-color: #38c172 !important;
    border: none;
}

.toggle-control .form-check-label {
    display: block;
    margin-top: 10px;
    font-size: 1rem;
}

/* Memastikan iframe (Peta) patuh pada lebar 100% */
iframe {
    max-width: 100% !important;
    height: auto;
    display: block; 
}