.cursor {
    cursor: pointer !important;
}

html, body {
  overflow-x: hidden;
}

.spinner-border {
    width: 4rem;
    height: 4rem;
}

.w-10 {
    width: 10%;
}

.grid-list-link {
    text-decoration: none !important;
    color: inherit;
    transition: color 0.3s ease;
}

.grid-list-link:hover {
    color: #007BFF;
}

.card {
    border-color: #878787; 
    color: #1C2A35; 
    border-radius: 12px;
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.15); 
    transition: box-shadow 0.3s ease;
    margin-left: 120px;
}

.card:hover {
    box-shadow: 0px 12px 30px rgba(0, 0, 0, 0.2);
}


.disable-text-select {
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.scrollable-dropdown {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #007BFF;
    padding: 0.8rem;
    border-radius: 6px;
    background-color: #FFFFFF;
}

#hint_id_password1 ul,
#hint_id_password2 {
    color: #A0AEC0;
}

.no-shadow {
    box-shadow: none !important;
}

.align-vcenter {
    display: flex;
    align-items: center;
}

.navbar {
    background-color: #0056B3;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.25);
}

.navbar-brand,
.nav-link {
    color: #ffffff !important;
    border-color: transparent !important;
    transition: color 0.3s ease;
}

.navbar-brand:hover,
.nav-link:hover {
    color: #ADD8E6 !important;
}

html,
body {
    background-color: #f5f5f5 !important;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: #1C2A35;
    line-height: 1.6;
    height: 100% !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

@font-face {
    font-family: 'Inter';
    src: url('/static/base/fonts/Inter-Regular.ttf') format('truetype');
}

.custom-blue-btn {
    background-color: #0056B3; 
    border-color: #0056B3;
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.custom-blue-btn:hover {
    background-color: #003A74;
    color: #FFFFFF;
}

.custom-white-btn {
    background-color: #FFFFFF;
    border-color: #007BFF;
    color: #007BFF;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.custom-white-btn:hover {
    background-color: #007BFF;
    color: #FFFFFF;
}

.btn-danger,
.btn-cancel {
    padding: 12px 20px !important;
    border-radius: 6px !important;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.section-header {
    background-color: #007BFF;
    color: #FFFFFF;
    padding: 14px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}

.section {
    background-color: #FFFFFF;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.card-header {
    background-color: #007BFF;
    color: #FFFFFF;
    padding: 12px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    font-size: 1.2rem;
    font-weight: 500;
}

.btn-edit,
.btn-cancel,
.btn-danger {
    min-width: 110px;
    max-width: 130px;
    font-size: small;
}

.sidebar {
    width: 220px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: #2c3e50;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
}

.content-container {
    max-width: calc(100vw - 220px);
    margin-left: 220px;
    padding: 0 20px;
    box-sizing: border-box;
}

.pagination-container {
    margin-left: 220px;
    margin-right: auto;
    width: calc(100% - 220px);
}

.page-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .sidebar {
        left: -250px;
        height: 100%;
    }

    .sidebar.active {
        left: 0;
        z-index: 1050;
    }

    .content {
        margin-left: 0;
    }

    .card {
        margin: auto;
        width: 100%; 
    }
    .btn-edit,
    .btn-cancel,
    .btn-danger {
    min-width: 30px!important;
    max-width: unset!important;
    margin-bottom: 8px;
    font-size: small;
    }
}

.content {
    margin-left: 250px;
    transition: margin-left 0.3s ease-in-out;
}


body.dark-mode {
    background-color: #121212 !important;
    color: #E0E0E0 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    min-height: 100vh; 
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #FFFFFF !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
}


body.dark-mode .sidebar {
    background-color: #181818 !important;
    color: #FFFFFF !important;
}


body.dark-mode .navbar {
    background-color: #1E1E1E !important;
    box-shadow: 0px 4px 15px rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .navbar-brand {
    color: #E0E0E0 !important;
    border-color: transparent !important;
    transition: color 0.3s ease;
}

body.dark-mode .nav-link {
    color: #ffffff !important;
    border-color: transparent !important;
    transition: color 0.3s ease;
}
body.dark-mode .nav-link.active{
    color: #ffffff !important;
    background-color:#1E1E1E !important;

}

body.dark-mode textarea::placeholder {
    color: #c5c5c5; 
    opacity: 1; 
}

body.dark-mode input::placeholder {
    color: #cccccc;
    opacity: 1; 
}

body.dark-mode ::-webkit-scrollbar {
    width: 12px;            
    height: 12px;            
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #272727 !important;      
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background-color: #7e7e7e !important;   
    border: 3px solid #272727 !important; 
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background-color: #bbbbbb !important;
}



body.dark-mode .navbar-brand:hover {
    color: #AAD4FF !important;
}

body.dark-mode .nav-link:hover {
    color: #AAD4FF !important;
}

body.dark-mode #analyticsTab .nav-link{
    background-color: #181818!important;

}

body.dark-mode #analyticsTab .nav-item .nav-link.active {
    background-color:#2b2b2b !important;

}
body.dark-mode .modal-body {
    color: #ffffff;
    background-color: #181818;
}

body.dark-mode .modal-header {
    background-color: #1c1c1c;
}
body.dark-mode .modal-footer {
    background-color: #1c1c1c;
}

body.dark-mode .user-profile {
    background-color:#2b2b2b !important;
}

/* Cards */
body.darkmode .summary-cards {
    background-color:#181818 !important;
}

body.darkmode .summary-card {
    background-color:#0e0e0e !important;
}

body.darkmode .advanced-filters {
    background-color: rgb(29, 29, 29)!important;
}

body.dark-mode .card-body {
    background-color:#2b2b2b !important;
}

body.body.dark-mode .card {
    background-color: #1E1E1E !important;
    border-color: #333333 !important;
    color: #E0E0E0 !important;
    box-shadow: 0px 6px 20px rgba(255, 255, 255, 0.03) !important;
}

body.dark-mode .card:hover {
    box-shadow: 0px 12px 30px rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .card-header {
    color: #FFFFFF !important;
}

body.dark-mode .card-box {
    background-color: #1E1E1E !important;
    color: #E0E0E0 !important;
    box-shadow: 0px 6px 20px rgba(255, 255, 255, 0.03) !important;
    border-radius: 12px;
}

body.dark-mode .device-card {
    background-color: #343a40;
    border-color: #495057 !important;
    color: #f8f9fa;
}

body.dark-mode .device-card .text-primary {
    color: #238bfb !important;
}

body.dark-mode .device-card:hover {
    box-shadow: 0 3px 0 #0a58ca !important;
}
body.dark-mode .exam-card:hover {
    border-color: #0a58ca !important;
    box-shadow: 0 3px 0 #0a58ca !important;
}
body.dark-mode .no-images{
    color: white !important;
}
body.dark-mode .image-info{
    background: #0e0e0e !important;

}

body.dark-mode .stats {
    color: #027cff !important;
}



body.dark-mode .section {
    background-color: #1F1F1F !important;
    color: #E0E0E0 !important;
}

body.dark-mode .section-header {
    background-color: #2A2A2A !important;
    color: #FFFFFF !important;
}

body.dark-mode .text-muted {
    color: #e3e3e3 !important;
}


body.dark-mode .scrollable-dropdown {
    background-color: #1E1E1E !important;
    color: #E0E0E0 !important;
    border-color: #333333 !important;
}

body.dark-mode .dropdown-menu {
    background-color: #1F1F1F !important;
    color: #E0E0E0 !important;
}

body.dark-mode .dropdown-item:hover {
    background-color: #333333 !important;
    color: #FFFFFF !important;
}

body.dark-mode .mb-1 {
    color: #FFFFFF !important;
}

body.dark-mode .strong {
    color: #ffffff !important;
}

body.dark-mode .list-group-item {
    background-color: #1f1f1f;
}

body.dark-mode .animal-item {
    background-color: #2b2b2b !important;
    border-color: #495057;
    color: #f8f9fa;
}

body.dark-mode .animal-item:hover {
    background-color: #4b4b4b !important; 
}

body.dark-mode .no-animals {
    background-color: #2b2b2b !important; 
}

body.dark-mode .me-2 {
    color: #f1f1f1;
}

body.dark-mode .table-box,
body.dark-mode .table {
    background-color: #1F1F1F !important;
    color: #E0E0E0 !important;
}

body.dark-mode thead {
    background-color: #2C2C2C !important;
}

body.dark-mode th,
body.dark-mode td {
    color: #E0E0E0 !important;
    border-bottom: 1px solid #333333 !important;
}
body.dark-mode th{
    background-color: #181818 !important;
}

body.dark-mode .custom-blue-btn {
    background-color: #0056B3 !important;
    color: #FFFFFF !important;
}

body.dark-mode .custom-blue-btn:hover {
    background-color: #003A74 !important;
}

body.dark-mode .custom-white-btn {
    background-color: transparent !important;
    border-color: #66B2FF !important;
    color: #66B2FF !important;
}

body.dark-mode .custom-white-btn:hover {
    background-color: #66B2FF !important;
    color: #FFFFFF !important;
}

body.dark-mode .btn-danger,
body.dark-mode .btn-cancel {
    color: #FFFFFF !important;
}
body.dark-mode .btn-outline-secondary {
    color: #E0E0E0;
}

body.dark-mode .btn-close {
    filter: invert(1); 
}
body.dark-mode #hint_id_password1 ul,
body.dark-mode #hint_id_password2 {
    color: #A0A0A0 !important;
}

body.dark-mode .iot-header,
body.dark-mode .table-box,
body.dark-mode .chart-container,
body.dark-mode .info-container {
    background-color: #1E1E1E !important;
    color: #E0E0E0 !important;
    box-shadow: 0px 6px 20px rgba(255, 255, 255, 0.03) !important;
}
body.dark-mode .chart-wrapper {
  background-color: #1e1e1e !important;

}

body.dark-mode .page-link{
    background-color: #1E1E1E !important;
    color: #e8e8e8 !important;

}


body.dark-mode .iot-header {
    background-color: #2A2A2A !important;
}

body.dark-mode table.table,
body.dark-mode table.table tbody,
body.dark-mode table.table thead,
body.dark-mode table.table tr,
body.dark-mode table.table th,
body.dark-mode table.table td {
    background-color: #1F1F1F !important;
    color: #E0E0E0 !important;
    border-color: #333333 !important;
}

body.dark-mode tbody tr:hover {
  background-color: #2e2e2e !important;
}

body.dark-mode section table.table {
    background-color: #1F1F1F !important;
    color: #E0E0E0 !important;
    border-collapse: collapse;
    width: 100%;
}

body.dark-mode section table.table thead {
    background-color: #2C2C2C !important;
}

body.dark-mode section table.table th,
body.dark-mode section table.table td {
    border-bottom: 1px solid #333333 !important;
    color: #E0E0E0 !important;
    padding: 0.5rem 1rem;
}

body.dark-mode section {
    background-color: #1F1F1F !important;
    color: #E0E0E0 !important;
}

body.dark-mode table,
body.dark-mode .table-box {
    background-color: #1F1F1F !important;
    color: #E0E0E0 !important;
}

body.dark-mode th,
body.dark-mode td {
    border-bottom: 1px solid #333333 !important;
    color: #E0E0E0 !important;
}

body.dark-mode .select-device {
    background-color: #141414 !important;
    border: 1px solid #333333 !important;
    color: #E0E0E0 !important;
}

body.dark-mode .card,
body.dark-mode .chart-container{
    background-color: #2b2b2b !important;
    box-shadow: 0px 6px 20px rgba(255, 255, 255, 0.03) !important;
    border: #000000 ;
}

body.dark-mode .overview-container{
    background-color: #171717!important;
}
body.dark-mode .overview-label{
    color: #9e9e9e!important;
}
body.dark-mode .group-overview-box{
    background-color: #212121!important;
    color: #f5f5f5;
    border: 1px solid #000000;
}
body.dark-mode .group-overview-info{
    background-color: #2C2C2C !important;
    color: #f5f5f5;
}
body.dark-mode .group-overview-title{
    color: #f5f5f5;
}
body.dark-mode .group-overview-selects{
    color: #f8f9fa;
}
body.dark-mode .dropdown-item{
    color: #f5f5f5;
}

.body-darkmode.hero-section{
    background-color: #181818!important;
}

body.dark-mode label,
body.dark-mode .form-label {
    color: #f8f9fa !important;
}
body.dark-mode .form-control {
    color: #f8f9fa !important;
    background-color: #303030;
}

body.dark-mode .form-select {
  background-color: #303030;
  color: #f8f9fa !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23f8f9fa'%3E%3Cpath d='M7.247 11.14 2.451 5.658a.5.5 0 0 1 .753-.657L8 9.792l4.796-4.79a.5.5 0 0 1 .708.707l-4.796 4.79a.5.5 0 0 1-.707 0z'/%3E%3C/svg%3E");
}

body.dark-mode .fa-shield-alt{
    color: #111111 !important;

}
/* Move effect for analytics dropdowns */

.accordion-button:focus, .accordion-button:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    z-index: 2;
    transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1);
}
body.dark-mode .accordion-button:focus, body.dark-mode .accordion-button:hover {
    box-shadow: 0 4px 16px rgba(255,255,255,0.08);
}

body.dark-mode .accordion-button {
    background-color: #23272b !important;
    color: #E0E0E0 !important;
    border-color: #333 !important;
}

body.dark-mode .accordion-body .chart-canvas-container {
    background: #181b1f !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255,255,255,0.04);
    padding: 16px;
}
body.dark-mode .accordion-body .chart-canvas {
    background: #23272b !important;
    color: #E0E0E0 !important;
    border-radius: 6px;
}

body.dark-mode .accordion-item,
body.dark-mode .accordion-body {
    background: #181b1f !important;
    color: #E0E0E0 !important;
    border-color: #23272b !important;
}
body.dark-mode .accordion-item {
    border-radius: 10px;
    border: 1px solid #23272b !important;
    margin-bottom: 10px;
}
body.dark-mode .accordion-body * {
    color: #E0E0E0 !important;
}

body.dark-mode .accordion-body select,
body.dark-mode .accordion-body option {
    background: #23272b !important;
    color: #E0E0E0 !important;
    border: 1px solid #333 !important;
}
body.dark-mode .accordion-body label {
    color: #E0E0E0 !important;
}

@media (max-width: 768px) {
    .content.active {
        margin-left: 250px;
    }

    .content {
        margin-left: 0;
    }
}

.login-container .alert,
.login-container .alert-danger,
.login-container .alert-block {
    width: 320px;
    max-height: 65px;
    padding: 2px;
    margin: 0px;
    margin-bottom: 8px;
}

.login-container .m-0 li {
    font-size: 0.80rem;
}

.card-login {
    width: 450px;
    height: 600px;
}

.login-container {
    margin-left: 100px;
}

.d-grid.gap-2 a.btn-primary {
    max-width: 250px;
    padding: 10px 15px;
    width: 100%;
    white-space: normal;
    margin: 0 auto;
    display: block;
}

@media (max-width: 768px) {
    .login-container {
        margin-left: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 20px;
        margin-top: 10px;
    }
    .content-container {
    max-width: unset;
    margin-left: unset;
    padding: 0 20px;
    box-sizing: border-box;
}

    .card-login {
        margin-top: 70px;
        max-width: 100%;
        height: auto;
        padding: 1.5rem !important;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }

    .card-login h2 {
        font-size: 1.5rem;
    }

    .card-login p {
        font-size: 0.9rem;
    }

    .btn {
        font-size: 0.9rem;
    }

    .login-container .alert,
    .login-container .alert-danger,
    .login-container .alert-block {
        width: 100%;
        max-width: 360px;
        max-height: 120px;
        padding: 10px;
        font-size: 0.85rem;
    }
}


.generic-search-container {
    position: relative;
    width: 250px;
}

.generic-search-container.custom-width {
    width: var(--search-width);
}

.generic-search-input {
    border-radius: 0.375rem;
    padding-right: 2.5rem;
    background-color: white;
    color: #212529;
}

body.dark-mode .generic-search-input {
    background-color: rgb(69, 69, 69) !important;
    color: #ffffff !important;
    border-color: #333;
}

body.dark-mode .generic-search-input::placeholder {
  color: #dedede; 
  opacity: 1; 
}

.generic-search-results {
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

body.dark-mode .generic-search-results {
    background: white;
    border: 1px solid #333;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
}

body.dark-mode .generic-search-results .list-group-item {
    background-color: white;
    color: #212529;
}

body.dark-mode .generic-search-results .list-group-item:hover {
    background-color: #f8f9fa;
}

.generic-search-results .list-group-item {
    border: none;
    border-radius: 0;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.generic-search-results .list-group-item:first-child {
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}

.generic-search-results .list-group-item:last-child {
    border-bottom-left-radius: calc(0.375rem - 1px);
    border-bottom-right-radius: calc(0.375rem - 1px);
}

.generic-search-results .list-group-item:hover,
.generic-search-results .list-group-item:focus {
    background-color: #f8f9fa;
}

.generic-search-results .list-group-item-action {
    color: #212529;
    text-decoration: none;
}

.generic-search-results .list-group-item-action:hover,
.generic-search-results .list-group-item-action:focus {
    background-color: #e9ecef;
}

.google-icon {
    width: 25px;
    height: 25px;
    object-fit: contain;
}


@media (max-width: 768px) {
    
    .iot-header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 10px;
    }

    
    .iot-header .header-main {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
    }
    .iot-header .header-title { width: 100%; }
    .iot-header .header-search { width: 100%; }

    
    .iot-header .header-actions,
    .iot-header .d-flex.align-items-center.gap-2,
    .iot-header .d-flex.align-items-center.gap-2.ms-auto {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0.5rem;
        margin-left: 0 !important;
    }

    
    .iot-header .header-search > .me-3,
    .iot-header .header-actions > .me-3,
    .iot-header .d-flex.align-items-center.gap-2 > .me-3,
    .iot-header .d-flex.align-items-center.gap-2.ms-auto > .me-3 {
        flex: 1 1 100%;
        margin-right: 0 !important;
    }

    
    .iot-header .generic-search-container {
        width: 100% !important;
    }
    .iot-header .generic-search-input {
        width: 100%;
    }

    
    .iot-header .header-title h1 {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    
    .iot-header #animalForm .form-group,
    .iot-header #experimentForm .form-group,
    .iot-header #cageForm .form-group {
        width: 100%;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.5rem;
    }

    
    .iot-header #animalForm .dropdown-select,
    .iot-header #animalForm .form-select,
    .iot-header #animalForm select,
    .iot-header #experimentForm .dropdown-select,
    .iot-header #experimentForm .form-select,
    .iot-header #experimentForm select,
    .iot-header #cageForm .dropdown-select,
    .iot-header #cageForm .form-select,
    .iot-header #cageForm select {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: 100%;
    }

    
    .iot-header #animalForm .btn,
    .iot-header #experimentForm .btn,
    .iot-header #cageForm .btn,
    .iot-header .btn.btn-primary,
    .iot-header .btn.btn-outline-primary {
        flex: 0 0 auto;
    }
}