html, body {
    margin: 0;
    min-height: 100%;
    background-color: var(--mud-palette-background, #fafafa);
    font-family: "Roboto", "Helvetica", "Arial", sans-serif;
}

body {
    min-height: 100vh;
}

h1:focus {
    outline: none;
}

h1, h2, h3, h4, h5, h6,
.mud-typography-h1, .mud-typography-h2, .mud-typography-h3,
.mud-typography-h4, .mud-typography-h5, .mud-typography-h6 {
    font-family: "Roboto", "Segoe UI", "Helvetica", "Arial", sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ---- Header ---- */
.rka-header .mud-toolbar {
    padding: 0 8px;
}

.rka-header-menu {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.rka-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    position: relative;
}

.rka-header-title {
    min-width: 0;
    text-align: center;
    pointer-events: none;
    overflow: hidden;
}

/* ---- Login Header ---- */
.rka-login-header {
    background-color: var(--mud-palette-primary);
    width: 100%;
}

.rka-login-header-title {
    text-align: center;
}

.rka-header-auth {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
}

.rka-user-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    background-color: transparent;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
}

.rka-user-name-text {
    display: inline;
    color: white;
}

.rka-header-title-large {
    display: block;
}

.rka-header-title-small {
    display: none;
}

.rka-header-title-text {
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(0.85rem, 2.2vw, 1.4rem);
    line-height: 1.2;
}

.rka-user-icon {
    display: inline-flex;
}

.rka-user-activator {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    color: white;
    user-select: none;
}

    .rka-user-activator:hover {
        background-color: rgba(255, 255, 255, 0.12);
    }

/* ---- Sidebar ---- */
.app-sidebar .mud-drawer-content {
    padding-top: 8px;
}

/* ---- Flexbox-Overflow-Fix: erlaubt Inhalten (z. B. Tabellen),
       sich an die verfügbare Breite anzupassen statt den Inhaltsbereich aufzuweiten ---- */
.mud-main-content {
    min-width: 0;
}

.mud-main-content > .mud-container {
    min-width: 0;
    max-width: 100%;
}
    .rka-header-title-large {
        display: none;
    }

    .rka-header-title-small {
        display: block;
    }

    .rka-header-title-small.rka-header-title-text {
        font-size: clamp(1rem, 5vw, 1.35rem);
    }

    .rka-header-auth {
        gap: 6px;
    }

    .rka-user-activator {
        gap: 6px;
    }

    .rka-user-name-text {
        display: none;
    }

    .rka-user-icon {
        display: none;
    }

    .rka-user-initials {
        display: flex;
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}


.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjwvc3ZnPg==) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.rka-login-shadow-input {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.rka-remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.rka-remember-me-input {
    width: 18px;
    height: 18px;
    accent-color: var(--mud-palette-primary);
    cursor: pointer;
}
