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

body {
    background-color: #121212; /* Dark background */
    color: #ffffff; /* White text */
    font-family: 'Source Sans Pro', sans-serif;
}

body.login-page {
    background: url('https://labterpadu.undip.ac.id/wp-content/uploads/2013/01/cropped-lab1-2.jpg') no-repeat center center fixed;
    background-size: cover;
    position: relative;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Agar tinggi 100% dari viewport */
    width: 100%;
}

body.login-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Overlay untuk efek gelap */
    backdrop-filter: blur(8px); /* Efek blur */
}

.login-box h1 {
    font-size: 36px;
}

/* ======= Navbar Customization ======= */
.navbar {
    background-color: #1e1e1e !important;
    border-bottom: 2px solid #007bff;
}

.navbar a {
    color: white !important;
}

.navbar .navbar-badge {
    background-color: #dc3545 !important; /* Red notification badge */
}

    
#alert-badge-count {
    transition: transform 0.2s ease;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

/* ======= Sidebar Customization ======= */
.main-sidebar {
    background-color: #1c1c1c;
    color: #ffffff;
}

.brand-link {
    color: #ffffff !important;
}

.sidebar a {
    color: #b8b8b8;
}

span:hover {
    color: #ffffff !important;
}

.sidebar a:hover {
    color: #ffffff !important;
    background-color: #1c1c1c;
}

/* ======= Dashboard Title ======= */
h1 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

/* ======= Card Styles ======= */
.card {
    background-color: #1e1e1e !important;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    padding: 20px;
}

.card-title {
    color: #ffffff;
    font-weight: bold;
}

/* ======= Table Styles ======= */
.table {
    background-color: #252525;
    color: white;
    border-radius: 5px;
    border-color: white;
}

.table th {
    background-color: #f6f6f6 !important;
    color: rgb(0, 0, 0);
}

.table tbody tr:hover {
    background-color: #333 !important;
}

.table-dark {
    border-radius: 10px;
    overflow: hidden;
}

.table-dark tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.table-dark tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}


/* ======= Chart Styling ======= */
canvas {
    background-color: #252525;
    border-radius: 8px;
}

/* ======= Form & Dropdown Styling ======= */
.form-control {
    background-color: #252525;
    color: white;
    border: 1px solid #007bff;
}

.form-control:focus {
    background-color: #2e2e2e;
    color: white;
    border: 1px solid #ffffff;
}

/* ======= Autofill Styling ======= */
.form-control:-webkit-autofill {
    background-color: #3a3a3a !important; /* Warna latar belakang autofill */
    color: #ffffff !important; /* Warna teks */
    -webkit-box-shadow: 0 0 0px 1000px #252525 inset !important; /* Menambahkan efek shadow */
}

.form-control:-webkit-autofill:focus {
    background-color: #3a3a3a !important; /* Warna latar belakang autofill saat fokus */
    color: #ffffff !important; /* Warna teks saat fokus */
    border: 1px solid #007bff; /* Border saat autofill dan fokus */
}

.form-control:-webkit-autofill::first-line {
    font-weight: bold; /* Menambahkan tebal pada teks autofill */
}

/* ======= Buttons ======= */
.btn-primary {
    background-color: #007bff;
    border: none;
    transition: 0.3s;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* ======= Footer ======= */
.main-footer {
    background-color: #1e1e1e;
    color: white;
    text-align: center;
    padding: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        margin-bottom: 15px;
    }
}

.table-container {
    width: 90%;
    max-width: 900px;
    margin: 20px auto;
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    padding: 20px;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #333333;
}

th {
    background-color: #ab1111;
    color: #ffffff;
}

.chart-container {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    height: 100%;
    padding: 20px;
    display: block;
}

#gasChart {
    background-color: rgb(0, 0, 0);
    border-radius: 10px;
    padding: 10px;
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
}

.sensor-cards {
    display: none;
}

/* Jika layar < 690px, sembunyikan Chart & tampilkan Card */
@media screen and (max-width: 690px) {
    .chart-container {
        display: none;
    }
    .sensor-cards {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        padding: 20px;
    }
    .sensor-card {
        color: white;
        padding: 15px;
        border-radius: 10px;
        text-align: center;
        font-size: 18px;
        font-weight: bold;
        margin: 10px;
    }

    /* MQ-4: Warna biru seperti di chart */
    /* .mq4-card {
        background-color: rgba(0, 102, 204, 0.2);
        border: 2px solid #1e90ff;
    } */

    /* MQ-6: Warna merah seperti di chart */
    .mq6-card {
        background-color: rgba(153, 0, 51, 0.2);
        border: 2px solid #ab1111;
    }

    /* MQ-8: Warna hijau seperti di chart */
    .mq8-card {
        background-color: rgba(0, 153, 76, 0.2);
        border: 2px solid #32cd32;
    }

}

.popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    padding: 12px 18px;
    border-radius: 5px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.popup.show {
    opacity: 1;
    transform: translateY(0);
}
.popup.hidden {
    display: none;
}


.logout-button {
    background-color: #c9302c; /* Warna merah */
    color: white !important; /* Pastikan teks putih */
    border-radius: 5px;
    padding: 5px 8px; /* Sesuaikan padding agar lebih proporsional */
    display: flex;
    align-items: center; /* Pusatkan ikon dan teks secara vertikal */
    justify-content: center; /* Pusatkan secara horizontal */
    gap: 8px; /* Beri jarak antara ikon dan teks */
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.logout-button a {
    color: white !important;
    font-size: 14px; /* Ukuran font */
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center; /* Pastikan kontennya tetap sejajar */
    gap: 5px; /* Jarak antara ikon dan teks */
}

.logout-button i {
    font-size: 14px; /* Ukuran ikon */
}

.logout-button:hover {
    background-color: #d9534f; /* Warna merah lebih gelap saat hover */
}

.login-button {
    background-color: #2c3ec9; /* Warna merah */
    color: white !important; /* Pastikan teks putih */
    border-radius: 5px;
    display: flex;
    align-items: center; /* Pusatkan ikon dan teks secara vertikal */
    justify-content: center; /* Pusatkan secara horizontal */
    gap: 8px; /* Beri jarak antara ikon dan teks */
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-button a {
    color: white !important;
    font-size: 14px; /* Ukuran font */
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center; /* Pastikan kontennya tetap sejajar */
    gap: 5px; /* Jarak antara ikon dan teks */
}

.login-button i {
    font-size: 14px; /* Ukuran ikon */
}

.login-button:hover {
    background-color: rgb(44, 112, 201); /* Warna merah lebih gelap saat hover */
}

/* Contact */
.contact-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background: #343a40;
    color: white;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.contact-title {
    font-size: 24px;
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 18px;
    margin: 5px 0;
}

.contact-socials a {
    color: #1e90ff;
    text-decoration: none;
    font-weight: bold;
    margin: 0 10px;
}

.contact-socials a:hover {
    text-decoration: underline;
}
