﻿
:root{

    --sidebar-width: 340px;
    --sidebar-bg: var(--bs-primary, #003366);
    --sidebar-hover: var(--bs-secondary, #eaaa00);
    --sidebar-hover-light: rgba(234, 170, 0, 0.15);
    --sidebar-text: #ffffff;
    --sidebar-text-muted: rgba(255, 255, 255, 0.7);
    --sidebar-border: rgba(255, 255, 255, 0.12);
}

body:has(.dashboard) .footer,
body:has(.dashboard) footer.footer,
body:has(.dashboard) .footer-cta,
body:has(.dashboard) .footer-top,
body:has(.dashboard) .footer-bottom {
    display: none !important;
}

body:has(.dashboard) nav.policy-navbar,
body:has(.dashboard) nav.navbar.primary_nav {
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width)) !important;
}

.dashboard {
    display: block;
    min-height: 100vh;
    position: relative;
    width: 100%;
    padding-left: var(--sidebar-width);
    box-sizing: border-box;
}

.dashboard__sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: hsl(from var(--bs-primary) h s calc(l * .6));
    color: #fff;
    z-index: 1100;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--bs-white);
    /* padding: 0 !important; */
}

    .dashboard__sidebar .mud-select.mud-autocomplete, .dashboard__sidebar .mud-select {
        max-height: 41px;
        margin: 0px;
        margin-bottom: 0.45em;
    }

        .dashboard__sidebar .mud-select.mud-autocomplete input, .dashboard__sidebar .mud-select input {
            font-size: 14px;
        }

.dashboard__sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--sidebar-border);
    min-height: 56px;
    background-color: rgba(0, 0, 0, 0.15);
}

.dashboard__sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--sidebar-hover);
}

.dashboard__sidebar-toggle {
    display: none;
}

.dashboard__sidebar-controls {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--sidebar-border);
    background-color: rgba(0, 0, 0, 0.05);
}

    .dashboard__sidebar-controls .mud-input-control {
        margin-bottom: 0.5rem;
    }

    .dashboard__sidebar-controls .mud-input-outlined .mud-input-outlined-border {
        border-color: rgba(255, 255, 255, 0.4) !important;
    }

    .dashboard__sidebar-controls .mud-input {
        color: #fff !important;
        background-color: red;
    }

    .dashboard__sidebar-controls .mud-select .mud-input-slot {
        color: #fff !important;
    }

    .dashboard__sidebar-controls .mud-input-adorned-end .mud-icon-button {
        color: rgba(255, 255, 255, 0.7) !important;
    }

.dashboard__sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0;
}

    .dashboard__sidebar-nav::-webkit-scrollbar {
        width: 4px;
    }

    .dashboard__sidebar-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    .dashboard__sidebar-nav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }

        .dashboard__sidebar-nav::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.5);
        }
.dashboard__sidebar .mud-treeview {
/*    padding: 0.25rem 0.5rem;*/
}

.dashboard__sidebar .mud-treeview-item-content {
    padding: 4px 2px;
    border-radius: 4px;
/*    margin: 1px 0.375rem;*/
    border-left: 3px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.dashboard__sidebar .mud-treeview-item .mud-treeview-item .mud-treeview-item-content {
    padding: 4px 2px;
}

.dashboard__sidebar .mud-treeview-item-content:hover {
    background-color: var(--bs-secondary, #eaaa00);
    border-left-color: var(--sidebar-bg);
}

    .dashboard__sidebar .mud-treeview-item-content:hover .mud-treeview-item-label {
        color: var(--bs-white);
    }

    .dashboard__sidebar .mud-treeview-item-content:hover .mud-treeview-item-icon {
        color: var(--bs-white) !important;
    }


.dashboard__sidebar .mud-treeview-item-selected > .mud-treeview-item-content,
.dashboard__sidebar .mud-treeview.mud-treeview-selected-primary .mud-treeview-item-content.mud-treeview-item-selected {
    background-color: var(--bs-secondary, #eaaa00) !important;
    border-left:0px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

    .dashboard__sidebar .mud-treeview-item-selected > .mud-treeview-item-content .mud-treeview-item-label,
    .dashboard__sidebar .mud-treeview.mud-treeview-selected-primary .mud-treeview-item-content.mud-treeview-item-selected .mud-treeview-item-label {
        color: var(--bs-white) !important;
        font-weight: 400;
    }

    .dashboard__sidebar .mud-treeview-item-selected > .mud-treeview-item-content .mud-treeview-item-icon,
    .dashboard__sidebar .mud-treeview.mud-treeview-selected-primary .mud-treeview-item-content.mud-treeview-item-selected .mud-treeview-item-icon {
        color: var(--sidebar-bg) !important;
    }


.dashboard__sidebar .mud-treeview-item-expanded > .mud-treeview-item-content {
    background-color: rgba(234, 170, 0, 0.25);
    border-left-color: var(--bs-secondary, #eaaa00);
}

    .dashboard__sidebar .mud-treeview-item-expanded > .mud-treeview-item-content .mud-treeview-item-label {
        color: var(--bs-secondary, #eaaa00) !important;
        font-weight: 400;
    }

    .dashboard__sidebar .mud-treeview-item-expanded > .mud-treeview-item-content .mud-treeview-item-icon {
        color: var(--bs-secondary, #eaaa00) !important;
    }

    .dashboard__sidebar .mud-treeview-item-expanded > .mud-treeview-item-content .mud-treeview-item-arrow {
        color: var(--bs-secondary, #eaaa00) !important;
    }


.dashboard__sidebar .mud-icon-size-medium {
    font-size: 0.98em;
}

.dashboard__sidebar .mud-treeview-item-icon > span {
    font-size: 0.85em;
}

.dashboard__sidebar .mud-treeview-item-label {
    color: var(--sidebar-text);
    font-size: 12px;
    transition: color 0.2s ease;
}

.dashboard__sidebar .mud-treeview-item-icon {
    color: var(--sidebar-text-muted);
    min-width: 1em;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.dashboard__sidebar .mud-treeview-item-arrow {
    color: var(--sidebar-text-muted) !important;
    transition: color 0.2s ease, transform 0.2s ease;
    min-height: 26px;
}

    .dashboard__sidebar .mud-treeview-item-arrow:hover {
        color: var(--sidebar-hover) !important;
    }


.sidebar__footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.75rem;
    padding-bottom: 0px;
    background-color: hsl(from var(--bs-primary) h s calc(l * .4));
    border-top: 1px solid var(--sidebar-border);
    z-index: 10;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
}

    /* Add School button styling */
    .sidebar__footer .mud-button-outlined {
        color: var(--bs-white) !important;
        border-color: var(--sidebar-hover) !important;
        font-weight: 400;
        transition: all 0.2s ease;
        font-size: 12px;
        padding: 7px;
        margin-bottom: -10px;
    }

        .sidebar__footer .mud-button-outlined:hover {
            background-color: var(--sidebar-hover) !important;
            color: var(--bs-white) !important;
            border-color: var(--sidebar-hover) !important;
            transition: all 0.2s ease;
            font-size: 12px;
            padding: 7px;
            margin-bottom: -10px;
        }

    /* Checkbox styling - Show Deleted / Show All */
    .sidebar__footer .mud-input-control-boolean-input .mud-checkbox .mud-typography {
        color: #ffffff !important;
        font-size: 0.8125rem;
    }

    .sidebar__footer .mud-input-control-boolean-input .mud-checkbox .mud-icon-root {
        color: #ffffff !important;
    }

    .sidebar__footer .mud-input-control-boolean-input .mud-icon-button {
        color: #ffffff !important;
    }

    .sidebar__footer .mud-input-control-boolean-input .mud-input-control-input-container label {
        margin-bottom: 0px!important;
    }


    .dashboard__sidebar > div:has(.mud-treeview) {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 140px;
    }


.dashboard__content {
    display: block;
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #f8f9fa;
/*    padding:0.1rem;*/
    box-sizing: border-box;
}
    .dashboard__content .mud-container {
        max-width: 100%;
        padding: 0;
    }

@media (max-width: 992px) {
    :root {
        --sidebar-width: 220px;
    }
}

@media (max-width: 768px) {
    .dashboard {
        padding-left: 0;
    }

    .dashboard__sidebar {
        position: relative;
        top: 0;
        width: 100%;
        height: auto;
        max-height: 50vh;
    }

    .dashboard__content {
        width: 100%;
    }

    body:has(.dashboard) header,
    body:has(.dashboard) .header,
    body:has(.dashboard) .primary_nav,
    body:has(.dashboard) .secondary_nav,
    body:has(.dashboard) .header-wrapper,
    body:has(.dashboard) .navbar,
    body:has(.dashboard) nav.navbar,
    body:has(.dashboard) .top-bar,
    body:has(.dashboard) .site-header {
        margin-left: 0 !important;
    }
}


/* === Notification Bell — Single Line === */
.dashboard__sidebar_notifications {
    display: flex !important;
    align-items: center !important;
    padding: 8px 12px !important;
    margin: 13px 0;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    width: 100%;
    border-radius: 3px;
    transition: background 0.2s ease;
    background-color: hsl(from var(--bs-primary) h s calc(l * .7));
}

    .dashboard__sidebar_notifications:hover {
        background-color: hsl(from var(--bs-primary) h s calc(l * .5));
    }

/* Hide MudAlert chrome if present */
.dashboard__sidebar_notifications .mud-alert-icon,
.dashboard__sidebar_notifications .mud-alert-action {
    display: none !important;
}

/* Inner wrapper — flex row */
.dashboard__sidebar_notifications .mud-alert-message,
.dashboard__sidebar_notifications .notification-inner {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    position: relative;
    width: 100%;
    padding: 0 !important;
}

/* Bell icon via ::before (Font Awesome) */
    .dashboard__sidebar_notifications .mud-alert-message::before,
    .dashboard__sidebar_notifications .notification-inner::before {
        content: "\f0f3";
        font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome";
        font-weight: 900;
        font-size: 18px;
        color: var(--bs-white);
        flex-shrink: 0;
        position: relative;
        background-color: var(--bs-primary);
        width: 30px;
        height: 30px;
        text-align: center;
        padding: 1px;
        border-radius:30px;
    }

/* Red notification dot on the bell */
    .dashboard__sidebar_notifications .mud-alert-message::after,
    .dashboard__sidebar_notifications .notification-inner::after {
        content: "";
        position: absolute;
        left: 21px;
        top: 0px;
        width: 10px;
        height: 10px;
        background: var(--bs-danger, #dc3545);
        border-radius: 50%;
        /* border: 2px solid #ffffff00;*/
}

/*/* Message text — single line, truncated */
    .dashboard__sidebar_notifications div div, .dashboard__sidebar_notifications .mud-alert-message div {
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
        font-weight: 600;
        color: var(--bs-white);
        line-height: 1.4;
    }