html, body {

    font-family: 'Roboto', sans-serif;

    margin: 0;

}



#blazor-error-ui {

    color-scheme: light only;

    background: lightyellow;

    bottom: 0;

    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);

    box-sizing: border-box;

    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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;

    padding: 1rem 1rem 1rem 3.7rem;

    color: white;

}



    .blazor-error-boundary::after {

        content: "An error has occurred."

    }



.loading-progress {

    position: absolute;

    display: block;

    width: 8rem;

    height: 8rem;

    inset: 20vh 0 auto 0;

    margin: 0 auto 0 auto;

}



    .loading-progress circle {

        fill: none;

        stroke: #e0e0e0;

        stroke-width: 0.6rem;

        transform-origin: 50% 50%;

        transform: rotate(-90deg);

    }



        .loading-progress circle:last-child {

            stroke: #1b6ec2;

            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;

            transition: stroke-dasharray 0.05s ease-in-out;

        }



.loading-progress-text {

    position: absolute;

    text-align: center;

    font-weight: bold;

    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;

}



    .loading-progress-text:after {

        content: var(--blazor-load-percentage-text, "Loading");

    }

/* Subject-chat unread badges: keep count fully visible without growing the app bar.
   MudBadge Overlap otherwise sticks past the top edge and gets clipped. */
.chat-unread-badge.mud-badge-root {
    overflow: visible;
}

/* App bar brand logo: grey SVG → white to match MudText on primary (blue) bar */
.mud-appbar .appbar-brand-logo {
    filter: brightness(0) invert(1);
}

/* App bar only: smaller badge, tucked inside the icon button (bar height unchanged) */
.mud-appbar .chat-unread-badge .mud-badge {
    height: 16px;
    min-width: 16px;
    font-size: 10px;
    padding: 0 4px;
    line-height: 1;
}

.mud-appbar .chat-unread-badge .mud-badge.mud-badge-bordered {
    padding: 0 3px;
    border-width: 1px;
}

.mud-appbar .chat-unread-badge .mud-badge.mud-badge-overlap {
    inset: 6px 6px auto auto !important;
}

/* List icon is small — expand the badge root so overlap stays inside this box */
.chat-unread-cell .chat-unread-badge.mud-badge-root {
    padding-top: 10px;
    padding-right: 10px;
}

.chat-unread-cell {
    overflow: visible !important;
}

@media (max-width: 600px) {
    .page-grid-table .mud-xs-table:not(.mud-data-grid) .mud-table-row {
        overflow: visible;
    }

    .page-grid-table .mud-xs-table:not(.mud-data-grid) .chat-unread-cell {
        padding-top: 8px !important;
        overflow: visible !important;
    }
}

/* Subject chat detail — mobile-friendly shell + composer */
.chat-detail {
    height: calc(100vh - 5rem);
    height: calc(100dvh - 5rem);
    min-height: 0;
}

.chat-detail-title {
    min-width: 0;
    flex: 1 1 auto;
}

.chat-detail-title-text,
.chat-detail-subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-detail-messages {
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.chat-detail-messages--loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-detail--embedded {
    height: min(70vh, 42rem);
    min-height: 22rem;
}

.chat-detail-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 0.75rem;
}

.chat-detail-participants-mobile {
    flex-shrink: 0;
}

.chat-detail-participants-col {
    display: none;
}

@media (min-width: 960px) {
    .chat-detail-participants-mobile {
        display: none;
    }

    .chat-detail-body {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem);
        align-items: stretch;
    }

    .chat-detail-participants-col {
        display: block;
        overflow-y: auto;
        min-height: 0;
        -webkit-overflow-scrolling: touch;
    }
}

.chat-composer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    flex-shrink: 0;
}

.chat-composer-input {
    flex: 1 1 auto;
    min-width: 0;
}

.chat-composer-actions {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.5rem;
    flex-shrink: 0;
}

.chat-composer-send.mud-button-root {
    flex: 1 1 auto;
    width: auto;
    min-height: 2.75rem;
}

.chat-composer-insert.mud-button-root {
    flex: 0 0 auto;
    align-self: stretch;
    aspect-ratio: 1 / 1;
    width: auto;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding-inline: 0;
}

@media (min-width: 37.5rem) {
    .chat-composer {
        flex-direction: row;
        align-items: stretch;
        gap: 0.5rem;
    }

    .chat-composer-send.mud-button-root {
        flex: 0 0 auto;
        aspect-ratio: 1 / 1;
        min-width: 0;
        padding-inline: 0;
    }
}

.chat-message-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Hex input only — MudColorPicker copies Style onto the popup paper, so do not set width there. */
.chat-settings-color-field {
    width: 10rem;
    max-width: 10rem;
}

.chat-settings-table {
    width: 100%;
}

.chat-settings-table .mud-table-container {
    overflow: visible;
}

.chat-settings-table table {
    width: 100%;
    table-layout: auto;
}

.chat-type-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: 0.25rem;
    background: color-mix(in srgb, var(--chat-type-color, #1976D2) 18%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--chat-type-color, #1976D2) 55%, transparent);
    color: var(--chat-type-color, #1976D2);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.chat-row-type-accent > td:first-child,
.chat-row-type-accent > .mud-table-cell:first-child {
    box-shadow: inset 3px 0 0 var(--chat-type-color, transparent);
}

.chat-detail-header-typed {
    border-left: 4px solid var(--chat-type-color, transparent);
    padding-left: 0.5rem;
}

.chat-skill-ref {
    appearance: none;
    display: inline-block;
    margin: 0 0.1em;
    padding: 0.05em 0.35em;
    border: none;
    border-radius: 0.25rem;
    background: color-mix(in srgb, currentColor 18%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 35%, transparent);
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.12em;
    cursor: pointer;
    line-height: inherit;
}

.chat-skill-ref--static {
    cursor: default;
    text-decoration: none;
}

.insert-skill-list {
    max-height: min(50vh, 24rem);
    overflow-y: auto;
}

.insert-skill-item.mud-button-root {
    display: block;
    justify-content: flex-start;
    text-align: start;
    height: auto;
    padding: 0.4rem 0.5rem;
    text-transform: none;
}

.insert-skill-item-inner {
    width: 100%;
    align-items: flex-start;
}

/* Account pages (login / register / …) — Clockify-like public shell */
.account-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 1.5rem 0 1.25rem;
}

.account-layout__header {
    text-align: center;
    margin-bottom: 1.25rem;
    padding: 0 1rem;
}

.account-layout__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--mud-palette-text-primary, #1a1a1a);
    text-decoration: none;
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.account-layout__brand:hover {
    text-decoration: none;
    opacity: 0.85;
}

.account-layout__logo {
    display: block;
    flex-shrink: 0;
}

.account-layout__tagline {
    margin: 0.45rem 0 0;
    color: var(--mud-palette-text-secondary, #666);
    font-size: 0.95rem;
}

.account-layout__footer {
    margin-top: auto;
    padding: 1.5rem 1rem 0.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.account-layout__footer a {
    color: var(--mud-palette-primary, #594ae2);
}

/* Sign in with Google — light rectangular button (Google branding guidelines) */
.sso-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    box-sizing: border-box;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.sso-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sso-btn--google {
    background: #ffffff;
    color: #1f1f1f;
    border: 1px solid #747775;
}

.sso-btn--google:hover:not(:disabled) {
    background: #f8f8f8;
    text-decoration: none;
    color: #1f1f1f;
}

.sso-btn--google:focus-visible {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}

.sso-btn__google-logo {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    /* Guidelines: multicolor G on a white tile */
    background: #ffffff;
    border-radius: 0.125rem;
    padding: 0.1rem;
    box-sizing: content-box;
}

.sso-btn--microsoft {
    background: transparent;
    color: var(--mud-palette-text-primary, #1a1a1a);
    border: 1px solid var(--mud-palette-lines-default, #bdbdbd);
}

.sso-btn--microsoft:hover:not(:disabled) {
    background: var(--mud-palette-action-default-hover, rgba(0, 0, 0, 0.04));
    text-decoration: none;
    color: var(--mud-palette-text-primary, #1a1a1a);
}

.sso-btn--microsoft:focus-visible {
    outline: 2px solid var(--mud-palette-primary, #594ae2);
    outline-offset: 2px;
}

.account-layout__sep {
    margin: 0 0.5rem;
    opacity: 0.55;
}


