html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.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;
}

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,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."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.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;
}

/* Master-detail (Access-style) stavke ispod zaglavlja dokumenta */
.promet-row-expanded > td {
    border-bottom: none !important;
}

.promet-detail-cell {
    padding: 0 !important;
    border-top: none !important;
    background: var(--mud-palette-background-grey, #f5f5f5);
}

.promet-detail-panel {
    margin: 0 0 8px 2rem;
    padding: 12px 16px 16px;
    border-left: 3px solid var(--mud-palette-primary);
    background: var(--mud-palette-surface);
    border-radius: 0 0 8px 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.promet-detail-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.promet-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.promet-detail-table th {
    text-align: left;
    padding: 6px 10px;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.promet-detail-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--mud-palette-table-lines);
}

.promet-detail-table tr:last-child td {
    border-bottom: none;
}

.promet-detail-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.promet-detail-table .nc-skuplje {
    background: #fdecea;
    color: #c62828;
    font-weight: 600;
}

.promet-detail-table .nc-jeftinije {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
}

.kalk-stavke {
    table-layout: fixed;
}

.kalk-stavke .nc-celija {
    white-space: normal;
}

.nc-strelica {
    margin-left: 4px;
}

.mud-table-row-selected > td,
.picker-row-selected > td {
    background-color: rgba(var(--mud-palette-primary-rgb, 89, 74, 226), 0.12) !important;
}

.picker-row-selected > td {
    font-weight: 500;
}

/* ——— Login (AlfaKasa backoffice) ——— */
.login-page {
    --login-blue: #1a6db5;
    --login-red: #d32f2f;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2.5rem 1rem 3rem;
    background-color: #0a2744;
    background-image: url("images/login/background.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    font-family: "Montserrat", "Segoe UI", sans-serif;
}

.login-shell {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-brand {
    text-align: center;
}

.login-brand-logo {
    width: 96px;
    height: auto;
    display: block;
    margin: 0 auto 0.5rem;
    mix-blend-mode: screen;
}

.login-brand-name {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    line-height: 1.2;
}

.login-brand-tagline {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: #c5e4ff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.login-card.mud-paper {
    width: 100%;
    margin-top: 1.6cm;
    padding: 2rem 1.75rem 2.15rem !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 16px 48px rgba(0, 20, 40, 0.38) !important;
}

.login-product-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.25;
    margin-bottom: 0.35rem;
}

.login-product-alfa {
    color: var(--login-blue);
}

.login-product-kasa {
    color: var(--login-red);
}

.login-product-sub {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #7a8b9c;
    margin-bottom: 1.75rem !important;
}

.login-card .login-field {
    margin-bottom: 1.15rem !important;
}

.login-card .login-field .mud-input-slot {
    min-height: 3rem;
}

.login-card .login-field .mud-input-outlined-border {
    border-color: #c5d4e3 !important;
}

.login-card .mud-input {
    background: #eef5fb;
    border-radius: 8px;
}

.login-card .mud-input > input {
    padding-top: 0.55rem !important;
    padding-bottom: 0.55rem !important;
}

.login-submit {
    margin-top: 0.35rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    background-color: var(--login-blue) !important;
    height: 52px !important;
    border-radius: 8px !important;
}

@media (max-width: 480px) {
    .login-page {
        padding-top: 1.75rem;
    }

    .login-shell {
        max-width: 320px;
    }

    .login-brand-logo {
        width: 80px;
    }

    .login-brand-name {
        font-size: 1.25rem;
    }

    .login-card.mud-paper {
        margin-top: 1.2cm;
        padding: 1.6rem 1.25rem 1.75rem !important;
    }
}

/* Istaknute stavke u meniju štampe dokumenata iz kase */
.stampa-nav-vazno,
.stampa-nav-vazno .mud-nav-link-text {
    font-weight: 700 !important;
}

/* ===== Portal AppBar: responsive + beli Firma/Prodavnica ===== */
.portal-appbar.mud-appbar {
    height: auto !important;
    min-height: 64px;
}

.portal-appbar .mud-toolbar-appbar {
    height: auto !important;
    min-height: 64px;
    flex-wrap: nowrap;
    align-items: stretch;
    padding-top: 6px;
    padding-bottom: 8px;
}

.portal-appbar-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.portal-appbar-left {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 0 0 auto;
}

.portal-appbar-title {
    color: #fff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    font-weight: 600;
}

.portal-appbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    margin-left: auto;
}

.portal-appbar-user {
    color: rgba(255, 255, 255, 0.92) !important;
    white-space: nowrap;
    margin-left: 4px;
    margin-right: 2px;
}

.portal-appbar-context {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
}

.portal-context-select {
    flex: 0 1 220px;
    max-width: 260px;
    min-width: 140px !important;
}

.portal-context-firma {
    flex: 0 1 550px;
    max-width: 650px;
    min-width: 350px !important;
}

.portal-context-select .mud-input-control,
.portal-context-select.mud-select {
    margin-top: 0 !important;
}

.portal-context-select .mud-input-label,
.portal-context-select .mud-input-label.mud-input-label-inputcontrol,
.portal-context-select .mud-input-label.mud-input-label-outlined {
    color: #fff !important;
    font-weight: 700 !important;
    opacity: 1 !important;
}

.portal-context-select .mud-input-label.mud-input-label-outlined.mud-input-label-shrink {
    background-color: var(--mud-palette-primary) !important;
    padding: 0 4px;
}

.portal-context-select .mud-select-input,
.portal-context-select .mud-input,
.portal-context-select .mud-input input,
.portal-context-select .mud-input-slot,
.portal-context-select .mud-typography {
    color: #fff !important;
    font-weight: 700 !important;
    -webkit-text-fill-color: #fff !important;
}

.portal-context-select .mud-input.mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.75) !important;
}

.portal-context-select .mud-input:hover .mud-input-outlined-border,
.portal-context-select .mud-input.mud-input-outlined:focus-within .mud-input-outlined-border {
    border-color: #fff !important;
}

.portal-context-select .mud-icon-root,
.portal-context-select .mud-select .mud-icon-button,
.portal-context-select .mud-input-adornment .mud-icon-root {
    color: #fff !important;
}

.portal-context-select.mud-input-control-disabled .mud-input,
.portal-context-select.mud-input-control-disabled .mud-input-label,
.portal-context-select.mud-input-control-disabled .mud-icon-root {
    color: rgba(255, 255, 255, 0.55) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.55) !important;
}

@media (max-width: 900px) {
    .portal-appbar-inner {
        flex-wrap: wrap;
        row-gap: 6px;
        column-gap: 8px;
    }

    .portal-appbar-left {
        flex: 1 1 auto;
        min-width: 0;
    }

    .portal-appbar-right {
        margin-left: 0;
        flex: 0 0 auto;
    }

    .portal-appbar-title {
        max-width: min(180px, 42vw);
        font-size: 0.95rem;
    }

    .portal-appbar-user {
        display: none;
    }

    .portal-appbar-context {
        order: 3;
        width: 100%;
        flex: 1 1 100%;
        justify-content: stretch;
    }

    .portal-context-select {
        flex: 1 1 0;
        max-width: none;
        min-width: 0 !important;
    }

    /* Dva reda u AppBar-u — glavni sadržaj ne sme da se zavuče ispod */
    .mud-layout:has(.portal-appbar) .mud-main-content {
        padding-top: 118px !important;
    }
}

@media (max-width: 480px) {
    .portal-appbar-title {
        max-width: min(140px, 38vw);
        font-size: 0.88rem;
    }

    .portal-appbar-context {
        gap: 8px;
    }
}

.artikli-okvir {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.artikli-traka {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
}

.artikli-traka .artikli-pretraga {
    margin: 0 !important;
    flex: 0 0 160px;
}

.artikli-traka .artikli-pretraga-naziv {
    flex: 0 0 420px;
}

.artikli-pretraga .mud-input-outlined {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.14);
}

.artikli-pretraga .mud-input-slot {
    background: #fff;
    font-weight: 600;
    min-height: 32px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.artikli-tabela .mud-table-head .mud-table-cell,
.portal-tabela .mud-table-head .mud-table-cell,
.portal-tabela thead th,
table.portal-tabela thead th {
    background-color: #1565c0 !important;
    color: #fff !important;
    font-weight: 600;
}

.artikli-tabela .mud-table-head .mud-table-sort-label,
.artikli-tabela .mud-table-head .mud-button-root,
.artikli-tabela .mud-table-head .mud-icon-root,
.artikli-tabela .mud-table-head .mud-svg-icon,
.portal-tabela .mud-table-head .mud-table-sort-label,
.portal-tabela .mud-table-head .mud-button-root,
.portal-tabela .mud-table-head .mud-icon-root,
.portal-tabela .mud-table-head .mud-svg-icon {
    color: #fff !important;
}

.ef-lista tbody .mud-table-cell {
    font-size: 0.75rem;
    line-height: 1.2;
    padding-top: 2px;
    padding-bottom: 2px;
    border-bottom: 1px solid #c5d0dc;
    vertical-align: middle;
}

.ef-lista .ef-iznos {
    width: 12.5rem;
    min-width: 12.5rem;
    text-align: right;
    white-space: nowrap;
}

.ef-lista .ef-akcija {
    width: 4.5rem;
    text-align: center;
    vertical-align: middle;
}

.ef-akcija-stek {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 auto;
}

.ef-lista .ef-oko.mud-icon-button {
    width: 26px;
    height: 20px;
    padding: 0;
}

.ef-lista .ef-otvori.mud-button-root {
    min-width: 0;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 0 2px;
    font-size: 0.75rem;
    line-height: 1.2;
    letter-spacing: normal;
}

.ef-lista .ef-status {
    width: 9.1rem;
    height: 20px;
    font-size: 0.7rem;
}

.artikli-pretraga .mud-input-outlined-border {
    border-width: 2px !important;
    border-color: #1565c0 !important;
}

.artikli-pretraga-hint {
    color: #0d47a1;
    font-weight: 700;
    max-width: 320px;
    line-height: 1.25;
}

/* MudDatePicker: širina inputa preko parenta — Style na pickera steže i kalendar (MudBlazor bug) */
.ef-status-polje {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 148px;
    height: 40px;
    padding: 0 8px 0 14px;
    border: 1px solid rgba(0, 0, 0, 0.38);
    border-radius: 4px;
    background: #fff;
    color: rgba(0, 0, 0, 0.87);
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
}

.ef-status-polje:hover {
    border-color: rgba(0, 0, 0, 0.87);
}

.ef-status-red {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ef-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 13rem;
    height: 24px;
    padding: 0 12px;
    border-radius: 999px;
    color: #fff;
    font-weight: 500;
    font-size: 0.75rem;
    line-height: 1;
    white-space: nowrap;
}

.ef-status.ef-status-po-tekstu {
    width: auto;
    min-width: 0;
    padding: 0 14px;
}

.ef-istorija {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.ef-istorija-tabela {
    width: 100%;
    border-collapse: collapse;
}

.ef-istorija-tabela th,
.ef-istorija-tabela td {
    text-align: center;
    vertical-align: middle;
    padding: 6px 10px;
    border-bottom: 1px solid #d5deea;
}

.ef-istorija-naslov {
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.ef-istorija-komentar {
    width: 42%;
    white-space: normal;
    word-break: break-word;
}

.ef-istorija-status {
    font-weight: 700;
}

.ef-segment {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: #e8eef6;
}

.ef-segment button {
    border: 0;
    background: transparent;
    color: #1565c0;
    font-weight: 700;
    border-radius: 999px;
    padding: 8px 18px;
    cursor: pointer;
}

.ef-segment button.aktivno {
    background: #fff;
    color: #0d47a1;
    box-shadow: 0 1px 4px rgba(13, 71, 161, 0.18);
}

.portal-date-filter {
    width: 160px;
    max-width: 100%;
    flex: 0 0 auto;
}

.portal-date-filter .mud-picker {
    width: 100%;
}

/* Kalendar (inline/popover/dialog) uvek puna širina mesh mreže */
.mud-picker-calendar-container,
.mud-picker-inline-paper,
.mud-picker-container.mud-dialog {
    min-width: 310px !important;
    max-width: none !important;
    width: auto !important;
}

.mud-picker-open.mud-picker-inline,
.mud-popover .mud-picker,
.mud-dialog .mud-picker {
    max-width: none !important;
    width: auto !important;
}