html,
body {
    font-family: oswald, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    min-height: 100%;
    min-height: -webkit-fill-available;
    width: 100%;
    min-width: 100vw;
    min-width: -webkit-fill-available;
    overflow: hidden;
    overscroll-behavior: none;
}

#app {
    display: flex;
    flex-direction: column;
    
    height: 100%;
    height: -webkit-fill-available;
    width: 100%;
    width: -webkit-fill-available;

    min-width: 100vw;
    min-width: -webkit-fill-available;
    overflow: hidden;
}


.navmenu {
    position: relative;
    width:100%;
    background-image: linear-gradient(180deg, #2152a3 0%, #14305c 100%);
    background-color: #2152a3;
    box-shadow: 0 2px 8px rgba(20, 48, 92, 0.08);
}
.bottombar {
    background-image: linear-gradient(0deg, #2152a3 0%, #14305c 100%);
    background-color: #2152a3;
    padding-bottom: calc(.25rem + env(safe-area-inset-bottom, 0px));
}
.safe-area-top {
    height: env(safe-area-inset-top, 0px);
    width: 100%;
}
.safe-area-left {
    width: env(safe-area-inset-left, 0px);
}
.safe-area-right {
    width: env(safe-area-inset-right, 0px);
}
.safe-area-bottom {
    height: env(safe-area-inset-bottom, 0px);
    width: 100%;
}

@media (prefers-color-scheme: dark) {
    .navmenu {
        background-image: linear-gradient(180deg, #2f3233 0%, #080a0b 70%);
        background-color: #181a1b;
    }
    .bottombar {
        background-image: linear-gradient(0deg, #2f3233 0%, #080a0b 0%);
        background-color: #181a1b;
    }
}

h1:focus {
    outline: none;
}

a,
.btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.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."
}

.loading-progress {
    position: relative;
    display: block;
    width: 101px;
    height: 101px;
    /* 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;
}

.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;
}


/* Custom */

@font-face {
    font-family: oswald;
    src: url('../fonts/Oswald-VariableFont_wght.ttf');
}

.oswald {
    font-family: oswald;
}

.fs-xxl {
    font-size: xx-large;
}

.fs-xl {
    font-size: x-large;
}

.fs-larger {
    font-size: larger;
}

/* ===== Print styles for monthly reports ===== */
@page { size: A4; margin: 12mm; }
@media print {
    /* Ensure full document prints, not just viewport */
    html, body, #app {
        height: auto !important;
        min-height: auto !important;
        width: auto !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    /* Neutralize app layout constraints during print */
    .position-absolute, .position-fixed {
        position: static !important;
        inset: auto !important;
        top: auto !important; right: auto !important; bottom: auto !important; left: auto !important;
    }
    .overflow-hidden, .overflow-auto, .overflow-scroll {
        overflow: visible !important;
    }
    .safe-area-left, .safe-area-right, .safe-area-top, .safe-area-bottom {
        display: none !important;
    }
    .navmenu, .navbar, .btn, .no-print { display: none !important; }
    body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .page-break { break-after: page; }
}
.print-root { max-width: 900px; margin: 0 auto; }
.report-page { break-inside: avoid-page; page-break-inside: avoid; padding-bottom: 0.6rem; margin-bottom: 0.8rem; }
.report-page:not(:last-child) { border-bottom: 1px dashed #ddd; break-after: page; page-break-after: always; }
.report-page img { max-width: 100%; height: auto; }

/* Compact badges and meta text for print */
.report-meta { line-height: 1.1; }
.report-section .badge { font-weight: 400; border-color: #ccc; }
.badge { padding: 0.2rem 0.4rem; font-size: 0.75rem; }

/* Cover image: full width but limited height to avoid page overflow */
.report-cover img { max-height: 210mm; width: 100%; height: auto; object-fit: contain; }

/* Gallery images: constrain portrait heights to prevent page-outgrowing */
.report-gallery img { max-height: 90mm; width: 100%; height: auto; object-fit: contain; }

/* Long descriptions wrap cleanly */
.report-description { white-space: normal; line-height: 1.25; }

/* Metric row: label-over-value blocks laid horizontally */
.report-metrics { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: stretch; }
.report-metrics .metric { min-width: 90px; flex: 0 1 auto; border: 1px solid #ddd; border-radius: 6px; padding: 6px 8px; }
.report-metrics .metric-label { font-size: 0.68rem; line-height: 1; color: #666; text-transform: uppercase; letter-spacing: .02em; }
.report-metrics .metric-value { font-size: 0.95rem; line-height: 1.1; margin-top: 2px; }

.fs-large {
    font-size: large;
}

.fs-small {
    font-size: small;
}

.fs-smaller {
    font-size: smaller;
}

.fs-xs {
    font-size: x-small;
}

.fs-xxs {
    font-size: xx-small;
}

.ti {
    font-size: 30px;
}

.ti.right {
    margin-right: 8px;
}

.ti.right.last {
    margin-right: 12px;
}

.ti.left {
    margin-left: 8px;
}

.ti.left.first {
    margin-left: 12px;
}

/* Hide number input spinners for cleaner appearance */
.no-spinner::-webkit-outer-spin-button,
.no-spinner::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.no-spinner[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

/* Spinning animation for save indicators */
.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Menu slide transitions */
.slide-in-right { animation: slideInRight .25s ease-out; }
.slide-in-left  { animation: slideInLeft  .25s ease-out; }
@keyframes slideInRight {
    from { transform: translateX(30px); opacity: .0; }
    to   { transform: translateX(0);    opacity: 1;  }
}
@keyframes slideInLeft {
    from { transform: translateX(-30px); opacity: .0; }
    to   { transform: translateX(0);     opacity: 1;  }
}

/* Showcase card flip (moved from RCL scoped CSS) */
.card-flip { perspective: 1000px; }
.card-flip .card-flip-inner { position: relative; width: 100%; transform-style: preserve-3d; transition: transform 0.4s ease; }
.card-flip.flipped .card-flip-inner { transform: rotateY(180deg); }
.card-flip .card-front, .card-flip .card-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card-flip .card-back { position: absolute; inset: 0; transform: rotateY(180deg); }