body {
    font-family: sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.2;
}

body * {
    box-sizing: border-box;
}

/* Resetting bootrap defaults */
.container,
.container-fluid,
.row,
.col {
    padding: 0px;
    margin: 0px;
}

.row > * {
    padding-left: 0px;
    padding-right: 0px;
}
.col > * {
    margin-left: 0px;
    margin-right: 0px;
}

:root {
    --bs-border-radius: 4px; /* New primary color */
    --primary-background: #fff;
    --primary-gray: #ddd;
    --secondary-gray: #ccc;
    --border-color: #ccc;
    --border-color-dark: #bbb;
    --border-color-light: #ddd;
    --fill-color: #eee;
    --bs-table-bg: #eee;
    --black-muted: #666;
}

.pagination {
    --bs-pagination-color: #777;
    --bs-pagination-focus-color: #ccc;
    --bs-pagination-active-bg: var(--fill-color);
    --bs-pagination-active-border-color: var(--border-color);
    --bs-pagination-active-color: #777;
    --bs-pagination-focus-box-shadow: none;
    --bs-pagination-disabled-bg: #fafafa;
}

.pagination .page-link:hover {
    color: #777;
}

.pagination button {
    border-radius: 0px;
}

.form-control:focus {
    box-shadow: 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.toast {
    --bs-toast-bg: #fff;
}

/* General table styling */
table {
    width: 100%; /* Make table width 100% */
    border-collapse: collapse; /* Collapse borders */
    margin: 20px 0; /* Add some margin */
}

/* Table header styling */
th,
td {
    border: 1px solid var(--border-color); /* Add border */
    padding: 8px; /* Add padding */
    text-align: left; /* Align text to the left */
    word-wrap: break-word; /* Break words if they are too long */
}

/* Set table headers and cells to occupy 50% of the width */
th,
td {
    border: 1px solid var(--border-color);
}

th {
    background: #eee;
}

img {
    vertical-align: unset;
}
#main {
    flex-grow: 1;
}

.container {
    display: flex;
    flex-direction: row;
    width: 100%;
    margin: 0px;
    padding: 0px;
    max-width: unset !important;
}

.panel {
    border-radius: 4px;
    /* border: 1px solid #ddd; */
    padding: 16px;
}

.icon {
    color: #999;
}

.header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header h1 {
    margin: 0;
    font-size: 24px;
}

.header .search-bar {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.left-column {
    display: flex;
    flex-direction: column;
    min-width: 250px;
    gap: 16px;
    padding: 16px;
}
#modules.left-column {
    padding: 0px;
}
.left-column .modules-list {
    display: flex;
    flex-direction: column;
}

.left-column .modules-list .module {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* border-bottom: 1px solid lightgrey; */
}
.left-column .modules-list .module .item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
}

.left-column .modules-list .module .item a {
    text-decoration: none;
}

.left-column .modules-list .module:hover {
    background-color: #eee;
    cursor: pointer;
}

.left-column .modules-list .module .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    color: #999;
}

.left-column .modules-list .module .label {
    font-size: 16px;
    color: #333;
}

.right-column {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 16px;
    padding: 16px;
    border-left: 1px solid #ddd;
}

.right-column .profile {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: #fff;
    border-radius: 4px;
}
.text-direction {
    writing-mode: vertical-lr;
    text-orientation: upright;
}
#navbar {
    border-bottom: 1px solid #ddd;
}

#navbar .app-name {
    text-transform: uppercase;
    padding-left: 5px;
    font-weight: bold;
    font-size: 18px;
}

#navbar .right-column {
    border: none;
    flex-direction: row-reverse;
    gap: 15px;
}

#navbar .right-column a,
a:hover {
    text-decoration: none;
    display: inline-block;
}

#navbar .right-column a.navitem {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    align-items: center;
}

#navbar .right-column i {
    margin-right: 5px;
}

#view.right-column {
    padding: 32px;
}

#view.right-column .page-name {
    font-size: 1.5em;
    font-weight: bold;
}

#navbar .username {
    padding-left: 16px;
    padding-right: 16px;
}

#navbar .dropdown-menu {
    margin-top: 4px !important;
    border-radius: 4px;
}

.dropdown-menu {
    padding: 0px;
}

.dropdown-menu > li > a,
.dropdown-menu > li > div {
    padding: 8px 16px;
}

.dropdown-menu > li > hr.dropdown-divider {
    margin: 0px;
}

.dropdown-item:focus,
.dropdown-item:hover {
    background-color: #eee;
    color: inherit;
}

.left-column .module-group-name {
    padding: 0px 16px;
    font-weight: bold;
    font-size: 0.9rem;
}
footer {
    position: fixed;
    bottom: 0;
}
.navdropdown {
    display: flex;
    align-items: center;
}

.uitable {
    width: 100%;
    /* margin-bottom: 1rem; */
    vertical-align: top;
    border-color: #dee2e6;
}
.uitable > thead,
.uitable th {
    vertical-align: bottom;
    color: rgb(109 119 127);
    /* background-color: rgb(33 37 41 / 4%); */
}
.uitable > tbody {
    vertical-align: inherit;
}
.uitable > :not(caption) > * > * {
    padding: 0.5rem 0.5rem;
    border-bottom-width: 1px;
}

a.wrapper {
    display: flex;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

a.wrapper:hover {
    text-decoration: none;
    color: inherit;
}

#navbar .left-column a.wrapper {
    gap: 16px;
}

.app-icon {
    display: flex;
}

.app-icon img {
    width: 1.2em;
    height: 1.2em;
    opacity: 0.5;
    align-self: center;
}

button,
select {
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 5px 10px;
    line-height: 1;
    font-size: medium;
    padding: 0.5rem 1rem;
}

.btn.action {
    border-color: var(--border-color);
    background-color: var(--fill-color);
}
.btn.action:hover {
    border-color: var(--border-color);
    background-color: var(--fill-color);
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.page-name {
/*    flex-grow: 1;*/
}

.page-options {
    display: flex;
    gap: 15px;
    flex-wrap: nowrap;
}
.page-options .filter-options,
.page-options .advanced-options,
.page-options form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.flex-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.flex-group > * {
    flex: 1 1 0;
}

.form-buttons {
    margin-top: 15px;
    display: flex;
    gap: 15px;
}

.fir-input-group input,
.fir-input-group select {
    background-color: #fff;
    border-color: var(--border-color);
}
.fir-results {
    margin-top: 30px;
}
.fir-results .table-responsive {
    border: none;
}

a.fir-link {
    text-decoration: none;
}
a.fir-link:hover {
    text-decoration: underline;
}

.fir-identifier {
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--black-muted);
}

.fir-details a.nav-link {
    color: var(--black-muted);
}
#topCharts {
    flex-wrap: wrap;
}
.dashboard-chart {
    height: 375px;
    display: flex;
    padding: 15px;
    justify-content: space-between;
}

.chart-title {
    font-weight: bold;
    color: var(--black-muted);
    text-align: center;
}
.dashboard-chart.cases-line {
    flex-grow: 2;
    flex-shrink: 2;
    flex-basis: 400px;
}
.dashboard-chart.cases-pie {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 200px;
    min-width: 350px;
}

.chart-canvas {
    flex-grow: 1; /* Grow if there's extra space */
    flex-shrink: 1; /* Shrink if the content is larger than the available space */
    flex-basis: 0; /* Start with equal distribution */
    justify-content: center;
    align-items: center;
    align-content: center;
    display: flex;
}

.cases-pie .chart-canvas {
    padding: 15px;
}
.cases-pie .chart-canvas > canvas {
    max-width: 300px;
    max-height: 300px;
}

.mobile.icon {
    display: none;
    cursor: pointer;
}

/*For mobile */
@media screen and (max-width: 800px) {
    #view.right-column {
        padding: 16px;
    }
    #main .container {
        flex-direction: column;
    }

    #main .left-column {
        width: 100%;
        display: none;
    }

    #main .right-column {
        width: 100%;
    }

    #navbar .left-column {
        flex-grow: 1;
    }
    #navbar .right-column {
        width: 100%;
        padding: 20px;
    }
    .fir-input-group {
        min-width: 100%;
    }

    .fir-results .table {
        min-width: 800px;
    }

    .table-responsive table {
        min-width: 800px;
    }

    #navbar .left-column a.wrapper
    {
        margin: auto;
    }

    /*Nav bar for mobile */
    .mobile.icon {
        display: flex;
        align-items: center;
        padding-left: 24px;
        padding-right: 24px;
    }


    #modules {
        width: 100%;
        display: none;
    }

    #navbar .right-column {
        background: rgb(255, 255, 255);
        position: absolute;
        flex-direction: column-reverse;
        right: 0px;
        z-index: 1099;
        align-items: baseline;
        width: 100%;
        top: 60px;
        display: none;
    }

    #navbar .right-column .icon, #navbar .right-column a.navitem
    {
        display: flex;
        gap: 16px;
    }

    #navbar .right-column .icon.dropdown-toggle::after
    {
        align-self: center;
    }
}
