.loader-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    z-index: 99999;
}

.loader {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 50px;
    height: 50px;
    font-size: 0;
    color: #00c9d0;
    display: inline-block;
    margin: -25px 0 0 -25px;
    text-indent: -9999em;
    -webkit-transform: translateZ(0);
    -ms-transform: translateZ(0);
    transform: translateZ(0);
}

    .loader div {
        background-color: #00c9d0;
        display: inline-block;
        float: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 50px;
        height: 50px;
        opacity: 0.5;
        border-radius: 50%;
        -webkit-animation: ballPulseDouble 2s ease-in-out infinite;
        animation: ballPulseDouble 2s ease-in-out infinite;
    }

        .loader div:last-child {
            -webkit-animation-delay: -1s;
            animation-delay: -1s;
        }

@-webkit-keyframes ballPulseDouble {
    0%, 100% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }

    50% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }
}

@keyframes ballPulseDouble {
    0%, 100% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }

    50% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }
}

::-webkit-scrollbar {
    width: 2px!important;
}

[dir="rtl"],
[dir="rtl"] .mud-typography,
[dir="rtl"] .mud-input,
[dir="rtl"] .mud-button-root,
[dir="rtl"] .mud-table-cell,
[dir="rtl"] input,
[dir="rtl"] textarea {
    font-family: "Almarai", "Roboto", sans-serif !important;
}

.adex-logo-animated {
    animation: adexLogoFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 12px 18px rgba(0,0,0,.2));
    transform-origin: center;
}

.adex-logo-animated:hover {
    animation-play-state: paused;
    transform: scale(1.05);
}

.adex-avatar-logo {
    width: 46px;
    height: 46px;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 3px 12px rgba(23,54,93,.22);
    overflow: hidden;
}

.adex-info-hint {
    cursor: help;
    vertical-align: middle;
}

.finance-form-section { border:1px solid color-mix(in srgb,var(--section-accent) 28%,#dfe7ef); border-inline-start:5px solid var(--section-accent); background:var(--section-bg); border-radius:12px; margin-bottom:18px; }
.finance-form-section-heading { display:flex;align-items:center;gap:12px;padding-bottom:12px;border-bottom:1px solid color-mix(in srgb,var(--section-accent) 18%,transparent); }
.finance-form-section-icon { width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--section-accent) 12%,white);color:var(--section-accent); }
.finance-form-section .mud-input-control { background:rgba(255,255,255,.72);border-radius:7px; }
.ipc-section-heading { display:flex;align-items:center;gap:12px;margin:14px 0 4px;padding:14px 16px;border:1px solid #d8e2ef;border-inline-start-width:5px;border-radius:10px; }
.ipc-section-blue { background:#f2f7fd;border-inline-start-color:#17365d; }
.ipc-section-green { background:#f2faf5;border-inline-start-color:#2e7d32; }
.ipc-section-amber { background:#fff9ed;border-inline-start-color:#ef8c00; }
.calculation-table thead { background:#17365d; }
.calculation-table thead .mud-table-cell { color:#fff;font-weight:700; }
.calculation-table tbody tr:nth-child(even) { background:#f4f8fc; }
.bank-account-editor > .mud-paper { border:1px solid #cfdbea;border-top:5px solid #17365d;background:#f7faff; }
.bank-balance-editor > .mud-paper { border:1px solid #cfe3d4;border-top:5px solid #2e7d32;background:#f6fbf7; }

@keyframes adexLogoFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-8px) rotate(.4deg); }
}
.adex-grid-export-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 10px 0 4px;
}

.adex-grid-export-button {
    border: 1px solid #17365d;
    border-radius: 4px;
    background: #fff;
    color: #17365d;
    cursor: pointer;
    font: 600 12px Montserrat, Almarai, sans-serif;
    padding: 7px 12px;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

 .adex-grid-export-menu { position:relative; }
.adex-grid-export-menu summary { display:flex;align-items:center;gap:6px;list-style:none; }
.adex-grid-export-menu summary::-webkit-details-marker { display:none; }
.adex-grid-export-toolbar svg { width:18px;height:18px;fill:currentColor;flex-shrink:0; }
.adex-grid-export-choices { position:absolute;inset-inline-end:0;top:calc(100% + 4px);min-width:190px;padding:4px;background:#fff;border:1px solid #d5dce4;border-radius:6px;box-shadow:0 4px 14px #0003;z-index:1200; }
.adex-grid-export-choice { display:flex;align-items:center;gap:10px;width:100%;padding:10px;border:0;background:transparent;text-align:start;cursor:pointer;font:inherit;color:#17365d; }
.adex-grid-export-choice.excel svg { color:#217346; }
.adex-grid-export-choice.pdf svg { color:#b3261e; }
.adex-grid-export-choice:hover,.adex-grid-export-choice:focus-visible { background:#eef3f8; }
.adex-grid-export-menu summary:focus-visible { outline:3px solid #fbba00;outline-offset:2px; }
.adex-grid-export-status { align-self:center;font-size:12px;color:#b3261e; }

.adex-login-logo {
    width: fit-content;
    margin: 0 auto;
    padding: 6px 14px;
    border-radius: 8px;
    background: #fff;
}

.adex-grid-export-button:hover {
    background: #17365d;
    color: #fff;
    transform: translateY(-1px);
}

.adex-grid-export-button.pdf {
    border-color: #b3261e;
    color: #b3261e;
}

.adex-grid-export-button.pdf:hover {
    background: #b3261e;
    color: #fff;
}

:root {
    --blazor-load-percentage: 0%;
    --blazor-load-percentage-text: "0%";
}

body.adex-starting {
    overflow: hidden;
}

.adex-appbar-brand {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    height: 62px;
    overflow: hidden;
    width: 190px;
}

.adex-appbar-brand img {
    display: block;
    filter: contrast(1.35) brightness(1.02);
    height: auto;
    mix-blend-mode: screen;
    transform: none;
    width: 100%;
}

.adex-boot-screen {
    align-items: center;
    background:
        radial-gradient(circle at 18% 12%, rgba(241, 184, 6, .09), transparent 30rem),
        radial-gradient(circle at 84% 82%, rgba(30, 75, 105, .3), transparent 35rem),
        #06111b;
    display: flex;
    inset: 0;
    justify-content: center;
    overflow: hidden;
    padding: 16px;
    position: fixed;
    transition: opacity .32s ease, visibility .32s ease;
    z-index: 10000;
}

.adex-boot-screen.adex-splash-exiting {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.adex-boot-screen::before,
.adex-boot-screen::after {
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 50%;
    content: "";
    height: 38rem;
    pointer-events: none;
    position: absolute;
    width: 38rem;
}

.adex-boot-screen::before {
    left: -20rem;
    top: -24rem;
}

.adex-boot-screen::after {
    bottom: -27rem;
    right: -18rem;
}

.adex-boot-shell {
    box-sizing: border-box;
    max-height: calc(100vh - 32px);
    position: relative;
    width: min(1180px, 96vw, calc((100vh - 180px) * 1.7142857));
    z-index: 1;
}

.adex-splash-stage {
    aspect-ratio: 12 / 7;
    border: 1px solid rgba(127, 151, 169, .18);
    border-radius: clamp(10px, 1.5vw, 18px);
    box-shadow: 0 28px 75px rgba(0, 0, 0, .42);
    overflow: hidden;
    position: relative;
    width: 100%;
}

.adex-construction-art,
.adex-construction-art > img {
    border: 0;
    display: block;
    height: 100%;
    width: 100%;
}

#adex-startup-percentage {
    color: #f1b806;
    font: 700 clamp(.78rem, 1.7vw, .98rem) Montserrat, Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    min-width: 3.35em;
    text-align: right;
}

#adex-startup-percentage::after {
    content: var(--blazor-load-percentage-text, "0%");
}

.adex-loader-panel {
    background: rgba(8, 24, 37, .94);
    border: 1px solid rgba(127, 151, 169, .22);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
    margin: -1px auto 0;
    padding: 14px clamp(18px, 3vw, 34px) 15px;
    position: relative;
    width: min(880px, 88%);
}

.adex-loader-heading {
    align-items: center;
    color: #eff4f6;
    display: flex;
    font-family: Montserrat, Arial, sans-serif;
    font-size: clamp(.72rem, 1.6vw, .92rem);
    font-weight: 600;
    gap: 16px;
    justify-content: space-between;
    letter-spacing: .01em;
}

.adex-loader-kicker {
    color: #7f97a9;
    font-size: .72em;
    font-weight: 700;
    letter-spacing: .16em;
    white-space: nowrap;
}

.adex-loader-progress {
    align-items: baseline;
    color: #7f97a9;
    display: flex;
    font: 600 clamp(.66rem, 1.35vw, .76rem) Montserrat, Arial, sans-serif;
    justify-content: space-between;
    letter-spacing: .02em;
    margin-top: 9px;
}

.adex-loader-track {
    background: rgba(127, 151, 169, .2);
    border-radius: 999px;
    height: 5px;
    margin-top: 5px;
    overflow: hidden;
    position: relative;
}

.adex-loader-track::after {
    background: linear-gradient(90deg, #b78600, #f1b806, #ffe39a);
    border-radius: inherit;
    box-shadow: 0 0 16px rgba(241, 184, 6, .45);
    content: "";
    inset: 0 auto 0 0;
    position: absolute;
    width: var(--blazor-load-percentage, 0%);
    transition: width .25s ease;
}

.adex-loader-status {
    color: #7f97a9;
    font-family: Montserrat, Arial, sans-serif;
    font-size: clamp(.66rem, 1.4vw, .76rem);
    line-height: 1.5;
    margin: 8px 0 0;
    min-height: 1.1rem;
}

.adex-loader-reload,
.adex-loader-skip {
    background: #f1b806;
    border: 1px solid #f1b806;
    border-radius: 8px;
    color: #081521;
    cursor: pointer;
    font: 700 .82rem Montserrat, Arial, sans-serif;
    margin-top: 10px;
    padding: 9px 16px;
}

.adex-loader-reload:hover,
.adex-loader-reload:focus-visible,
.adex-loader-skip:hover,
.adex-loader-skip:focus-visible {
    background: #ffd65c;
}

.adex-loader-skip {
    display: block;
    margin-inline-start: auto;
}

.adex-boot-shell.adex-startup-failed .adex-loader-track::after {
    background: #b3261e;
}

.adex-boot-shell.adex-startup-failed .adex-loader-status {
    color: #ffaaa4;
    font-weight: 600;
}

@media (max-width: 640px) {
    .adex-boot-screen {
        padding: 10px;
    }

    .adex-boot-shell {
        max-height: calc(100vh - 20px);
        width: min(96vw, calc((100vh - 190px) * 1.7142857));
    }

    .adex-loader-heading {
        display: block;
    }

    .adex-loader-kicker {
        display: none;
    }

    .adex-loader-panel {
        padding: 12px 16px 13px;
        width: 92%;
    }

    .adex-appbar-brand {
        height: 56px;
        width: 160px;
    }

    .adex-appbar-brand img {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .adex-logo-animated {
        animation: none !important;
    }
}

#adex-version-button { position:fixed;bottom:8px;left:12px;z-index:1200;font:12px Arial,sans-serif;border:1px solid #ccd6df;border-radius:5px;background:#fff;color:#17365d;padding:5px 9px;cursor:pointer; }
#adex-version-dialog { margin:auto;max-width:540px;width:calc(100% - 32px);padding:24px;border:1px solid #ccd6df;border-radius:10px;color:#17365d;box-shadow:0 8px 35px #0005;font:14px Arial,sans-serif; }
#adex-version-dialog::backdrop { background:#001b3166; }
#adex-version-dialog h2 { margin-bottom:12px;font-size:21px; }
#adex-version-dialog p { margin:12px 0; }
#adex-version-dialog dt { font-weight:600;margin-top:12px; }
#adex-version-dialog dd { margin:4px 0;overflow-wrap:anywhere; }
.adex-version-actions { display:flex;flex-wrap:wrap;gap:8px;margin-top:16px; }
.adex-version-actions button,#adex-app-update button { padding:8px 12px;cursor:pointer;border:1px solid #ccd6df;border-radius:4px;background:#fff;color:#17365d; }
#adex-app-update { position:fixed;bottom:36px;right:16px;max-width:420px;z-index:2000;padding:16px;background:#17365d;color:white;border-radius:8px;box-shadow:0 3px 12px #0004; }
#adex-app-update p { margin-bottom:12px; }

.adex-boot-screen::before { animation: adexAmbientDrift 7s ease-in-out infinite alternate; }
.adex-boot-screen::after { animation: adexAmbientDrift 9s ease-in-out infinite alternate-reverse; }
.adex-splash-stage::after { content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(110deg,transparent 30%,#f1b8060a 48%,transparent 65%);transform:translateX(-100%);animation:adexLightSweep 3s ease-in-out infinite; }
.adex-boot-badge { position:absolute;top:clamp(10px,2vw,24px);left:clamp(12px,2vw,26px);z-index:2;display:flex;gap:12px;align-items:center;color:#eff4f6;font:700 15px system-ui,sans-serif;letter-spacing:.14em; }
.adex-boot-badge img { border-radius:9px;box-shadow:0 0 0 5px #f1b8060d;animation:adexBrandPulse 2s ease-in-out infinite; }
.adex-boot-live { display:block;color:#9bb1c2;font-size:10px;font-weight:400;letter-spacing:.04em;margin-top:4px; }
.adex-loader-track::before { content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,#fff5,transparent);width:30%;animation:adexTrackSweep 1.6s ease-in-out infinite;z-index:1; }
.adex-startup-failed .adex-loader-track::before { animation:none;display:none; }
.adex-update-heading { display:flex;gap:14px;align-items:center; }
#adex-version-dialog .adex-update-heading h2 { margin:0; }
.adex-update-heading img { border-radius:12px; }
.adex-update-progress { background:#f1f6fb;border:1px solid #d5e2ef;border-radius:12px;padding:16px;margin:16px 0; }
.adex-update-progress[hidden] { display:none; }
.adex-update-progress-summary { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px; }
.adex-update-phase { display:flex;gap:8px;align-items:center;font-weight:600; }
.is-busy .adex-update-phase::before { content:"";width:14px;height:14px;border:2px solid #ccd6df;border-top-color:#00345b;border-radius:50%;animation:adexUpdateSpin .8s linear infinite; }
.adex-update-percent { font-size:22px;font-variant-numeric:tabular-nums;color:#00345b; }
.adex-update-progress progress { appearance:none;display:block;width:100%;height:9px;border:0;border-radius:999px;overflow:hidden;background:#dae4ee;accent-color:#b88700; }
.adex-update-progress progress::-webkit-progress-bar { background:#dae4ee;border-radius:999px; }
.adex-update-progress progress::-webkit-progress-value { background:linear-gradient(90deg,#bd8c00,#f1b806);border-radius:999px;transition:width .25s; }
.adex-update-progress progress::-moz-progress-bar { background:#d6a000;border-radius:999px; }
.adex-update-progress progress:indeterminate { background:linear-gradient(90deg,#dae4ee 20%,#f1b806 48%,#dae4ee 75%);background-size:200% 100%;animation:adexUpdateIndeterminate 1.2s linear infinite; }
#adex-version-dialog .adex-update-files { color:#476078;font-size:12px;line-height:1.5;margin:10px 0; }
.adex-update-steps { display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;border-top:1px solid #d5e2ef;padding-top:12px;color:#476078;font-size:11px; }
.adex-version-actions button:disabled,#adex-app-update button:disabled { opacity:.6;cursor:wait; }
.adex-version-actions button[data-action="reload"] { background:#00345b;color:white;border-color:#00345b; }
@keyframes adexAmbientDrift { to { transform:translate(35px,20px) scale(1.08); } }
@keyframes adexLightSweep { to { transform:translateX(100%); } }
@keyframes adexBrandPulse { 50% { box-shadow:0 0 0 9px #f1b80606,0 0 28px #f1b80622; } }
@keyframes adexTrackSweep { to { transform:translateX(340%); } }
@keyframes adexUpdateSpin { to { transform:rotate(360deg); } }
@keyframes adexUpdateIndeterminate { to { background-position:-200% 0; } }
@media (prefers-reduced-motion:reduce) {
    .adex-boot-screen,.adex-loader-track::after,.adex-update-progress progress::-webkit-progress-value { transition:none; }
    .adex-boot-screen::before,.adex-boot-screen::after,.adex-splash-stage::after,.adex-boot-badge img,.adex-loader-track::before,.is-busy .adex-update-phase::before,.adex-update-progress progress:indeterminate { animation:none; }
}
