/*
 * Base structure
 */

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

.cover-container {
    flex: 1;
}

.cover-container > nav {
    flex: none;
}
.cover-container > .container-fluid {
    flex: 1 0 auto;
}
.cover-container > footer {
    flex: none;
}

/*
 * Navbar
 */
.navbar {
    min-height: 60px;
}

.localization-icons img {
    width: 21px;
    opacity: 0.3;
}

.localization-icons img:hover,
.localization-icons img.active {
    opacity: 1;
}

/**
 * Sidebar
 */

.list-group-borderless .list-group-item {
    border: 0 !important;
}

.list-group-borderless .list-group-item.active {
    color: #007bff;
    background-color: inherit;
    font-weight: bold;
}

.list-group-borderless .list-group-item i {
    color: #666;
    width: 25px;
}

.list-group-borderless .list-group-item.active i {
    color: #007bff;
}

/**
 * Social Buttons
 */
.btn-social:hover {
    opacity: 0.85;
    text-decoration: none;
}

.btn-facebook, .btn-facebook:hover {
    color: #3B5998;
}

.btn-twitter, .btn-twitter:hover {
    color: #55ACEE;
}

.btn-google, .btn-google:hover {
    color: #dd4b39;
}

/**
 * Login Page Form Wrapper
 */
.form-wrapper { display: none; }
.form-wrapper.active { display: block; }

/**
 * Misc
 */

.page-header small {
    font-size: 1rem;
}

.blockquote {
    font-size: 1rem;
}

.table th {
    font-size: 0.85rem;
    color: #666;
}

.dropdown-item i {
    color: #666;
}

label .required {
    color: #a00;
}

.table-responsive {
    min-height: 200px;
}

dt {
    font-weight: 400 !important;
}

dd {
    font-weight: 700;
}

/**
 * Responsive CSS Rules
 */

@media (min-width : 992px) {
    .table-responsive {
        overflow-x: visible;
    }
}

@media (max-width : 768px) {
    .list-group-borderless {
        margin-bottom: 20px;
    }

    .localization-icons {
        margin-top: 15px;
        margin-bottom: 10px;
        display: flex !important;
        justify-content: space-evenly;
    }
}
/**
 * App sidebar - after Bootstrap's "Sidebars" example (dark sidebar + collapsible btn-toggle
 * lists). Markup in templates/sidebar.php.
 */
:root {
    --app-sidebar-bg: #1b1f24;
    --app-sidebar-fg: rgba(255, 255, 255, .72);
    --app-sidebar-fg-strong: #fff;
    --app-sidebar-hover: rgba(255, 255, 255, .08);
    --app-sidebar-active: #0d6efd;
    --app-sidebar-muted: rgba(255, 255, 255, .4);
}

/* The sidebar carries the brand and user menu, so pages that have one drop the top navbar. */
body:has(#app-sidebar) .cover-container > .navbar {
    display: none;
}

#app-sidebar {
    background: var(--app-sidebar-bg);
    padding: 0;
    /* Cancels the content container's top padding so the sidebar starts at the very top. */
    margin-top: -1.5rem;
}

/* Breathing room between the sidebar and the page content. */
#app-sidebar ~ div {
    padding: 1.5rem 1.5rem 0;
    margin-top: -1.5rem;
}

.app-sidebar {
    padding: 1rem .75rem;
    color: var(--app-sidebar-fg);
}

.app-sidebar hr {
    border-color: rgba(255, 255, 255, .15);
    opacity: 1;
    margin: .75rem 0;
}

.app-sidebar-brand {
    color: var(--app-sidebar-fg-strong);
    gap: .6rem;
    padding: .25rem .5rem;
    min-width: 0;
}

.app-sidebar-brand:hover {
    color: var(--app-sidebar-fg-strong);
}

.app-sidebar-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: .5rem;
    background: var(--app-sidebar-active);
    color: #fff;
    flex: none;
}

.app-sidebar .nav-link,
.app-sidebar .btn-toggle {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    padding: .45rem .6rem;
    margin-bottom: 2px;
    border: 0;
    border-radius: .4rem;
    color: var(--app-sidebar-fg);
    background: transparent;
    font-size: .925rem;
    font-weight: 400;
    text-align: left;
    transition: background-color .15s ease, color .15s ease;
}

.app-sidebar .nav-link i.fa-fw,
.app-sidebar .btn-toggle i.fa-fw {
    color: var(--app-sidebar-muted);
    transition: color .15s ease;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link:focus,
.app-sidebar .btn-toggle:hover,
.app-sidebar .btn-toggle:focus {
    color: var(--app-sidebar-fg-strong);
    background: var(--app-sidebar-hover);
    box-shadow: none;
}

.app-sidebar .nav-link:hover i.fa-fw,
.app-sidebar .btn-toggle:hover i.fa-fw,
.app-sidebar .btn-toggle[aria-expanded="true"] i.fa-fw {
    color: var(--app-sidebar-fg-strong);
}

.app-sidebar .nav-pills .nav-link.active {
    color: #fff;
    background: var(--app-sidebar-active);
    font-weight: 500;
}

.app-sidebar .nav-pills .nav-link.active i.fa-fw {
    color: #fff;
}

.app-sidebar .btn-toggle[aria-expanded="true"] {
    color: var(--app-sidebar-fg-strong);
    font-weight: 500;
}

.sidebar-chevron {
    font-size: .65rem;
    color: var(--app-sidebar-muted);
    transition: transform .35s ease;
}

.btn-toggle[aria-expanded="true"] > .sidebar-chevron {
    transform: rotate(90deg);
}

/* Submenu items: indented, with a thin guide line like a tree. */
.sidebar-subnav {
    margin: 2px 0 6px 1.05rem;
    padding-left: .55rem;
    border-left: 1px solid rgba(255, 255, 255, .12);
}

.app-sidebar .sidebar-sublink {
    font-size: .85rem;
    padding-top: .35rem;
    padding-bottom: .35rem;
}

.sidebar-heading {
    list-style: none;
    margin: 1rem .6rem .35rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--app-sidebar-muted);
}

.app-sidebar .localization-icons img {
    opacity: .45;
}

.app-sidebar .localization-icons img:hover,
.app-sidebar .localization-icons img.active {
    opacity: 1;
}

.app-sidebar-user {
    color: var(--app-sidebar-fg-strong);
    gap: .6rem;
    padding: .35rem .5rem;
    border-radius: .4rem;
    min-width: 0;
}

.app-sidebar-user:hover {
    color: var(--app-sidebar-fg-strong);
    background: var(--app-sidebar-hover);
}

.app-sidebar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #6f42c1;
    color: #fff;
    font-weight: 600;
    flex: none;
}

/* Tablet and up: the menu is always open and the sidebar stays in view while the page scrolls. */
@media (min-width: 768px) {
    #appSidebarNav.collapse:not(.show) {
        display: flex;
    }

    .app-sidebar-nav {
        display: flex;
        flex-direction: column;
    }

    /* Pushes the language flags and user menu to the bottom. */
    .app-sidebar-nav > ul {
        flex: 1 0 auto;
    }

    .app-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, .2) transparent;
    }
}

.app-sidebar-collapse {
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    flex: none;
    color: var(--app-sidebar-muted);
    border: 0;
    border-radius: .4rem;
}

.app-sidebar-collapse:hover,
.app-sidebar-collapse:focus {
    color: var(--app-sidebar-fg-strong);
    background: var(--app-sidebar-hover);
}

/*
 * Collapsed sidebar (tablet and up; toggled by #appSidebarCollapse, remembered in localStorage):
 * a narrow icon rail, link names on hover, and the page content takes all the freed width.
 * Overrides the Bootstrap column classes every page uses (col-lg-2 col-md-3 / col-md-9 col-lg-10).
 */
@media (min-width: 768px) {
    .sidebar-collapsed #app-sidebar {
        flex: 0 0 4.25rem;
        width: 4.25rem;
        max-width: 4.25rem;
    }

    .sidebar-collapsed #app-sidebar ~ div {
        flex: 1 1 0;
        width: auto;
        max-width: none;
        min-width: 0;
    }

    .sidebar-collapsed .app-sidebar {
        padding-left: .5rem;
        padding-right: .5rem;
    }

    .sidebar-collapsed .app-sidebar-top {
        flex-direction: column;
        gap: .5rem;
    }

    .sidebar-collapsed .app-sidebar-brand {
        padding: .25rem 0;
    }

    .sidebar-collapsed .app-sidebar-collapse i {
        transform: rotate(180deg);
    }

    .sidebar-collapsed .sidebar-label,
    .sidebar-collapsed .sidebar-heading,
    .sidebar-collapsed .sidebar-chevron,
    .sidebar-collapsed .localization-icons,
    .sidebar-collapsed .app-sidebar-user.dropdown-toggle::after {
        display: none !important;
    }

    .sidebar-collapsed .app-sidebar .nav-link,
    .sidebar-collapsed .app-sidebar .btn-toggle,
    .sidebar-collapsed .app-sidebar-user {
        justify-content: center;
        position: relative;
        padding-left: 0;
        padding-right: 0;
    }

    /* Badges (e.g. cron problems) become a corner dot-count on the icon. */
    .sidebar-collapsed .app-sidebar .nav-link .badge {
        position: absolute;
        top: 0;
        right: 0;
        margin: 0 !important;
        font-size: .6rem;
    }

    /* Submenu icons line up under their group instead of being indented. */
    .sidebar-collapsed .sidebar-subnav {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, .12);
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }
}

/* Phones: the sidebar becomes a full-width bar with a "Menu" button. */
@media (max-width: 767.98px) {
    #app-sidebar ~ div {
        margin-top: 0;
        padding: 1rem;
    }
}
