.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+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."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}


/* ===== MudBlazor Outlined Input — white background ===== */
.mud-input-outlined .mud-input-slot,
.mud-input-outlined .mud-input-control-input-container,
.mud-input.mud-input-outlined {
    background-color: #ffffff !important;
    border-radius: 10px;
}
.mud-select.mud-input-outlined .mud-input-slot,
.mud-picker .mud-input-outlined .mud-input-slot {
    background-color: #ffffff !important;
}

/* ===== Wasserwacht Utility Classes ===== */

/* Content containers (MudPaper wrappers) */
.content-paper {
    border: 1px solid #b4d7eb;
    border-radius: 12px;
}

/* Page-level heading text */
.page-header {
    color: #002d55;
}

/* Secondary / subtitle text */
.subtitle {
    color: #698caf;
}

/* Action buttons (filled, outlined variants) */
.action-btn {
    border-radius: 10px !important;
    text-transform: none !important;
    font-weight: 600 !important;
}

/* Calendar cell — static properties extracted from dynamic cellStyle */
.calendar-cell {
    border: 1px solid #b4d7eb;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    min-height: 125px;
    display: flex;
    flex-direction: column;
}

/* Calendar horizontal scroll container for tablet */
.calendar-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.calendar-scroll-wrapper > div {
    min-width: 700px;
}

/* ===== Login Page Styles ===== */

html, body {
    overflow-x: hidden;
    max-width: 100vw;
    margin: 0;
}

/* Compact 48px appbar — override MudBlazor's default 64px so main content
   and clipped drawer align flush with the appbar bottom. */
:root {
    --mud-appbar-height: 48px;
}

/* Prevent AppBar horizontal overflow */
.mud-appbar,
.mud-appbar .mud-toolbar,
.mud-appbar-fixed-top {
    overflow: hidden;
    max-width: 100vw;
    max-height: 48px;
}
.mud-appbar .mud-toolbar {
    min-height: 48px !important;
    height: 48px !important;
}

/* Prevent drawer + layout horizontal overflow */
.mud-layout {
    overflow-x: hidden;
}

/* Main content: prevent horizontal overflow, constrain to viewport */
.mud-main-content {
    overflow-x: hidden;
    max-width: 100vw;
}

.login-page {
    height: 100vh;
    height: 100dvh;
    background-color: #f5f0e6;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 45, 85, 0.08);
    padding: 48px 40px 40px;
}

.login-brand {
    text-align: center;
    margin-bottom: 40px;
}

.login-brand-icon {
    width: 56px;
    height: 56px;
    background-color: #008ccd;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.login-brand-title {
    font-size: 24px;
    font-weight: 600;
    color: #002d55;
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}

.login-brand-subtitle {
    font-size: 14px;
    color: #698caf;
    margin: 0;
    font-weight: 400;
}

.login-field-group {
    margin-bottom: 20px;
}

.login-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #002d55;
    letter-spacing: 0.1px;
}

.login-field {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #b4c3d7;
    border-radius: 10px;
    font-size: 15px;
    box-sizing: border-box;
    background: #ffffff;
    color: #002d55;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-field:focus {
    outline: none;
    border-color: #008ccd;
    box-shadow: 0 0 0 3px rgba(0, 140, 205, 0.15);
}

.login-field::placeholder {
    color: #b4c3d7;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}

.login-remember-label {
    font-size: 14px;
    color: #698caf;
    cursor: pointer;
    user-select: none;
}

.login-checkbox {
    accent-color: #008ccd;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.login-btn {
    background-color: #008ccd;
    color: #ffffff;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.login-btn:hover {
    background-color: #0077b0;
}

.login-btn:active {
    transform: scale(0.98);
}

.login-error {
    background-color: #fef2f2;
    color: #d32f2f;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    border: 1px solid #fecaca;
}

.validation-message {
    font-size: 12px;
    color: #d32f2f;
    margin-top: 4px;
    display: block;
}

/* Wachbuch today row highlight */
tr.wachbuch-today-row > td {
    background-color: rgba(0, 140, 205, 0.10) !important;
    font-weight: 600 !important;
}
tr.wachbuch-today-row > td:first-child {
    box-shadow: inset 6px 0 0 0 #008ccd;
}

/* Wachbuch closed entry indicator — green left border */
tr.wachbuch-closed-row > td:first-child {
    box-shadow: inset 6px 0 0 0 #2e7d32;
}

/* Wachbuch open (started, not finished) entry indicator — orange left border */
tr.wachbuch-open-row > td:first-child {
    box-shadow: inset 6px 0 0 0 #ed6c02;
}

/* ===== Mobile Layout Foundation (Phase 14) ===== */
/* Fixes MudBlazor layout bugs + iOS safe area + padding reduction */
/* References: MudBlazor Issue #6653, Discussion #8862, #9194 */
@media (max-width: 959px) {
    /* CSS-02: Content padding to clear bottom AppBar (MudBlazor Issue #6653) */
    /* CSS-03: Reset phantom left margin from MudDrawer mini variant (Discussion #8862) */
    /* CSS-04: Reduce horizontal padding from 32px to 16px (D-14) */
    .mud-main-content {
        padding-bottom: calc(var(--mud-appbar-height) + 16px + env(safe-area-inset-bottom)) !important;
        margin-left: 0 !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        padding-top: calc(var(--mud-appbar-height) + 12px) !important;
    }

    /* CSS-03: Belt-and-suspenders drawer hide for reconnect race condition (D-12) */
    .mud-drawer {
        display: none !important;
    }

    /* CSS-01: Bottom tab bar safe area padding for iOS home indicator */
    .mud-appbar-bottom {
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* Fix: Wachbuch row status indicators — full-height left border on mobile */
    tr.wachbuch-today-row > td {
        box-shadow: inset 6px 0 0 0 #008ccd;
    }
    tr.wachbuch-closed-row > td {
        box-shadow: inset 6px 0 0 0 #2e7d32;
    }
    tr.wachbuch-open-row > td {
        box-shadow: inset 6px 0 0 0 #ed6c02;
    }

    /* RESP-04: Enforce 44px minimum touch targets on buttons (per D-12) */
    .mud-button-root {
        min-height: 44px;
    }
    .mud-icon-button {
        min-width: 44px;
        min-height: 44px;
    }

    /* Login page mobile: reduce padding to prevent scrolling */
    .login-page {
        padding: 16px;
        min-height: 100dvh;
    }
    .login-card {
        padding: 32px 24px 28px;
    }
    .login-brand {
        margin-bottom: 24px;
    }
    .login-brand img {
        width: 56px !important;
        height: 56px !important;
    }
    .login-brand-title {
        font-size: 20px;
    }
}

/* Phase 15: Wachplan mobile week strip and agenda cards */
.week-strip-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 8px 4px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
}

.week-strip-cell--active {
    background-color: #008ccd;
}

.week-strip-day-name {
    font-size: 12px;
    color: #698caf;
    font-weight: 400;
}

.week-strip-cell--active .week-strip-day-name {
    color: #ffffff;
}

.week-strip-day-num {
    font-size: 16px;
    font-weight: 600;
    color: #002d55;
    line-height: 1.2;
}

.week-strip-cell--active .week-strip-day-num {
    color: #ffffff;
}

.week-strip-today {
    color: #008ccd;
}

.week-strip-badge {
    font-size: 12px;
    background-color: #b4d7eb;
    color: #002d55;
    border-radius: 8px;
    padding: 0 4px;
    line-height: 16px;
    min-width: 16px;
    text-align: center;
    margin-top: 4px;
}

.week-strip-cell--active .week-strip-badge {
    background-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.agenda-card {
    transition: background-color 0.15s ease;
}

.agenda-card:active {
    background-color: #f0f7fc;
}

/* Phase 16: Wachbuch mobile card styles (RESP-02) */
.wachbuch-mobile-card {
    padding: 12px 16px;
    margin-bottom: 8px;
    min-height: 64px;
    cursor: pointer;
    border-left: 4px solid #73afdc;
}

.wachbuch-mobile-card--closed {
    border-left-color: #002d55;
}

.wachbuch-mobile-card--today {
    border-left-color: #008ccd;
}

.wachbuch-mobile-filter-toggle {
    margin-bottom: 12px;
}

/* Donut chart slice separator */
.mud-chart-donut path {
    stroke: #ffffff;
    stroke-width: 2;
}
