#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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;
}

:root {
    /* main font size variable, changed from default 16px */
    --rz-root-font-size: 13px;
    font-size: var(--rz-root-font-size);
}

body {
    font-family: var(--rz-text-font-family);
    color: var(--rz-text-color);
    font-size: var(--rz-body-font-size);
    line-height: var(--rz-body-line-height);
    background-color: var(--rz-body-background-color);
}

.rz-body {
    --rz-body-padding: 0;
}

a {
    color: var(--rz-link-color);
}

a:hover,
a:focus {
    color: var(--rz-link-hover-color);
}

.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: 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");
}

.validation-message {
    color: var(--rz-danger);
}

/* Obavezna polja – bold label + crvena zvjezdica */
label.field-required {
    font-weight: bold;
}
label.field-required::after {
    content: " *";
    color: var(--rz-danger);
}

/* Neobavezna polja koja iz vizualne dosljednosti ipak trebaju bold label, bez zvjezdice */
label.field-bold {
    font-weight: bold;
}

.bgred td {
    background-color: var(--rz-danger-light) !important;
}
.form-container {
    position: relative; /* Important for overlay to stay inside */
}

.loading-overlay {
    position: absolute; /* Relative to .form-container */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px); /* Apply blur effect to the form */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.rz-dialog-content-custom{
    height: 100%;
}

/* Dialogs opened with DialogSizes.* (Client/Components/DialogSizes.cs) and the page body
   (MainLayout) are size containers, so a form reacts to the width it actually has rather than
   the viewport's. */
.erp-form-dialog .rz-dialog-content,
.erp-page-container {
    container-type: inline-size;
}

/* The page body may grow to 2400px (MainLayout). Text-heavy pages that read badly at that
   width wrap their content in this class to keep the former 1440px measure. */
.erp-page-narrow {
    max-width: 1440px;
    margin-inline: auto;
}

/* Opt-in on a virtualized RadzenDataGrid: fill the window height instead of a fixed page
   size. Set --erp-grid-fill-offset on the grid when the page has more chrome above it. */
.erp-grid-fill {
    height: calc(100vh - var(--erp-grid-fill-offset, 14rem));
    min-height: 20rem;
}

/* Opt-in on a paged RadzenDataGrid: grow with the rows up to the window height, then scroll
   inside with the pager still visible. Same offset variable as .erp-grid-fill. */
.erp-grid-fit {
    max-height: calc(100vh - var(--erp-grid-fill-offset, 14rem));
    min-height: 20rem;
}

/* Opt-in on a list page's root stack: the page takes the body's height and an .erp-grid-fit
   grid that is its direct child takes whatever is left below the title and filters. Works the
   same under the sidebar and the top menu, so the grid needs no --erp-grid-fill-offset. On a
   window too low for the 20rem minimum the body scrolls as before. */
.rz-body:has(.erp-page-fill) {
    display: flex;
    flex-direction: column;
}

/* width: the row centres itself with auto margins, which in a flex column would shrink it to
   its content. nowrap: a single-line row stretches the page column to the row's height; a
   wrapping one sizes it to its content. */
.rz-body:has(.erp-page-fill) > .rz-row {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    flex-wrap: nowrap;
    /* The layout's 3rem bottom gap (rz-pb-lg-12) is for pages that scroll; here it would only
       take height from the grid. Radzen's spacing classes are !important. */
    padding-bottom: 1rem !important;
}

.erp-page-container:has(> .erp-page-fill) {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.erp-page-fill {
    flex: 1 1 auto;
    min-height: 0;
}

.erp-page-fill > .erp-grid-fit {
    flex: 1 1 0;
    max-height: none;
}

/* When the grid sits in a wrapper (e.g. fin-grid-wrap for its loading overlay), the wrapper is
   the flex item and passes the height on to the grid. */
.erp-page-fill > .erp-grid-slot {
    flex: 1 1 0;
    min-height: 20rem;
    display: flex;
    flex-direction: column;
}

.erp-grid-slot > .erp-grid-fit {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
}

/* Filter bar (Client/Components/FilterBar): fixed-width fields that wrap, so more room fits
   more fields per line instead of stretching the same ones. */
.erp-filter-card.rz-card {
    padding: 0.75rem 1rem;
}

.erp-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 1rem;
}

.erp-filter-advanced {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: var(--rz-border-base-200, 1px solid #e0e0e0);
}

.erp-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 100%;
}

.erp-filter-label {
    font-size: 0.8125rem;
    color: var(--rz-text-secondary-color);
}

.erp-filter-w-date { width: 9rem; }
.erp-filter-w-range { width: 18.5rem; }
.erp-filter-w-short { width: 14rem; }
.erp-filter-w-long { width: 20rem; }

.erp-filter-range {
    display: flex;
    gap: 0.5rem;
}

.erp-filter-range > * {
    flex: 1 1 0;
    min-width: 0;
}

.erp-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.erp-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.625rem;
}

.erp-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 24rem;
    padding: 0.125rem 0.25rem 0.125rem 0.625rem;
    border-radius: 1rem;
    background-color: var(--rz-base-200);
    color: var(--rz-text-color);
    font-size: 0.8125rem;
    white-space: nowrap;
}

.erp-filter-chip > span:not(.erp-filter-chip-label) {
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-filter-chip-label {
    color: var(--rz-text-secondary-color);
}

.erp-filter-chip-remove {
    display: inline-flex;
    padding: 0.125rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.erp-filter-chip-remove:hover {
    background-color: var(--rz-base-300);
}

.erp-filter-chip-remove .rzi {
    font-size: 1rem;
}

/* Opt-in on the form root: label/field rows flow into two columns once the dialog is wide
   enough. Anything that is not a row (buttons, alerts) and rows marked .erp-span-all keep the
   full width. */
@container (min-width: 1000px) {
    .erp-form-reflow {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 2rem;
        align-items: start;
    }

    .erp-form-reflow > :not(.rz-row),
    .erp-form-reflow > .erp-span-all {
        grid-column: 1 / -1;
    }
}

.rz-panel-content-wrapper {
    flex: auto;
    margin: 1.4375rem 0 0 0;
}

.rz-panel-content {
    height: 100%;
    margin: 0;
}

.e-pv-previous-page-navigation-icon::before {
    content: '\e765';
}

.e-pv-next-page-navigation-icon::before {
    content: '\e748';
}

.e-pv-download-document-icon::before {
    content: '\e7a1';
}

.e-pv-print-document-icon::before {
    content: '\e75d';
}

.e-pv-zoom-out-icon::before {
    content: '\e81b';
}

.e-pv-zoom-in-icon::before {
    content: '\e768';
}

.rz-data-grid .wom-task-row-completed > td {
    background: #dcfce7 !important;
}

.rz-data-grid .wom-task-row-completed:hover > td {
    background: #bbf7d0 !important;
}

.rz-data-grid .wom-task-row-pending > td {
    background: #fed7aa !important;
}

.rz-data-grid .wom-task-row-pending:hover > td {
    background: #fdba74 !important;
}

.bpm-linked-workorder-grid {
    width: 100%;
    max-width: 100%;
}

.bpm-linked-workorder-grid .rz-datatable-tablewrapper,
.bpm-linked-workorder-grid .rz-datatable-scrollable-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.bpm-linked-workorder-grid .rz-grid-table,
.bpm-linked-workorder-grid table {
    min-width: 820px;
}

.bpm-instances-grid {
    width: 100%;
    max-width: 100%;
}

.bpm-instances-grid .rz-datatable-tablewrapper,
.bpm-instances-grid .rz-datatable-scrollable-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.bpm-instances-grid .rz-grid-table,
.bpm-instances-grid table {
    min-width: 1540px;
}

.ir-clickable-row {
    cursor: pointer;
}

/* Make icon buttons visible on selected (primary-lighter) rows */
.rz-data-grid tr.rz-background-color-primary-lighter .rz-button {
    color: var(--rz-on-primary-lighter, #fff) !important;
}
.rz-data-grid tr.rz-background-color-primary-lighter .rz-button.rz-button-danger {
    color: #ffcdd2 !important;
}

/* --------------------------------------------------------------------------
   AI assistant panel (T-3120, spec §11.1).
   A right-hand panel rather than a second RadzenSidebar: RadzenLayout's grid
   already owns rz-sidebar on the left, and a second one fights it for the area.
   -------------------------------------------------------------------------- */
.ai-assistant-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(480px, 100vw);
    /* Stage 3 §10.2 (S12): one panel with the help panel's behaviour - above Radzen dialogs and their mask
       (--rz-dialog-zindex 1001), so record context from dialog forms works; notifications (1002) stay on top.
       Esc inside it is stopped there (irHelp). Trade-off as for help (help spec §14.4): it covers the right
       edge of a wide dialog, including one opened from a result grid. */
    z-index: var(--rz-dialog-zindex, 1001);
    display: flex;
    flex-direction: column;
    background: var(--rz-base-background-color);
    border-left: var(--rz-panel-border);
    box-shadow: -2px 0 12px rgba(0, 0, 0, .12);
    transform: translateX(100%);
    transition: transform .2s ease-in-out;
}

.ai-assistant-panel--open {
    transform: translateX(0);
}

/* Stepped aside for a dialog the user clicked into; the handle below brings it back (owner, 2026-11-07). */
.ai-assistant-panel--open.ai-assistant-panel--stashed {
    transform: translateX(100%);
}

/* Handle of a stashed panel: a vertical tab at the right edge, above dialogs and their mask. */
.ai-assistant-handle {
    position: fixed;
    right: 0;
    top: 40%;
    z-index: calc(var(--rz-dialog-zindex, 1001) + 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    padding: .6rem .35rem;
    border: none;
    border-radius: 8px 0 0 8px;
    background: var(--rz-primary);
    color: var(--rz-on-primary);
    box-shadow: -2px 0 8px rgba(0, 0, 0, .2);
    cursor: pointer;
}

.ai-assistant-handle__text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: .8125rem;
    font-weight: 600;
}

/* Widen toggle (stage 3 §10.2): room for result grids. */
.ai-assistant-panel--wide {
    width: min(660px, 100vw);
}

/* Upute | Asistent tabs shared by the help and assistant panels (stage 3 §10.2). Fixed font weight on the
   active tab: the tabs must not change width when switching. */
.ir-side-tabs {
    display: flex;
    flex: 0 0 auto;
    border-bottom: var(--rz-panel-border);
}

.ir-side-tabs__tab {
    flex: 1 1 0;
    padding: .5rem .75rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--rz-text-secondary-color);
    font: inherit;
    cursor: pointer;
}

.ir-side-tabs__tab--active {
    color: var(--rz-text-color);
    border-bottom-color: var(--rz-primary);
}

.ai-turn__help-link {
    color: var(--rz-primary);
    text-decoration: underline;
}

.ai-assistant-panel__header {
    border-bottom: var(--rz-panel-border);
    flex: 0 0 auto;
}

/* Composer in the upper third, answers in the lower two thirds; each scrolls on its own. */
.ai-assistant-panel__composer {
    flex: 0 0 33.333%;
    overflow-y: auto;
    border-bottom: var(--rz-panel-border);
}

.ai-assistant-panel__log {
    flex: 1 1 auto;
    overflow-y: auto;
}

/* Muted text. Not rz-color-secondary: that is the palette's "secondary" (the secondary button
   shade, #2e2e2e in Fluent Dark), which vanishes on the dark panel. The text token follows the
   theme in both directions. */
.ai-muted {
    color: var(--rz-text-secondary-color);
}

/* Captions in the composer are RadzenText spans; inline elements ignore vertical margins, so
   the rz-mt-* spacing above "Nedavna pitanja" and the disclaimer only works once they are blocks. */
.ai-assistant-panel__caption {
    display: block;
}

/* Example chips wrap and keep their full text; nothing here is worth an ellipsis. */
.ai-assistant-panel__example {
    white-space: normal;
    text-align: left;
}

.ai-turn + .ai-turn {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: var(--rz-panel-border);
}

.ai-turn__question {
    font-weight: 600;
    margin-bottom: .35rem;
}

.ai-turn__answer {
    white-space: pre-wrap;
    margin-bottom: .25rem;
}

/* A wide result must scroll inside the panel, never widen it. */
.ai-result {
    overflow-x: auto;
}

/* Confirmation card of an assistant proposal (stage 3 §8.1). Same rule: scroll, never widen the panel. */
.ai-action-card {
    margin-top: .5rem;
    overflow-x: auto;
}

.ai-action-card__lines {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .15rem .75rem;
    margin: .5rem 0;
}

.ai-action-card__lines dt {
    color: var(--rz-text-secondary-color);
}

.ai-action-card__lines dd {
    margin: 0;
}

.ai-action-card__items {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.ai-action-card__items th,
.ai-action-card__items td {
    padding: .2rem .4rem;
    border-bottom: 1px solid var(--rz-border-color);
    text-align: left;
}

.ai-action-card__state {
    margin-top: .5rem;
    font-size: .875rem;
}

/* Hand-off card (stage 3 §3.4): which list, how many, which button to press there. */
.ai-handoff-card {
    margin-top: .5rem;
}

.ai-handoff-card__hint {
    font-size: .875rem;
}

/* Guided-process card (stage 3 §20.5): steps as a list; the current one carries its buttons. */
.ai-process-card {
    margin-top: .5rem;
    overflow-x: auto;
}

.ai-process-card__summary {
    font-size: .875rem;
    margin-top: .1rem;
}

.ai-process-card__summary-main {
    font-weight: 600;
}

.ai-process-card__steps {
    list-style: none;
    margin: .5rem 0 0;
    padding: 0;
}

.ai-process-card__step {
    display: flex;
    gap: .5rem;
    padding: .3rem 0;
    border-bottom: 1px solid var(--rz-border-color);
}

.ai-process-card__step:last-child {
    border-bottom: none;
}

.ai-process-card__icon {
    flex: none;
    color: var(--rz-text-secondary-color);
}

.ai-process-card__step--done .ai-process-card__icon {
    color: var(--rz-success);
}

.ai-process-card__step--current .ai-process-card__icon {
    color: var(--rz-primary);
}

.ai-process-card__step--current .ai-process-card__name {
    font-weight: 600;
}

.ai-process-card__step--pending .ai-process-card__name,
.ai-process-card__step--skipped .ai-process-card__name,
.ai-process-card__step--unavailable .ai-process-card__name {
    color: var(--rz-text-secondary-color);
}

.ai-process-card__body {
    min-width: 0;
    flex: 1;
}

.ai-process-card__note {
    font-size: .8125rem;
}

.ai-process-card__elements {
    margin: .25rem 0 0;
    padding-left: 1rem;
    font-size: .875rem;
}

.ai-process-card__state {
    margin-top: .5rem;
    font-size: .875rem;
}

.ai-assistant-panel__processes {
    border-bottom: 1px solid var(--rz-border-color);
    max-height: 45%;
    overflow-y: auto;
}

.ai-assistant-panel__processes-toggle--on {
    color: var(--rz-primary);
}

/* Top menu (Client/Layout/Menu/TopMenu.razor), shown instead of the sidebar when the user picks it. */
/* Radzen colours header links with the body text colour; the brand takes the header's. */
.rz-header .ir-header-brand,
.rz-header .ir-header-brand .rz-text-subtitle1 {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--rz-header-color);
}

.ir-top-menu {
    min-width: 0;
    margin-top: .25rem;
}

/* The measuring render lays every module out once, hidden; it must not widen the page meanwhile. */
.ir-top-menu--measuring {
    visibility: hidden;
    overflow: hidden;
}

.ir-top-menu .rz-menu > .rz-navigation-item {
    flex-shrink: 0;
}

/* The last item (usually "Više") opens leftwards so its dropdown cannot run off the right edge. */
.ir-top-menu .rz-menu > .rz-navigation-item:last-child > .rz-navigation-menu {
    right: 0;
    left: auto;
}

/* A module's dropdown scrolls instead of running off the screen. Lists nested in it ("Više") expand in place. */
.ir-top-menu .rz-menu > .rz-navigation-item > .rz-navigation-menu {
    max-height: calc(100dvh - 8rem);
    overflow-y: auto;
}

/* Groups are headings inside the dropdown, not another level. A tinted band with an accent bar sets
   each group off from the pages above it; the theme's primary colour keeps it right in light and dark. */
.ir-top-menu .ir-menu-heading {
    margin-top: .375rem;
    padding-block: .375rem;
    padding-inline: var(--rz-menu-item-padding-inline);
    border-top: 1px solid color-mix(in srgb, var(--rz-text-color) 15%, transparent);
    box-shadow: inset 3px 0 0 var(--rz-primary);
    background: color-mix(in srgb, var(--rz-primary) 12%, transparent);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--rz-text-color);
    pointer-events: none;
}

/* Backstop for long labels without a short name; the full label is the tooltip. */
.ir-top-menu .rz-navigation-menu .rz-navigation-item-text {
    display: inline-block;
    max-width: 22rem;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}
/* The module holding the current page. An underline, not bold: bold would change the item widths the
   overflow arithmetic has cached. */
.ir-top-menu .rz-menu > .rz-navigation-item.ir-top-menu-active > .rz-navigation-item-wrapper {
    box-shadow: inset 0 -3px 0 var(--rz-header-color);
}

.ir-menu-breadcrumb {
    margin-bottom: .75rem;
}
/* --------------------------------------------------------------------------
   In-app help panel (docs/help/help-system-spec.md §6.2).
   Same shape as the AI panel, but ABOVE Radzen dialogs: it is opened from a
   dialog's HelpLink and must be readable beside the form. Equal z-index to the
   dialog (--rz-dialog-zindex, 1001); rendered after RadzenComponents in the DOM,
   so it wins the tie. Notifications (1002) stay on top of both.
   -------------------------------------------------------------------------- */
.ir-help-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(480px, 100vw);
    z-index: var(--rz-dialog-zindex, 1001);
    display: flex;
    flex-direction: column;
    background: var(--rz-base-background-color);
    border-left: var(--rz-panel-border);
    box-shadow: -2px 0 12px rgba(0, 0, 0, .12);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .2s ease-in-out, visibility 0s linear .2s;
}

.ir-help-panel--open {
    transform: translateX(0);
    visibility: visible;
    transition: transform .2s ease-in-out, visibility 0s;
}

.ir-help-panel__header {
    border-bottom: var(--rz-panel-border);
    flex: 0 0 auto;
}

.ir-help-panel__title {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ir-help-panel__body {
    flex: 1 1 auto;
    overflow-y: auto;
}

.ir-help-panel__list,
.ir-help-toc {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.ir-help-panel__list li,
.ir-help-toc li {
    padding: .2rem 0;
}

.ir-help-toc--active .rz-link-text {
    font-weight: 600;
}

/* Topic body: headings smaller than page headings — the topic is a document inside a page or panel. */
.ir-help-topic .rz-markdown h2 { font-size: 1.25rem; margin-top: 1.5rem; }
.ir-help-topic .rz-markdown h3 { font-size: 1.05rem; margin-top: 1rem; }
.ir-help-topic .rz-markdown blockquote {
    margin: 1rem 0;
    padding: .5rem 1rem;
    border-left: 4px solid var(--rz-primary);
    background: var(--rz-base-100, rgba(0, 0, 0, .03));
}

/* "Polja": one collapsible group per tab. */
.ir-help-topic__fields {
    /* Not --rz-panel-border: empty in Material 3, which left the groups without an outline. */
    border: 1px solid var(--rz-base-300, rgba(0, 0, 0, .12));
    border-radius: var(--rz-border-radius, 4px);
    margin: .5rem 0;
    padding: .25rem .75rem;
}

.ir-help-topic__fields > summary {
    cursor: pointer;
    font-weight: 600;
    padding: .25rem 0;
}

/* Help screenshots (Playwright capture, spec §8): fit the panel, open full size on click (interop.js). */
.ir-help-topic .rz-markdown img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--rz-base-300, rgba(0, 0, 0, .12));
    border-radius: var(--rz-border-radius, 4px);
    cursor: zoom-in;
}

/* --------------------------------------------------------------------------
   New version downloading / ready (App.razor, service-worker update script).
   Fixed in the empty middle of the header row, so both menu layouts show it
   without the menu overflow arithmetic measuring it; above dialogs, a document
   dialog may be open for an hour.
   -------------------------------------------------------------------------- */
.ir-app-update {
    position: fixed;
    top: .5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: .5rem;
    max-width: calc(100vw - 2rem);
    padding: .25rem .75rem;
    border-radius: 999px;
    background: var(--rz-info-lighter, #e3f2fd);
    color: var(--rz-on-info-lighter, #0d47a1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    font-size: .875rem;
    white-space: nowrap;
    cursor: default;
}

.ir-app-update[hidden],
.ir-app-update__apply[hidden] {
    display: none;
}

.ir-app-update[data-status="ready"] {
    background: var(--rz-success-lighter, #e8f5e9);
    color: var(--rz-on-success-lighter, #1b5e20);
}

.ir-app-update__icon {
    font-size: 1.25rem;
}

.ir-app-update[data-status="downloading"] .ir-app-update__icon,
.ir-app-update[data-status="applying"] .ir-app-update__icon {
    animation: ir-app-update-spin 1.5s linear infinite;
}

@keyframes ir-app-update-spin {
    to { transform: rotate(-360deg); }
}

.ir-app-update__text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.ir-app-update__apply {
    border: 0;
    border-radius: 999px;
    padding: .125rem .75rem;
    background: var(--rz-success, #2e7d32);
    color: var(--rz-on-success, #fff);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* Phones: the header is full of buttons; sit at the bottom instead. */
@media (max-width: 767px) {
    .ir-app-update {
        top: auto;
        bottom: 1rem;
    }
}

/* Prefilled field marker (stage 3 spec §20.3): sits after a field label, tooltip names the source. */
.erp-prefill-marker {
    display: inline-flex;
    align-items: center;
    margin-inline-start: 0.25rem;
    color: var(--rz-info);
    cursor: help;
    vertical-align: middle;
}

.erp-prefill-marker .rzi {
    font-size: 1rem;
}

/* ===== Dinamički izvještaji (Edu): radni ekran, dvije zone - postavke lijevo, sažetak izvoza desno ===== */
.erp-report {
    max-width: 78rem;
}

.erp-report-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1023px) {
    .erp-report-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.erp-report-main {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* razmak između skupina veći od razmaka unutar skupine */
}

.erp-report-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
}

.erp-report-section > h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.erp-report-hint {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--rz-text-secondary-color);
}

/* Sažetak izvoza: druga neutralna ploha, lijepi se uz vrh dok se lijevo skrola. */
.erp-report-summary {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
}

.erp-report-summary h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.erp-report-summary-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.25;
}

.erp-report-summary-meta {
    margin: 0.125rem 0 0;
    font-size: 0.8125rem;
    color: var(--rz-text-secondary-color);
}

.erp-report-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Oznaka: prekidač (brzi odabir, stupac) ili uklonjivi filter u sažetku. Samo transform/opacity/boja, 150 ms. */
.erp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 2rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--rz-border-color);
    border-radius: 999px;
    background: transparent;
    color: var(--rz-text-color);
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 150ms cubic-bezier(0.23, 1, 0.32, 1),
                border-color 150ms cubic-bezier(0.23, 1, 0.32, 1),
                transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}

.erp-chip:active {
    transform: scale(0.97);
}

.erp-chip:focus-visible {
    outline: 2px solid var(--rz-primary);
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .erp-chip:hover {
        border-color: var(--rz-primary);
    }
}

.erp-chip[aria-pressed="true"] {
    border-color: var(--rz-primary);
    background: var(--rz-primary-lighter, rgba(25, 118, 210, 0.1));
    color: var(--rz-primary-darker, var(--rz-primary));
    font-weight: 500;
}

.erp-chip .rzi {
    font-size: 1rem;
}

.erp-report-columns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.5rem;
}

.erp-report-empty {
    margin: 0;
    padding: 0.75rem 0;
    font-size: 0.875rem;
    color: var(--rz-text-secondary-color);
}

.erp-report-condition {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
    .erp-chip {
        transition: none;
    }

    .erp-chip:active {
        transform: none;
    }
}

/* Ikone uz naslove skupina u dinamičkom izvještaju: lakše hvatanje parametara pogledom. */
.erp-report-section > h2,
.erp-report-section h2,
.erp-report-summary h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.erp-report-section h2 .rzi,
.erp-report-summary h2 .rzi {
    font-size: 1.25rem;
    color: var(--rz-primary);
}

/* Upute na vrhu i pregled izvoza (tablica prvih redaka). */
.erp-report-help {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
}

.erp-report-help h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.erp-report-help h2 .rzi {
    font-size: 1.25rem;
    color: var(--rz-primary);
}

.erp-report-steps {
    margin: 0;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.erp-report-preview {
    overflow: auto;
    max-height: 22rem;
    border: 1px solid var(--rz-border-color);
    border-radius: 8px;
}

.erp-report-preview:focus-visible {
    outline: 2px solid var(--rz-primary);
    outline-offset: 2px;
}

.erp-report-preview table {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
    font-size: 0.8125rem;
}

.erp-report-preview th,
.erp-report-preview td {
    padding: 0.4rem 0.75rem;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--rz-border-color);
}

.erp-report-preview th {
    position: sticky;
    top: 0;
    background: var(--rz-base-100, var(--rz-base-background-color));
    font-weight: 600;
}

.erp-report-preview tbody tr:last-child td {
    border-bottom: none;
}

/* Neodabrana oznaka mora izgledati kao gumb: puna ploha, jači rub i sjena; odabrana je obojena (vidi aria-pressed). */
.erp-chip {
    background: var(--rz-base-background-color, #fff);
    border-color: var(--rz-base-400, var(--rz-border-color));
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.erp-chip[aria-pressed="true"] {
    box-shadow: none;
}

.erp-report-person {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
