/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 0;
}

/* Header (Logo and Navbar) */
header {
    background-color: #1a2d40;
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .logo img {
    height: 40px;
}

header .navbar {
    display: flex;
    gap: 20px;
}

header .navbar a {
    color: white;
    text-decoration: none;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
}

header .navbar a:hover {
    background-color: #007bff;
}

/* Login Page */
.login-container {
    width: 100%;
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.login-container h1 {
    text-align: center;
    font-size: 24px;
}

input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #0056b3;
}

.error-message {
    color: red;
    text-align: center;
}

/* Dashboard */
.dashboard-container {
    display: flex;
    flex-direction: row;
    height: 100vh;
}

/* Left Sidebar */
.sidebar {
    background-color: #1a2d40;
    width: 250px;
    padding: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: fixed;
    height: 100%;
}

.sidebar .menu-item {
    padding: 15px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sidebar .menu-item:hover {
    background-color: #007bff;
}

.sidebar .menu-item.active {
    background-color: #0056b3;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 20px;
    width: calc(100% - 250px);
}

/* Table */
#deviceTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#deviceTable th, #deviceTable td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

#deviceTable th {
    background-color: #f1f1f1;
    color: #333;
}

#deviceTable td {
    background-color: white;
}

.unlock-btn {
    padding: 6px 12px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.unlock-btn:hover {
    background-color: #218838;
}

.load-more-btn {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
}

.load-more-btn:hover {
    background-color: #0056b3;
}

/* User ID Blur */
.user-id {
    font-weight: bold;
    text-align: center;
    color: #555;
}

.user-id.blurred {
    filter: blur(5px);
}

/* Unlock Pin Section */
.unlock-section {
    margin-top: 20px;
}

.unlock-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.unlock-form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.unlock-form button {
    background-color: #28a745;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.unlock-form button:hover {
    background-color: #218838;
}

/* Chart Styles */
.chart-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
}

canvas {
    width: 100% !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
        width: calc(100% - 200px);
    }
}

/* Footer */
footer {
    background-color: #1a2d40;
    color: white;
    text-align: center;
    padding: 15px;
    position: fixed;
    width: 100%;
    bottom: 0;
}
/* Sidebar Styles */
.sidebar {
    background-color: #1a2d40; /* Dark blue for the sidebar */
    width: 250px;
    padding-top: 20px;
    color: white;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

/* Logo section */
.sidebar .logo {
    text-align: center;
    margin-bottom: 20px;
}

.sidebar .logo img {
    width: 80%;
    height: auto;
}

/* Menu Items */
.sidebar .menu-item {
    padding: 12px 20px;
    font-size: 18px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .menu-item:hover {
    background-color: #007bff; /* Blue color on hover */
}

.sidebar .menu-item.active {
    background-color: #0056b3; /* Darker blue for the active item */
}

/* Icons for menu items */
.sidebar .menu-item .icon {
    font-size: 20px;
}

/* Submenu styles */
.sidebar .submenu {
    display: none;
    margin-left: 20px;
    margin-top: 10px;
}

.sidebar .submenu.active {
    display: block;
}

.sidebar .submenu .submenu-item {
    padding: 10px 20px;
    font-size: 16px;
    color: #b1b1b1; /* Lighter text for submenu items */
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.sidebar .submenu .submenu-item:hover {
    background-color: #0069d9;
}

/* Submenu toggle button */
.sidebar .submenu-toggle {
    padding: 12px 20px;
    font-size: 18px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.sidebar .submenu-toggle:hover {
    background-color: #007bff;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .sidebar .menu-item {
        font-size: 16px;
        padding: 10px 15px;
    }

    .sidebar .submenu .submenu-item {
        font-size: 14px;
    }
}
/* General Dashboard Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
}

/* Navigation Panel */
.nav-panel {
    background-color: #003366;
    width: 250px;
    padding: 20px;
    height: 100vh;
    color: white;
}

.nav-panel .logo {
    width: 80%;
    margin: 0 auto;
    display: block;
    margin-bottom: 30px;
}

.nav-panel ul {
    list-style-type: none;
    padding: 0;
}

.nav-panel ul li {
    margin-bottom: 15px;
}

.nav-panel ul li a {
    text-decoration: none;
    color: white;
    font-size: 18px;
}

.nav-panel ul li a:hover {
    color: #ffcc00;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2rem;
}

/* Buttons */
button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

/* Chart Section */
.charts {
    margin-bottom: 30px;
}

.chart-container {
    margin-bottom: 20px;
}

/* Device Table */
.device-list {
    margin-bottom: 30px;
}

.device-list table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.device-list th, .device-list td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.device-list th {
    background-color: #f1f1f1;
}

/* Unlock Section */
.unlock-section {
    margin-bottom: 30px;
}

.unlock-section form {
    display: flex;
    gap: 10px;
}

/* User ID Section */
.user-ids {
    margin-top: 30px;
}

.user-ids button {
    background-color: #28a745;
}

/* Hidden User ID Section */
.user-id {
    display: inline-block;
    font-weight: bold;
}
