html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a, .btn-link {
    color: #0071c1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.white-text {
    color: white;
}

.loading-indicator, .end-of-notes {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    text-decoration: underline;
    height: 50px; /* Adjust height as needed */
    font-size: 1.2em; /* Slightly larger font size */
    color: #333; /* Neutral dark color */
}

.validation-message {
    color: red;
}

.icon-padding {
    padding-right: 0.8rem;
}

.mud-expand-panel-content {
    padding: 0 !important; /* Ensure no padding inside the panel content */
}

/* Layout and Alignment */
.align-center,
.mud-height-full,
.badge-center,
.nav-item-content,
.nav-link,
.nav-link-group,
.note-icons,
.auth-section,
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-section {
    min-height: 100%;
    text-align: right;
    flex-direction: column;
    justify-content: center;
}

.logo-container {
    margin: 10px auto !important;
    height: 100px !important;
    text-align: center;
}

.navmenu-container {
    display: flex !important;
    flex-direction: column !important;
    margin-top: 25% !important;
}

.right-align {
    display: flex;
    justify-content: flex-end;
}

/* Navbar and Menu */
.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

.topnavbar,
.loginscreen,
.sidenavbar {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: bottom;
}

.topnavbar,
.loginscreen {
    background-image: radial-gradient(circle at left bottom, #650061 50%, rgba(35, 0, 165, 0) 100%), url(https://www.ultrasupport.co.uk/wp-content/uploads/2023/07/Ultra-Support-Home.jpeg);
}

.sidenavbar {
    background-image: radial-gradient(circle at top left, #650061 50%, rgba(35, 0, 165, 0) 100%), url(https://www.ultrasupport.co.uk/wp-content/uploads/2023/07/Ultra-Support-Home.jpeg);
    flex-direction: column;
    justify-content: flex-start;
}

.nav-menu {
    overflow-y: auto;
    text-overflow: ellipsis;
    margin-top: 33%;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.1rem;
}

.top-row {
    height: 3.5rem;
    background-color: rgba(0, 0, 0, 0.4);
}

.nav-item {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

    .nav-item:first-of-type {
        padding-top: 1rem;
    }

    .nav-item:last-of-type {
        padding-bottom: 1rem;
    }

.nav-link,
.nav-link-group {
    padding: 0.1rem 0.1rem;
    margin: 0.2rem 0;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

.nav-link-description {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    color: white;
}

.mud-nav-group-content {
    margin-left: 2rem;
}

.search-drawer {
    background-color: #650061;
    height: 85px;
    overflow: hidden;
    color: white;
}

.search-grid {
    width: 100%;
    height: 100%;
    align-items: center;
    padding-top: 10px;
}

.search-box {
    height: 100%;
    display: flex !important;
    align-items: center !important;
    color: white !important;
}

    .search-box .mud-input-root {
        height: 100%;
        flex-grow: 1;
        display: flex;
        align-items: center;
    }

    .search-box .mud-input-slot {
        flex: 1;
        width: 100%;
        box-sizing: border-box;
    }

.mud-input-adornment-start {
    margin-right: 8px;
}

/* Buttons and Forms */
.btn-primary {
    color: #fff;
    background-color: #9B4F96;
    border-color: #8A2BE2;
    transition: background-color 0.3s ease;
}

.valid.modified:not([type=checkbox]),
.invalid {
    outline: 1px solid;
}

.valid.modified:not([type=checkbox]) {
    outline-color: #26b050;
}

.invalid {
    outline-color: red;
}

.templated-response-button {
    background-color: #9b4f96;
    border: 1px solid #8A2BE2;
    height: auto;
}

    .templated-response-button .mud-button-label {
        color: #fff !important;
    }

.ql-snow.ql-toolbar button {
    width: fit-content !important;
}

/* Tables */
.mud-table-head {
    background-color: #C27BBF;
    border-radius: 12px;
    margin: 8px 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: white !important;
}

    .mud-table-head * {
        color: white;
    }

.mud-table-root .mud-table-head .mud-table-row {
    padding: 5px;
    width: 100px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mud-table-partner, .mud-table-enduser {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.mud-table-description {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.mud-table .mud-toolbar, .mud-table-toolbar {
    background-color: #9B4F96;
    color: white;
}

.mud-tablepager-left,
.mud-toolbar-gutters * {
    color: #fff;
}

.mudpaper-padding {
    padding: 15px;
}

/* Notes and Papers */

.note-body {
    width: 100%;
    height: 350px;
    overflow-y: scroll;
    margin-bottom: 30px;
}

.note-body-slideshow {
    height: calc(100vh - 300px);
}

.note-paper {
    width: 100%;
    height: 400px;
    max-height: 400px;
}

.note-row {
    height: 400px;
    box-sizing: border-box;
    margin: 0;
    overflow: hidden;
}

.note-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    margin-bottom: 1rem;
}

.note-outer {
    margin-bottom: 240px;
}

    .note-outer:first-child {
        margin-top: 0;
    }

.note-card {
    width: 100%;
    box-shadow: none !important;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    overflow: hidden;
    background: var(--mud-palette-surface,#fff);
    margin: 0;
}

.note-header {
    display: flex;
    background: #C27BBF;
    color: #fff;
    padding: 8px 12px;
    width: 100%;
}

.note-header-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-header-text {
    color: #fff;
}

.note-header .mud-icon-button {
    color: #fff !important;
}

.note-body {
    padding: 14px;
    padding-top: 24px;
}

.note-subject {
    margin: 0 0 8px 0;
}

.note-body-content {
    overflow: auto;
    line-height: 1.6;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(0,0,0,.02);
}

.note-body .mud-paper {
    box-shadow: none !important;
    background: transparent;
    padding: 0;
}

.ticketDetailData {
    font-weight: normal;
    color: #666;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Notes Search */

.floating-search-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.floating-search-buttons {
    display: flex;
    gap: 0.5rem;
}

.floating-search-button {
    border-radius: 50%;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    background-color: white !important;
    opacity: 1 !important;
}

.floating-search-panel {
    background-color: white;
    width: 400px;
    padding: 1rem;
    margin-top: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

    .search-header button {
        background: transparent;
        border: none;
        font-size: 1.25rem;
        font-weight: bold;
        cursor: pointer;
        color: #555;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

        .search-header button:hover {
            background-color: rgba(0, 0, 0, 0.05);
            color: #000;
        }

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.form-control {
    width: 100% !important;
    box-shadow: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
}

    .form-control:focus {
        border-color: #7a42f4;
        box-shadow: 0 0 0 3px rgba(122, 66, 244, 0.2);
    }

/* Notes Slideshow (Fullscreen) */

.mud-dialog-fullscreen {
    width: 95% !important;
    height: 95% !important;
    border-radius: 6px !important;
    overflow: hidden;
}

.mud-dialog-title {
    padding: 0 !important;
}

.note-dialog-overlay.mud-overlay {
    z-index: 100000 !important;
}

.note-dialog-title {
    background: #C27BBF;
    color: #fff;
    padding: 0;
}

.note-dialog .note-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
}

.note-dialog-title .mud-typography,
.note-dialog-title .mud-icon-button {
    color: inherit;
}

.slideshow-shell {
    display: grid;
    grid-template-rows: 1fr auto;
    height: 100%;
}

.lightbox-main {
    min-height: 0;
    overflow: hidden;
}

.slideshow-frame {
    height: 100%;
    display: flex;
    justify-content: center;
    overflow: auto;
}

.lightbox-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid rgba(0,0,0,.06);
}

/* Attachments */

.attachments {
    margin-top: 8px;
    font-weight: bold;
}

.attachments-bar {
    margin-top: 10px;
    margin-bottom: 20px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0,0,0,.15);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.attachments-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.attachment-link {
    white-space: nowrap;
}

.slideshow-shell {
    display: grid;
    grid-template-rows: 1fr auto auto;
    height: 100%;
}

.note-dialog .attachments-bar {
    display: none !important;
}

.attachments-dock {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-top: 1px solid rgba(0,0,0,.08);
    background: var(--mud-palette-surface, #fff);
}

.attachments-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.att-chip {
    cursor: pointer;
    white-space: nowrap;
}

.note-row {
    height: auto !important;
    overflow: visible !important;
    margin: 0 !important;
}

    .note-row::after {
        content: "";
        display: block;
        height: 24px; /* padding between notes */
    }

    .note-row:last-child::after {
        height: 0;
    }

.note-body-content {
    position: relative;
}

@media (prefers-color-scheme: dark) {
    .note-copy-btn {
        color: rgba(255,255,255,.8);
    }
}

/* Headers and Tabs */
.page-header {
    text-align: center;
    background-color: #650061;
    color: white;
    padding: 8px 16px;
    margin-bottom: 15px;
    width: 100%;
}

    .page-header.subheader {
        background-color: #9B4F96;
        margin-bottom: 5px;
    }

    .page-header.subsubheader {
        background-color: #C27BBF;
        color: white;
    }

.tab-header {
    padding: 0px 16px;
    background-color: #9B4F96 !important;
    color: white !important;
    border-radius: 12px;
    margin: 8px 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

    .tab-header .mud-tab.mud-tab-active {
        color: white !important;
    }

.tab-panel {
    padding: 0px 30px 0px 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.mud-card-header {
    padding: 0px !important;
}

.tab-panel > * {
    flex: 0 0 auto;
}

.add-note {
    background-color: #9B4F96 !important; /* Your primary color */
    color: white !important; /* White text */
    transition: background-color 0.3s ease !important; /* Smooth background color transition */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
}

    .add-note:hover {
        background-color: #7D3C87 !important; /* Darken color slightly on hover */
    }

.mud-table-head th,
.mud-table-toolbar .mud-input-slot,
.mud-table-toolbar .mud-select-input,
.mud-table-toolbar .mud-table-pagination-caption,
.mud-table-toolbar .mud-table-pagination-information,
.mud-table-toolbar .mud-icon-root,
.mud-table-toolbar .mud-button-root,
.mud-table-pagination .mud-toolbar-gutters,
.mud-table-pagination .mud-tablepager-left,
.mud-table-pagination .mud-tablepager-right,
.mud-table-pagination .mud-table-pagination-caption,
.mud-table-pagination .mud-select-input,
.mud-table-pagination .mud-input-slot {
    color: white !important;
}

.mud-table-body td,
.mud-table-body * {
    color: black !important;
}

.mud-table-head * {
    color: white !important;
}

.mud-table .mud-chip * {
    color: #fff !important;
}

.mud-table-body .mud-icon-root {
    color: black !important;
}

.header-title {
    color: #650061; /* Updated to primary theme color */
    margin-bottom: 1rem;
}

/* Forms and Tickets */
.AuthLimit {
    padding: 20px;
}

.new-ticket-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.new-ticket-section {
    padding: 20px;
    margin-top: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.new-ticket-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.new-ticket-paper {
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    border: 1px solid #ddd;
}

.new-ticket-label {
    font-weight: 700;
    color: #333;
}

.new-ticket-input {
    width: 100%;
}

.new-ticket-section-header {
    color: #594ae2; /* Secondary color */
}

.new-ticket-paper .MudSelect,
.new-ticket-paper .MudInput {
    width: 100%;
}

.new-ticket-paper .MudGrid {
    margin: 0;
}

    .new-ticket-paper .MudGrid .MudItem {
        display: flex;
        align-items: center;
    }

        .new-ticket-paper .MudGrid .MudItem > div:first-child {
            flex: 1;
            padding-right: 0.5rem;
        }

        .new-ticket-paper .MudGrid .MudItem > div:last-child {
            flex: 2;
        }

.ticket-header {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 8px 16px;
    background-color: #650061 !important;
    color: white !important;
    border-radius: 8px;
    flex-wrap: nowrap;
}

    .ticket-header .mud-chip {
        margin: 0 8px 0 0;
        border-radius: 12px;
    }

    .ticket-header .mud-button-root {
        background-color: #7E57C2 !important;
        border-radius: 8px;
        margin-left: auto;
    }

.filter-options {
    display: flex;
}

/* Errors and Warnings */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,...) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.KanbanDanger,
.KanbanWarning,
.KanbanStandard {
    border-style: solid;
    border-width: 2px;
    padding: 5px;
    cursor: pointer;
}

.badge-left {
    margin-right: 10px !important;
}

.KanbanDanger {
    border-color: darkred;
    background-color: #ff6666;
}

.KanbanWarning {
    border-color: #e6ac00;
    background-color: #ffff66;
}

.KanbanStandard {
    border-color: darkgreen;
    background-color: #66ff66;
}

/* Animations */
.fadein {
    opacity: 0;
    animation: fadeInAnimation 0.5s ease-in-out forwards;
}

@keyframes fadeInAnimation {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.row {
    cursor: pointer;
}

.dashboard-widget {
    cursor: pointer;
}

h1:focus {
    outline: none;
}

.text-ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-height: 1.2em;
}

.login-box {
    background-color: #650061 !important;
    margin: 0 auto !important;
    padding: 30px;
}

    .login-box * {
        color: white !important;
    }

.login-image {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0 auto 1rem;
}

.center-fields {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
}

    .center-fields .mud-text-field {
        margin-bottom: 10px !important; /* Space between input fields */
    }

/* Mobile Optimizations */
@media (max-width: 640px) {
    .content {
        padding-top: 0.5rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    .login-box {
        min-width: 90vw;
        min-height: 70vh;
    }

    .bottom-button {
        margin-bottom: 20px !important; /* Adjusted for mobile */
    }

    .mud-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    .mud-expand-panel-header {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .mud-expand-panel {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    .mud-expand-panel-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .new-ticket-section {
        padding: 10px !important;
        margin-top: 10px !important;
    }

    .note-paper, .note-body {
        padding: 8px !important;
    }

    .tab-panel {
        padding: 5px !important;
    }

    .tab-header {
        padding: 0px 0px !important;
        margin: 0px 0px !important;
        width: 100% !important;
    }

    .nav-link, .nav-link-group {
        padding: 0.05rem 0.05rem !important;
        margin: 0.1rem 0 !important;
    }

    .search-drawer {
        padding: 4px !important;
    }

    .note-container {
        margin-bottom: 0.5rem !important;
    }

    .note-body {
        padding: 8px !important;
    }

    .ticket-header {
        flex-direction: column !important;
        text-align: center !important;
        padding: 10px !important;
        width: 100% !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }

        .ticket-header .mud-chip {
            margin: 4px 0 !important;
            border-radius: 12px !important;
            font-size: 0.85rem !important;
        }

        .ticket-header .mud-button-root {
            margin-top: 8px !important;
            font-size: 0.85rem !important;
        }
}