﻿
.mud-dialog-content.mud-dialog-no-side-padding {
    margin-top: 0px !important;
    padding: 0 !important;
    margin-bottom: 0px !important;
}

.edit label.mud-input-label.mud-input-label-animated.mud-input-label-outlined.mud-input-label-inputcontrol {
    /*background: linear-gradient(357deg, #ffffff00, #ffffff00) !important;*/
    background: linear-gradient(#D0EDDEFC, #eddefc) !important;
    box-shadow: inset 10px 3px 10px #fff !important;
    border-radius: 3px;
    color: #333;
}

#login {
    transition: backdrop-filter 0.7s ease;
    transition: box-shadow 0.7s ease;
}

    #login:hover, #login:focus-within {
        backdrop-filter: blur(10px);
        box-shadow: 5px 5px 5px #94949459, -5px -5px 5px #8a8a8a99;
    }

body:has(#login-wrapper) {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

    body:has(#login-wrapper)::after {
        background-image: url('Images/background.png');
        content: '';
        position: absolute;
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        background-repeat: no-repeat;
        z-index: -1;
        inset: 0;
        opacity: 0.3;
    }

.edit .mud-input-control.mud-input-required label.mud-input-label.mud-input-label-animated.mud-input-label-outlined.mud-input-label-inputcontrol::after {
    content: " *";
}

.edit .mud-input-slot.mud-input-root.mud-input-root-outlined:focus + label.mud-input-label.mud-input-label-animated.mud-input-label-outlined.mud-input-label-inputcontrol {
    background: red;
}

.blur {
    backdrop-filter: blur(5px);
}

#editor:focus {
    outline: none !important;
}

h1:focus {
    outline: none;
}

.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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY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DggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

/* ════════════════════════════════════════════════════════════
   Global polish — all overrides live here so they stay unlayered
   and therefore win over both MudBlazor and Tailwind @layer rules.
   ════════════════════════════════════════════════════════════ */

/* ── Typography ────────────────────────────────────────────── */
html, body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11'; /* Inter optical features */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Custom scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 9999px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #a5b4fc;
    }

/* ── Text selection ────────────────────────────────────────── */
::selection {
    background-color: #6366f1;
    color: #ffffff;
}

/* ── Main content background ───────────────────────────────── */
.mud-main-content {
    background-color: #f8fafc !important;
}

/* ── Drawer ────────────────────────────────────────────────── */
/* Belt-and-suspenders: MudTheme.PaletteLight.DrawerBackground sets
   the CSS variable, but this selector ensures it in all browsers.  */
.mud-drawer,
.mud-drawer .mud-drawer-content {
    background-color: #ffffff !important;
    border-right: 1px solid #e5e7eb !important;
}

/* ── Sidebar nav links ─────────────────────────────────────── */
.mud-nav-link {
    border-radius: 8px !important;
    margin-inline: 8px !important;
    color: #374151 !important;
    transition: background-color 150ms ease, color 150ms ease !important;
}

    .mud-nav-link .mud-nav-link-icon-wrapper {
        color: #64748b !important;
    }

    .mud-nav-link:hover {
        background-color: #f5f3ff !important;
        color: #1e293b !important;
    }

        .mud-nav-link:hover .mud-nav-link-icon-wrapper {
            color: #6366f1 !important;
        }

    .mud-nav-link.active {
        background-color: rgba(99, 102, 241, 0.14) !important;
        color: #4f46e5 !important;
        box-shadow: inset 3px 0 0 #6366f1 !important; /* left accent bar */
        border-radius: 0 8px 8px 0 !important; /* keep right corners rounded */
        margin-left: 0 !important; /* flush against sidebar edge */
        padding-left: 19px !important; /* compensate for the inset bar */
    }

        .mud-nav-link.active .mud-nav-link-icon-wrapper {
            color: #6366f1 !important;
        }

/* ── Drawer height / scroll ────────────────────────────────── */
.mud-drawer {
    display: flex;
    flex-direction: column;
    height: 100% !important;
}

    .mud-drawer .mud-drawer-content {
        display: flex;
        flex-direction: column;
        height: 100% !important;
        overflow: hidden !important;
    }

/* ── Nav group ─────────────────────────────────────────────── */
.mud-nav-group .mud-nav-group-title {
    color: #9ca3af !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

.mud-nav-group > button {
    border-radius: 8px !important;
    margin-inline: 8px !important;
}

    .mud-nav-group > button:hover {
        background-color: #f5f3ff !important;
    }

/* ── Cards ─────────────────────────────────────────────────── */
.mud-card {
    border-radius: 12px !important;
    border: 1px solid rgba(226, 232, 240, 0.7) !important;
    transition: box-shadow 220ms ease, transform 220ms ease !important;
}

    .mud-card:hover {
        box-shadow: 0 10px 30px -5px rgba(99, 102, 241, 0.12), 0 4px 8px -4px rgba(0, 0, 0, 0.06) !important;
    }

/* ── Buttons ───────────────────────────────────────────────── */
.mud-button-root,
.mud-icon-button {
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ── AppBar height & alignment ─────────────────────────────── */
.mud-appbar {
    height: 60px !important;
}

    .mud-appbar .mud-toolbar {
        height: 60px !important;
        min-height: 60px !important;
        padding-inline: 0.75rem !important;
    }

/* ── User dropdown menu ────────────────────────────────────────
   Scoped to .mud-popover that directly wraps a .mud-menu-list,
   so date-pickers / selects are NOT affected.
   ──────────────────────────────────────────────────────────── */

/* Popover shell */
.mud-popover:has(> .mud-menu-list) {
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.06), 0 16px 40px rgba(0, 0, 0, 0.14) !important;
}

.mud-popover .mud-list {
    overflow-x: hidden;
}

/* Menu list container */
.mud-menu-list {
    padding: 4px 0 6px !important;
    min-width: 230px !important;
}

/* Each menu item */
.mud-menu-item {
    border-radius: 8px !important;
    margin: 1px 6px !important;
    padding: 7px 12px !important; /* collapse MudBlazor's default 48px min-height */
    min-height: unset !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    transition: background-color 120ms ease, color 120ms ease !important;
}

    .mud-menu-item:hover {
        background-color: #eef2ff !important;
        color: #4338ca !important;
    }

    /* Icon inside each item (default muted, bright on hover) */
    .mud-menu-item .mud-menu-item-icon {
        color: #9ca3af !important;
        font-size: 1.125rem !important;
    }

    .mud-menu-item:hover .mud-menu-item-icon {
        color: #6366f1 !important;
    }

        /* Keep "Sign out" icon red even on hover */
        .mud-menu-item .mud-menu-item-icon.mud-error-text,
        .mud-menu-item:hover .mud-menu-item-icon.mud-error-text {
            color: #ef4444 !important;
        }

/* Divider inside the menu list */
.mud-menu-list > .mud-divider {
    margin: 4px 8px !important;
    border-color: #f1f5f9 !important;
}

/* ── Table rows ────────────────────────────────────────────── */
.mud-table-row:hover td {
    background-color: rgba(99, 102, 241, 0.04) !important;
}

/* ── Paper / surfaces ──────────────────────────────────────── */
.mud-paper {
    border-radius: 12px !important;
}
