* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body.light-mode {
    background-color: #f5f5f5;
    color: #212121;
}

body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

/* Top Navbar */
.navbar {
    background-color: #181818 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
}

.navbar .dashboard-logo {
    height: 40px;
    filter: brightness(1.2);
}

.navbar .nav-link {
    color: #b0b3c1 !important;
    transition: background-color 0.3s, color 0.3s;
}

.navbar .nav-link:hover {
    background-color: #424242; /* Greyish hover */
    color: #fff !important;
    border-radius: 4px;
}

.navbar .dropdown-menu {
    background-color: #303030; /* Greyish dark tone */
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.navbar .dropdown-item {
    color: #677483;
    transition: background-color 0.3s;
}

.navbar .dropdown-item:hover {
    background-color: #424242;
    color: #fff;
}

.navbar .form-control {
    background-color: #303030;
    border: none;
    color: #677483;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.navbar .form-control:focus {
    background-color: #303030;
    color: #fff;
    box-shadow: 0 0 0 2px #4caf50;
}

.navbar .btn-main {
    background-color: #4caf50;
    color: #fff;
    border: none;
    transition: background-color 0.3s, transform 0.1s;
}

.navbar .btn-main:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.navbar .btn-main:active {
    transform: translateY(1px);
}

/* Center dropdown menu below the toggle button */
.navbar-nav .dropdown-menu {
    position: absolute;
    top: 100%; /* Below the toggle */
    right: 0; /* Align to right of nav-item */
    left: auto; /* Prevent stretching */
    /* z-index: 1070; */
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
}


/* Compact side-by-side tabs */
    .nav-pills .nav-link {
        padding: 0.25rem 0.1rem; /* Smaller padding */
        font-size: 12px; /* Smaller text */
        margin-right: 0.1rem; /* Small gap between tabs */
    }

    .nav-pills .nav-item {
        flex-grow: 0; /* Prevent tabs from stretching */
    }

    .nav-pills {
        display: flex;
        justify-content: flex-start; /* Align tabs side by side */
    }
.theme-toggle {
    cursor: pointer;
    font-size: 1.5rem;
    color: #b0b3c1;
    transition: color 0.3s, transform 0.1s;
}

.theme-toggle:hover {
    color: #fff;
    transform: scale(1.1);
}

/* Sidebar */
.sidebar {
    width: 255px;
    height: calc(100vh - 56px);
    position: fixed;
    top: 56px;
    left: 0;
    padding: 16px 0;
    transition: width 0.3s;
    z-index: 999;
    overflow-y: auto;
}

body.dark-mode .sidebar {
    background-color: #181818;
    color: #b0b3c1;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
}

body.light-mode .sidebar {
    background-color: #fff;
    color: #424242;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.12);
}

.sidebar.collapsed {
    width: 60px;
}

.logo {
    text-align: center;
    margin-bottom: 24px;
    padding: 0 16px;
}

.logo img {
    width: 100px;
    display: block;
    margin: 0 auto;
    filter: brightness(1.2);
}

.sidebar.collapsed .logo img {
    width: 40px;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 4px;
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    position: relative;
    overflow: hidden;
}

body.dark-mode .nav-link {
    color: #b0b3c1;
}

body.light-mode .nav-link {
    color: #424242;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nav-link:hover::before {
    width: 300px;
    height: 300px;
}

.nav-link:hover {
    background-color: #424242; /* Greyish hover */
    color: #fff;
}

body.light-mode .nav-link:hover {
    background-color: #e0e0e0;
    color: #212121;
}

.nav-link.active {
    background-color: #4caf50;
    color: #fff;
}

.nav-link .icon {
    font-size: 16px;
}

.arrow {
    font-size: 12px;
}

.sidebar.collapsed .nav-link .text,
.sidebar.collapsed .nav-link .arrow,
.sidebar.collapsed .dropdown-menu,
.sidebar.collapsed .section-title,
.sidebar.collapsed .material-divider,
.sidebar.collapsed .date-picker,
.sidebar.collapsed .time_offset_label,
.sidebar.collapsed .select_time_zone_div,
.sidebar.collapsed .btn-apply {
    display: none;
}

.section-title {
    margin: 16px 0 8px;
    padding: 0 24px;
    font-size: 12px;
    letter-spacing: 0.5px;
}

body.dark-mode .section-title {
    color: #677483;
}

body.light-mode .section-title {
    color: #757575;
}

.material-divider {
    border: 0;
    height: 1px;
    background: #444;
    margin: 16px 0;
}

body.light-mode .material-divider {
    background: #e0e0e0;
}

/* Dropdown Menu (Pop Out to the Right) */
.dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 0;
    left: 100%;
    width: 200px;
    display: none;
    /* z-index: 1000; */
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .dropdown-menu {
    background-color: #303030; /* Greyish dark tone */
}

body.light-mode .dropdown-menu {
    background-color: #fafafa;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu .nav-link {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 400;
}

.dropdown-menu .nav-link:hover {
    background-color: #424242; /* Greyish hover */
    color: #fff;
}

body.light-mode .dropdown-menu .nav-link:hover {
    background-color: #e0e0e0;
    color: #212121;
}

.date-picker {
    padding: 0 12px;
}

.date-picker .date-input-label {
    width: 100%;
    text-align: center;
    background: none;
}

body.dark-mode .date-picker .date-input-label {
    color: #677483;
}

body.light-mode .date-picker .date-input-label {
    color: #757575;
}

.date-picker .slider {
    height: 4px;
    background: #444;
    margin: 16px 0;
    border-radius: 2px;
}

body.light-mode .date-picker .slider {
    background: #bdbdbd;
}

.date-picker .btn-apply,
.select_time_zone_div + .btn-apply {
    background-color: #f5a623;
    color: #fff;
    border: none;
    padding: 10px;
    width: 100%;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-top: 16px;
}

.date-picker .btn-apply:hover,
.select_time_zone_div + .btn-apply:hover {
    background-color: #e69500;
    transform: translateY(-1px);
}

.date-picker .btn-apply:active,
.select_time_zone_div + .btn-apply:active {
    transform: translateY(1px);
}

.time_offset_label {
    font-size: 12px;
    margin: 16px 0 8px;
}

body.dark-mode .time_offset_label {
    color: #677483;
}

body.light-mode .time_offset_label {
    color: #757575;
}

.select_time_zone_div {
    margin: 0 24px;
}

.select_time_zone_div .form-control {
    background-color: #303030;
    border: none;
    color: #b0b3c1;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    margin-right: 50px;
}

body.light-mode .select_time_zone_div .form-control {
    background-color: #fff;
    color: #424242;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.select_time_zone_div .form-control:focus {
    box-shadow: 0 0 0 2px #4caf50;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 70px 20px;
    transition: margin-left 0.3s;
}

body.collapsed .main-content {
    margin-left: 60px;
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid #444;
    margin-bottom: 24px;
}

body.light-mode .nav-tabs {
    border-bottom: 2px solid #e0e0e0;
}

.nav-tabs .nav-link {
    color: #b0b3c1;
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s, border-bottom 0.3s;
    position: relative;
}

body.light-mode .nav-tabs .nav-link {
    color: #424242;
}

.nav-tabs .nav-link:hover {
    color: #fff;
    border-bottom: 2px solid #f5a623;
}

body.light-mode .nav-tabs .nav-link:hover {
    color: #212121;
    border-bottom: 2px solid #f5a623;
}

.nav-tabs .nav-link.active {
    color: #f5a623;
    border-bottom: 2px solid #f5a623;
    background: none;
}

body.light-mode .nav-tabs .nav-link.active {
    color: #f5a623;
}

/* Table */
.table-container {
    background-color: #181818;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow-x: auto;
    padding: 15px;
    width: 100%;
    overflow-x: auto;
}

body.light-mode .table-container {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.table {
    width: 100% !important;
    margin-bottom: 0;
    color: #b0b3c1;
}

body.light-mode .table {
    color: #424242;
}

.table thead th, .table tfoot th {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 8px;
    background-color: #303030;
    border-bottom: 1px solid #444;
}

body.light-mode .table thead th,
body.light-mode .table tfoot th {
    background-color: #fafafa;
    border-bottom: 1px solid #e0e0e0;
}

th, td {
    padding: 2px 4px; /* reduce padding: vertical | horizontal */
    line-height: 1.2;  /* reduce line spacing */
}
.table tbody tr {
    transition: background-color 0.3s;
}

.table tbody tr:hover {
    background-color: #424242;
}

body.light-mode .table tbody tr:hover {
    background-color: #f5f5f5;
}

.table tbody td {
    font-size: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #444;
}

body.light-mode .table tbody td {
    border-bottom: 1px solid #e0e0e0;
}

.status-online {
    color: #4caf50;
    font-weight: 500;
}

.status-offline, .error_message {
    color: #f44336;
    font-weight: 500;
}

.table .btn-main {
    font-size: 12px;
    padding: 6px 12px;
}

/* Base button styles */
.dataTables_wrapper .dt-button {
    background-color: #e69500; /* Replace 'x' with your desired background color */
    color: #fff; /* White text */
    border: none; /* Remove default border */
    padding: 8px 16px; /* Add padding for a better look */
    border-radius: 4px; /* Rounded corners */
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 0.9rem; /* Adjust font size */
    margin: 10px; /* Add spacing between buttons */
  }
  .dataTables_wrapper .dt-button:hover {
    background-color: #00a152; /* Replace 'x' with your desired background color */
    color: black; /* White text */
    border: none; /* Remove default border */
    padding: 8px 16px; /* Add padding for a better look */
    border-radius: 4px; /* Rounded corners */
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 0.9rem; /* Adjust font size */
    margin: 10px; /* Add spacing between buttons */
  }
  .material-danger-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background-color: #e22c3b;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
  }

  .material-success-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background-color: #00a152;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
  }
.material-danger-color{
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background-color: #e22c3b;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}
.material-success-color{
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background-color: #00a152;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}
/* Charts */
/* styles.css */
body.light-mode .chart-background {
    background-color: #fff; /* Light mode background */
}

body.dark-mode .chart-background {
    background-color: #181818; /* Dark mode background */
}
/* Modal */
.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.dark-mode .modal-content {
    background-color: #181818;
    color: #b0b3c1;
}

body.light-mode .modal-content {
    background-color: #fff;
    color: #424242;
}

.modal-header {
    border-bottom: 1px solid #444;
    padding: 16px 24px;
}

body.light-mode .modal-header {
    border-bottom: 1px solid #e0e0e0;
}

.modal-title {
    font-size: 16px;
    font-weight: 500;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin-bottom: 12px;
    font-size: 14px;
}

.modal-body strong {
    display: inline-block;
    /* width: 120px; */
}

.modal-footer {
    border-top: 1px solid #444;
    padding: 16px 24px;
}

body.light-mode .modal-footer {
    border-top: 1px solid #e0e0e0;
}

.modal-footer .btn-secondary {
    background-color: #424242;
    color: #fff;
    border: none;
    transition: background-color 0.3s, transform 0.1s;
}

body.light-mode .modal-footer .btn-secondary {
    background-color: #e0e0e0;
    color: #424242;
}

.modal-footer .btn-secondary:hover {
    background-color: #525252;
    transform: translateY(-1px);
}

body.light-mode .modal-footer .btn-secondary:hover {
    background-color: #d5d5d5;
    transform: translateY(-1px);
}

.modal-footer .btn-secondary:active {
    transform: translateY(1px);
}

.modal-footer .btn-main {
    background-color: #4caf50;
    color: #fff;
    border: none;
    transition: background-color 0.3s, transform 0.1s;
}

.modal-footer .btn-main:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.modal-footer .btn-main:active {
    transform: translateY(1px);
}

/* Offcanvas Adjustments */
.offcanvas {
    width: 250px !important;
    background-color: #181818;
}

body.light-mode .offcanvas {
    background-color: #fff;
}

/* Mobile adjustments */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%); /* Hidden by default */
    }
    .sidebar.show {
        transform: translateX(0); /* Visible when toggled */
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .sidebar-backdrop.show {
        display: block; /* Show only when sidebar is open */
    }
}

/* Login and Register page */
/* Remove the old .auth-card styles and replace with modern-card */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 10px;
}
.modern-auth-card {
    width: 100%;
    max-width: 600px; /* Increased width to accommodate two columns */
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.modern-card {
    width: 100%;
    max-width: 600px; /* Increased width to accommodate two columns */
    padding: 5px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

/* Adjust logo size for login/register pages */
.auth-container .logo {
    height: 52px; /* Reduced from 40px to 32px for better proportion */
    width: auto;
    filter: brightness(1.2);
}

body.dark-mode .modern-card {
    background: linear-gradient(145deg, #181818, #2a2a2a);
    color: #b0b3c1;
}

body.light-mode .modern-card {
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    color: #424242;
}

.card-link
{
    text-decoration: none;
    padding: 1px;
}

/* Ensure form elements in two-column layout are balanced */
.row .col-md-6 .form-control {
    width: 100%;
}

/* Adjust form-check alignment in two-column layout */
.row .col-md-6 .form-check {
    margin-top: 8px; /* Align with the cellphone input */
}

/* Ensure labels and inputs are properly spaced */
.row .col-md-6 .form-label {
    margin-bottom: 8px;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* Add a subtle overlay for depth */
.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

/* Adjust form elements for a modern look */
.form-control {
    background-color: #303030;
    border: none;
    color: #b0b3c1;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: box-shadow 0.3s, background-color 0.3s;
}

body.light-mode .form-control {
    background-color: #f5f5f5;
    color: #424242;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
    background-color: #303030;
    color: #fff;
}

.form-control[readonly] {
    background-color: #303030;
    color: #fff;
}

body.light-mode .form-control:focus {
    background-color: #fff;
    color: #424242;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #b0b3c1;
}

body.light-mode .form-label {
    color: #424242;
}

.btn-main {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.3s, transform 0.1s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-main:hover {
    background: linear-gradient(90deg, #45a049, #5cb860);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.btn-main:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: linear-gradient(90deg, #424242, #525252);
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.3s, transform 0.1s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.light-mode .btn-secondary {
    background: linear-gradient(90deg, #e0e0e0, #d5d5d5);
    color: #424242;
}

.btn-secondary:hover {
    background: linear-gradient(90deg, #525252, #626262);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

body.light-mode .btn-secondary:hover {
    background: linear-gradient(90deg, #d5d5d5, #cacaca);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.btn-secondary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Social Icons */
.social-icons p {
    font-size: 14px;
    margin-bottom: 8px;
}

body.dark-mode .social-icons p {
    color: #677483;
}

body.light-mode .social-icons p {
    color: #757575;
}

.social-icon {
    font-size: 20px;
    margin: 0 10px;
    text-decoration: none;
    transition: transform 0.3s, color 0.3s;
}

.social-icon:hover {
    transform: scale(1.2);
}

.social-icon .fa-facebook-f {
    color: #3b5998;
}

.social-icon .fa-twitter {
    color: #1da1f2;
}

.social-icon .fa-google-plus-g {
    color: #db4437;
}

/* Adjust auth-footer for modern look */
.auth-footer p {
    margin: 8px 0;
    font-size: 14px;
}

.auth-footer a {
    color: #f5a623;
    text-decoration: none;
    transition: color 0.3s;
}

.auth-footer a:hover {
    color: #e69500;
}

/* Show Password Icon */
.show-password {
    color: #b0b3c1;
    font-size: 16px;
    transition: color 0.3s;
}

body.light-mode .show-password {
    color: #424242;
}

.show-password:hover {
    color: #fff;
}

body.light-mode .show-password:hover {
    color: #212121;
}

/* Ensure the input field has enough padding to accommodate the icon */
.form-control.password {
    padding-right: 40px; /* Add space for the eye icon */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 767px) {
    .row .col-md-6 {
        width: 100%; /* Stack columns on smaller screens */
    }

    .modern-card {
        max-width: 450px; /* Revert to original width on smaller screens */
    }
}

.error-message{
    color: red;
}

/* System view cards */
/* Container and general card styling */
/* General card styling */
.system-card.card-device {
    position: relative;
    padding-left: 20px; /* Space for the left border */
}

/* Pseudo-elements for the thick left border */
.card-icon-online::before, .card-icon-offline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 10px; /* Adjust the thickness of the line */
}

/* Specific colors for online and offline status */
.card-icon-online::before {
    background-color: green; /* Color for online */
}

.card-icon-offline::before {
    background-color: red; /* Color for offline */
}

/* Icon styling */
.status-icon {
    font-size: 18px; /* Adjust the size of the icons */
    margin-left: 10px;
}

/* Ensuring the .card-divider class handles layout */
.card-divider {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.card-right {
    flex: 1;
    text-align: left;
    padding-left: 16px;
}

.sensor-cards,
.gps-cards,
.switch-cards,
.met-cards,
.batmon-cards,
.ws-cards,
.device-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.device-card {
    /* background-color: #fff; */
    border-radius: 4px;
    padding: 16px;
    width: 330px;
    /* Adjusted shadow for better visibility on both themes */
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.15),  /* Slightly darker shadow for light theme */
        0 0 0 1px rgba(255, 255, 255, 0.06); /* Light border glow for dark theme */
    font-size: 14px;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.device-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12), 0 6px 20px rgba(0, 0, 0, 0.03);
}

.device-card-header {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 4px 4px 0 0;
}

/* Status-based header colors */
.device-card.online .device-card-header {
    background-color: #4CAF50; /* Material Green 500 */
    color: #fff;
}

.device-card.offline .device-card-header {
    background-color: #F44336; /* Material Red 500 */
    color: #fff;
}

.device-card.unknown .device-card-header {
    background-color: #B0BEC5; /* Material Blue Gray 200 */
    color: #fff;
}

.device-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.2;
}

.device-card-header .refresh-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 14px;
    padding: 6px 12px;
    background-color: #e0e0e0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.device-card-header .refresh-btn:hover {
    background-color: #d5d5d5;
    transform: scale(1.1);
}

.device-card-header .last-update {
    font-size: 12px;
    margin-top: 8px;
    line-height: 1.5;
    display: block;
    opacity: 0.7;
}

.device-card.online .device-card-header .last-update,
.device-card.offline .device-card-header .last-update,
.device-card.unknown .device-card-header .last-update {
    color: #fff;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.dot {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    display: inline-block;
}

.dot.green {
    background-color: #4CAF50;
}

.dot.red {
    background-color: #F44336;
}

.dot.gray {
    background-color: #B0BEC5;
}

.status-text {
    font-size: 14px;
    font-weight: 500;
    color: #757575;
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #212121;
    margin-bottom: 6px;
    line-height: 1.5;
}

.info-item .label {
    color: #757575;
    flex: 1;
    text-align: left;
}

.info-item .value {
    color: #757575;
    flex: 1;
    text-align: right;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 8px;
}

.token-hidden {
    font-family: 'Roboto Mono', monospace;
    color: #757575;
}

.show-token-btn {
    font-size: 12px;
    padding: 4px 12px;
    background-color: #e0e0e0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    color: #212121;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.show-token-btn:hover {
    background-color: #d5d5d5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

hr {
    border: 0;
    border-top: 1px solid #aaaaaa;
    margin: 6px 0;
    width: 100%;
}

.device-card-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
}

/* .device-card-footer button {
    font-size: 14px;
    padding: 8px 16px;
    background-color: #e0e0e0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    color: #212121;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
} */

.device-card-footer button:hover {
    background-color: #d5d5d5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Device Modal Styles for Device Token */
.device-modal {
    display: none;
    position: fixed;
    /* z-index: 1; */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.device-modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

.device-modal-content h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 500;
}

.token-value {
    font-family: 'Roboto Mono', monospace;
    color: #212121;
    word-break: break-all;
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
}

.standard-btn {
    padding: 4px 10px;
    background-color: #e0e0e0;
    color: #212121;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 200;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}


/* General styling for notification tab panes */
.notification-tab-pane .row {
    margin: 0;
}
.notification-tab-pane .col-md-6 {
    padding: 15px;
}
.notification-tab-pane .empty-panel {
    min-height: 100px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

/* Toggle switch styling */
* Toggle section styling specific to device cards */
.toggle-section {
    margin: 10px 0;
}
.toggle-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}
.toggle-label {
    width: 130px;
    margin-bottom: 0;
    font-weight: 500;
    color: #757575;
    text-align: left;
    white-space: nowrap;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #28a745;
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.slider.round {
    border-radius: 24px;
}
.slider.round:before {
    border-radius: 50%;
}

/* Responsive adjustments for card toggles */
@media (max-width: 767.98px) {
    .toggle-row {
        gap: 10px;
        margin-bottom: 8px;
    }
    .toggle-label {
        width: 80px;
    }
}
/* End of Toggle Switch Styling */
