/*@import '/_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css?family=Lato:300,400,500,600,700');

/*  EntityCore.Web */

body {
    --body-font: "Poppins","Helvetica Neue", Helvetica, Arial, sans-serif;
    font-family: var(--body-font);
    font-size: 12px;
    line-height: var(--type-ramp-base-line-height);
    margin: 0;
    background-color: var(--neutral-fill-hover);
    overscroll-behavior-y: none;
}

@media (min-width: 601px) {
    body {
    }
}

h1, h2, h3, h4, h5, h6, fluent-tab, .fs-6 {
    font-family: "Poppins", sans-serif !important;
    font-weight: 700;
}

/*h1 {
    font-size: 1.4rem;
}*/

.navmenu-icon {
    display: none;
}

:root {
    --neutral-fill-stealth-hover: #a4d1c21;
}

#logo {
    color: white !important;
    fill: white !important;
}

.main {
    /*min-height: calc(100dvh - 50px);*/
    /*color: var(--neutral-foreground-rest);*/
    align-items: stretch !important;
    background: var(--neutral-layer-1);
}

.body-content {
    align-self: stretch;
    min-height: calc(100dvh) !important;
    display: flex;
    /*margin-left: -15px !important;*/
    background-color: var(--neutral-layer-2);
    /*background: linear-gradient(239deg, rgb(183 217 181 / 11%) 0%, rgb(130 194 215 / 12%) 100%);*/
}

.content {
    padding: 40px .5rem 2rem .5rem;
    margin: 0.5rem;
    align-self: stretch !important;
    width: 100%;
}

fluent-tab {
    font-size: 1rem;
    padding-bottom: 4px;
    margin-bottom: 10px;
    margin-right: 10px
}

fluent-checkbox span {
    font-weight: 600 !important;
}

.fluent-input-label {
    font-weight: 600 !important;
    margin: 10px 0 5px 0;
}

.shadow-box {
    /*    background-color: var(--neutral-layer-floating);
    box-shadow: #00000017 1px 0px 2px;
    border: solid 1px #00000012;
    border-radius: 7px;
*/
}

.w-25 {
    min-width: 25px;
}

.fs-xs {
    font-size: 8pt;
}

.page-header {
    margin: 30px 0 30px 0;
}

.fluent-appbar svg {
    fill: rgba(255, 255, 255, 0.7) !important;
}

.fluent-appbar-item:not([inpopover]) a.active::before {
    background-color: rgb(255, 83, 0) !important;
}

.fluent-appbar-item:hover {
    background-color: #ffffff22 !important;
    color: #ffffff !important;
}

    .fluent-appbar-item:hover a {
        color: #ffffff !important;
    }

.fluentui-counterbadge-container {
    height: auto !important;
}

.fluent-card-minimal-style {
    height: inherit !important;
    border: 0 !important;
    contain: none !important;
    border-radius: 7px !important;
}

.fluent-card-img-container-top {
    margin: calc(var(--design-unit) * 5px * -1);
    margin-bottom: calc(var(--design-unit) * 5px);
}

fluent-text-area::part(control) {
    min-height: 100%;
}


fluent-card, .fluent-card-minimal-style {
    border: 0 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 5px !important;
}

.fluent-card-img-container-top, .app-card-img-container-top {
    margin: calc(var(--design-unit) * 5px * -1);
    margin-bottom: calc(var(--design-unit) * 3px);
}

.fluent-dialog-img-container-top {
    margin: calc(var(--design-unit) * 6px * -1 - 1px);
    margin-bottom: calc(var(--design-unit) * 2px);
}

.fluent-typography[typo='pane-header'] {
    font-size: 1.2rem !important;
}

.app-card {
    height: var(--card-height, 100%);
    width: var(--card-width, 100%);
    background: var(--fill-color);
    color: var(--neutral-foreground-rest);
    border: 0 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 5px !important;
    contain: content;
}

.p-card {
    padding: 0.8rem !important;
}

.grow-on-hover {
    transition: transform 0.3s ease; /* Smooth transition */
}

    .grow-on-hover:hover {
        transform: scale(1.02);
    }


.app-bar-container {
    background-color: #212529;
    background: linear-gradient(0deg, rgba(53,64,75,1) 0%, rgba(33,37,41,1) 100%);
    color: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    min-width: 68px;
    padding-top: 10px;
}

    .app-bar-container a div {
        color: rgba(255, 255, 255, 0.7) !important;
    }

.fluent-appbar {
    height: 100%;
    /*background-color: #212529;*/
    color: rgba(255, 255, 255, 0.7);
    width: 68px;
    position: fixed;
    height: 100vh;
}

fluent-dialog::part(control) {
    position: absolute;
    /*top: 17px;*/
    max-width: 100vw;
}

.fluent-appbar svg {
    fill: rgba(255, 255, 255, 0.7) !important;
}

@media (max-width: 600px) {
    .fluent-appbar {
        max-height: 68px;
        width: 100% !important;
    }

    .app-bar-container {
        position: fixed;
        z-index: 9999;
        bottom: 0;
        width: 100%;
        padding: 0;
    }

    body {
        margin-bottom: 68px;
    }
}

@media (min-width: 601px) {
    .sidebar-menu {
    }
}

@media (max-width: 600px) {
    .sidebar-menu {
    }
}

.fluent-nav-link.active div {
    background-color: var(--neutral-layer-floating) !important;
    font-size: 13px;
}

.page-header h1 {
    color: rgb(255, 83, 0) !important;
    font-family: "Poppins", sans-serif;
    font-weight: 800;
    font-size: 18pt !important;
}

.poppins-thin {
    font-family: "Poppins", sans-serif;
    font-weight: 100;
    font-style: normal;
}

.poppins-light {
    font-family: "Poppins", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.poppins-regular {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.poppins-medium {
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-style: normal;
}

.poppins-bold {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.manage {
    width: 100dvw;
}

.entity-setting fluent-select {
    margin-top: -5px;
}

.toolbar-top-wide {
    background-color: #ffffff44;
    /*background-color: var(--neutral-layer-floating);*/
    /*width: calc(100vw - 83px);*/
    position: fixed;
    backdrop-filter: blur(10px);
    top: 0;
    right: 0;
    z-index: 10;
    left: 68px;
    padding: 10px;
    box-shadow: 0 0 2rem 0 rgba(41, 48, 66, 0.1);
}

.toolbar-top {
    background-color: var(--neutral-layer-floating);
    width: calc(100vw - 288px);
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10;
    left: 288px;
    padding: 10px;
    box-shadow: 0 0 2rem 0 rgba(41, 48, 66, 0.1);
}

    .toolbar-top:has(> div.content) {
        padding-top: 100px !important;
    }

footer {
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    align-items: center;
    padding: 10px 10px;
}

    footer a {
        /*color: var(--neutral-foreground-rest);*/
        text-decoration: none;
    }

        footer a:focus {
            outline: 1px dashed;
            outline-offset: 3px;
        }

        footer a:hover {
            text-decoration: underline;
        }

.alert {
    border: 1px dashed var(--accent-fill-rest);
    padding: 5px;
}

/* --------------- Blazor error dialog (centered modal) --------------- */
#blazor-error-ui {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

    #blazor-error-ui .error-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        animation: errorFadeIn 0.3s ease;
    }

    #blazor-error-ui .error-dialog {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: #fff;
        border-radius: 20px;
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25), 0 2px 12px rgba(0, 0, 0, 0.1);
        padding: 2.5rem 2.5rem 2rem;
        max-width: 420px;
        width: 90%;
        text-align: center;
        animation: errorSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    #blazor-error-ui .error-illustration {
        width: 180px;
        height: auto;
        margin: 0 auto 1.25rem;
        display: block;
    }

    #blazor-error-ui .error-title {
        font-size: 1.35rem;
        font-weight: 700;
        color: #1a1a2e;
        margin: 0 0 0.5rem;
        letter-spacing: -0.01em;
    }

    #blazor-error-ui .error-message {
        font-size: 0.92rem;
        color: #5a6070;
        line-height: 1.55;
        margin: 0 0 1.75rem;
    }

    #blazor-error-ui .error-actions {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }

    #blazor-error-ui a.reload {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        background: #2a5b99;
        color: #fff;
        font-weight: 600;
        font-size: 0.9rem;
        padding: 0.65rem 1.5rem;
        border-radius: 10px;
        text-decoration: none;
        cursor: pointer;
        transition: background 0.2s, transform 0.15s;
    }

        #blazor-error-ui a.reload:hover {
            background: #1e4474;
            transform: translateY(-1px);
        }

        #blazor-error-ui a.reload:active {
            transform: translateY(0);
        }

    #blazor-error-ui a.dismiss {
        color: #5a6070;
        font-size: 0.88rem;
        text-decoration: none;
        cursor: pointer;
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
        transition: background 0.2s, color 0.2s;
    }

        #blazor-error-ui a.dismiss:hover {
            background: #f0f1f4;
            color: #1a1a2e;
        }

@keyframes errorFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes errorSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Dark-mode support */
@media (prefers-color-scheme: dark) {
    #blazor-error-ui .error-dialog {
        background: #1e1e2e;
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 2px 12px rgba(0, 0, 0, 0.3);
    }

    #blazor-error-ui .error-title {
        color: #e0e0ee;
    }

    #blazor-error-ui .error-message {
        color: #a0a4b8;
    }

    #blazor-error-ui a.reload {
        background: #3b7ad9;
    }

        #blazor-error-ui a.reload:hover {
            background: #2a5b99;
        }

    #blazor-error-ui a.dismiss {
        color: #a0a4b8;
    }

        #blazor-error-ui a.dismiss:hover {
            background: #2a2a3e;
            color: #e0e0ee;
        }

    #blazor-error-ui .error-illustration circle {
        fill: #2a2a3e;
    }
}


.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1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DU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::before {
        content: "An error has occurred. "
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem 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");
    }

code {
    color: #c02d76;
}

@media (max-width: 600px) {

    .toolbar-top-wide,
    .toolbar-top {
        width: 100%;
        left: 0;
    }


    .header-gutters {
        margin: 0.5rem 3rem 0.5rem 1.5rem !important;
    }

    [dir="rtl"] .header-gutters {
        margin: 0.5rem 1.5rem 0.5rem 3rem !important;
    }

    .main {
        flex-direction: column !important;
        row-gap: 0 !important;
    }

    nav.sitenav {
        width: 100%;
        height: 100%;
    }

    #main-menu {
        width: 100% !important;
    }

        #main-menu > div:first-child:is(.expander) {
            display: none;
        }

    .navmenu {
        width: 100%;
    }

    #navmenu-toggle {
        appearance: none;
    }

        #navmenu-toggle ~ nav {
            display: none;
        }

        #navmenu-toggle:checked ~ nav {
            display: block;
        }

    .navmenu-icon {
        cursor: pointer;
        z-index: 10;
        display: block;
        position: absolute;
        top: 15px;
        left: unset;
        right: 20px;
        width: 20px;
        height: 20px;
        border: none;
    }

    [dir="rtl"] .navmenu-icon {
        left: 20px;
        right: unset;
    }
}

/* --------------- Analytics / stat cards (reusable) --------------- */

.analytics-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, var(--fill-color) 20%, #ffffff30) !important;
}

.analytics-card::before {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 150px;
    height: 150px;
    background: var(--accent-fill-rest);
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
    display: none;
}

.analytics-content {
    position: relative;
    z-index: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-fill-rest);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--neutral-foreground-tertiary);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-change {
    font-size: 0.875rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    background: var(--neutral-fill-secondary);
    display: inline-block;
}

.stat-change.positive {
    color: #107C10;
    background: rgba(16, 124, 16, 0.1);
}

.stat-change.negative {
    color: #D13438;
    background: rgba(211, 52, 56, 0.1);
}
