/* =========================================================
   TuzlaFarm B2B — farmaceutski dizajn sistem
   Paleta: teal/mint (medicinski), podloga: meka mint-bijela
   ========================================================= */

:root {
    --tf-primary: #0f766e;
    --tf-primary-2: #14b8a6;
    --tf-dark: #0b3b38;
    --tf-ink: #16302d;
    --tf-muted: #61807b;
    --tf-bg: #f3f8f7;
    --tf-surface: #ffffff;
    --tf-border: #dfeae7;
    --tf-mint: #e7f6f2;
    --tf-radius: 1.1rem;
    --tf-grad: linear-gradient(135deg, #0f766e 0%, #14b8a6 60%, #2dd4bf 100%);
    --tf-shadow-sm: 0 2px 10px rgba(15, 118, 110, .07);
    --tf-shadow: 0 18px 40px -18px rgba(15, 118, 110, .35);
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--tf-ink);
    background: var(--tf-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

main {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5 {
    letter-spacing: -.02em;
}

/* ---------- lebdeće dekorativne mrlje u pozadini ---------- */
body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    animation: tfFloat 16s ease-in-out infinite alternate;
    pointer-events: none;
}

body::before {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(45, 212, 191, .35), transparent 65%);
    top: -160px;
    right: -120px;
}

body::after {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(15, 118, 110, .22), transparent 65%);
    bottom: -140px;
    left: -140px;
    animation-delay: -8s;
}

/* ---------- navigacija (glass efekat) ---------- */
.tf-navbar {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--tf-border);
    transition: box-shadow .25s ease;
}

.tf-navbar.scrolled {
    box-shadow: var(--tf-shadow-sm);
}

.tf-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 800;
    color: var(--tf-dark) !important;
    font-size: 1.15rem;
    letter-spacing: -.02em;
}

.tf-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: .8rem;
    background: var(--tf-grad);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.15rem;
    box-shadow: var(--tf-shadow-sm);
}

.tf-brand .b2b {
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .08em;
    background: var(--tf-mint);
    color: var(--tf-primary);
    padding: .25rem .45rem;
    border-radius: .5rem;
}

.tf-nav-link {
    color: var(--tf-muted) !important;
    font-weight: 700;
    font-size: .92rem;
    padding: .5rem 1rem !important;
    border-radius: 2rem;
    transition: all .2s ease;
}

.tf-nav-link:hover,
.tf-nav-link.active {
    color: var(--tf-primary) !important;
    background: var(--tf-mint);
}

.tf-user-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--tf-mint);
    color: var(--tf-primary);
    border-radius: 2rem;
    padding: .45rem 1rem;
    font-weight: 700;
    font-size: .85rem;
    white-space: nowrap;
}

/* ---------- dugmad ---------- */
.btn {
    font-weight: 700;
    border-radius: 2rem;
    transition: all .22s ease;
}

.btn-success {
    background: var(--tf-grad);
    border: none;
    box-shadow: 0 8px 18px -8px rgba(15, 118, 110, .55);
}

.btn-success:hover,
.btn-success:focus {
    background: var(--tf-grad);
    transform: translateY(-2px);
    box-shadow: 0 14px 26px -10px rgba(15, 118, 110, .6);
}

.btn-outline-success {
    color: var(--tf-primary);
    border: 1.5px solid var(--tf-primary);
}

.btn-outline-success:hover {
    background: var(--tf-primary);
    border-color: var(--tf-primary);
    transform: translateY(-1px);
}

.btn-outline-secondary,
.btn-outline-danger {
    border-width: 1.5px;
}

.btn-outline-secondary:hover,
.btn-outline-danger:hover {
    transform: translateY(-1px);
}

/* ---------- forme ---------- */
.form-control,
.form-select {
    border-radius: .8rem;
    border: 1.5px solid var(--tf-border);
    padding: .65rem .95rem;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tf-primary-2);
    box-shadow: 0 0 0 .25rem rgba(20, 184, 166, .15);
}

.form-label {
    font-weight: 700;
    font-size: .85rem;
    color: var(--tf-dark);
}

.form-check-input:checked {
    background-color: var(--tf-primary);
    border-color: var(--tf-primary);
}

.tf-search .input-group-text {
    background: #fff;
    border: 1.5px solid var(--tf-border);
    border-right: 0;
    border-radius: 2rem 0 0 2rem;
    color: var(--tf-muted);
    padding-left: 1.1rem;
}

.tf-search .form-control {
    border-left: 0;
    border-radius: 0 2rem 2rem 0;
}

.tf-search .form-control:focus {
    box-shadow: none;
    border-color: var(--tf-border);
}

/* ---------- kartice i zaglavlja stranica ---------- */
.tf-card {
    background: var(--tf-surface);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius);
    box-shadow: var(--tf-shadow-sm);
}

.tf-page-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.1rem 0 1.5rem;
    flex-wrap: wrap;
}

.tf-page-icon {
    width: 52px;
    height: 52px;
    border-radius: 1rem;
    background: var(--tf-grad);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    box-shadow: var(--tf-shadow-sm);
    flex-shrink: 0;
}

.tf-page-head h1 {
    font-weight: 800;
    margin: 0;
    font-size: 1.55rem;
}

.tf-page-head .sub {
    color: var(--tf-muted);
    font-size: .88rem;
    margin: 0;
}

/* ---------- tabele ---------- */
.tf-table-card {
    overflow: hidden;
}

.tf-table-card .table {
    margin: 0;
}

.table thead th {
    background: var(--tf-mint);
    color: var(--tf-dark);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    font-weight: 800;
    border: none;
    padding: .85rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: .72rem 1rem;
    border-color: var(--tf-border);
    vertical-align: middle;
    font-size: .92rem;
}

.table tbody tr {
    animation: tfRowIn .4s ease both;
    animation-delay: calc(var(--i, 0) * 22ms);
    transition: background .15s;
}

.table-hover tbody tr:hover {
    background: #f0faf7;
    --bs-table-hover-bg: #f0faf7;
}

.tf-sifra {
    font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
    font-size: .8rem;
    font-weight: 700;
    background: var(--tf-mint);
    color: var(--tf-primary);
    padding: .3rem .6rem;
    border-radius: .55rem;
    white-space: nowrap;
}

/* ---------- bedževi (meke boje) ---------- */
.badge-soft {
    font-weight: 700;
    padding: .45em .85em;
    border-radius: 2rem;
    font-size: .72rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    line-height: 1;
}

.badge-soft .dot {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: currentColor;
}

.badge-soft.success { background: #def7ec; color: #03543f; }
.badge-soft.warning { background: #fdf3c7; color: #723b13; }
.badge-soft.secondary { background: #e8ecea; color: #374151; }
.badge-soft.danger { background: #fde8e8; color: #9b1c1c; }

/* ---------- paginacija ---------- */
.pagination {
    gap: .45rem;
}

.page-link {
    border-radius: 2rem !important;
    border: 1.5px solid var(--tf-border);
    color: var(--tf-primary);
    font-weight: 700;
    font-size: .88rem;
    padding: .5rem 1.1rem;
    transition: all .2s;
    background: #fff;
}

.page-link:hover {
    background: var(--tf-mint);
    color: var(--tf-primary);
    border-color: var(--tf-primary-2);
}

.page-item.disabled .page-link {
    background: transparent;
    color: var(--tf-muted);
    opacity: .7;
}

/* ---------- obavještenja ---------- */
.alert {
    border: none;
    border-radius: 1rem;
    font-size: .92rem;
}

.alert-success { background: #e3f7ef; color: #065f46; }
.alert-info { background: #e6f4fb; color: #075985; }
.alert-danger { background: #fdebeb; color: #991b1b; }

.tf-code {
    background: #fff;
    border: 1.5px dashed var(--tf-primary-2);
    border-radius: .6rem;
    padding: .25rem .7rem;
    color: var(--tf-primary);
    letter-spacing: .06em;
}

/* ---------- login / registracija (split kartica) ---------- */
.tf-auth {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    max-width: 980px;
    margin: 2.5rem auto;
    border-radius: 1.6rem;
    overflow: hidden;
    box-shadow: var(--tf-shadow);
    background: #fff;
    border: 1px solid var(--tf-border);
}

.tf-auth-side {
    background: var(--tf-grad);
    color: #fff;
    padding: 3rem 2.6rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tf-auth-side h2 {
    font-weight: 800;
    line-height: 1.2;
}

.tf-auth-side .lead-sm {
    opacity: .88;
    font-size: .95rem;
}

.tf-auth-side ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.tf-auth-side li {
    display: flex;
    gap: .75rem;
    align-items: center;
    font-weight: 600;
    font-size: .92rem;
}

.tf-auth-side li i {
    background: rgba(255, 255, 255, .18);
    border-radius: .6rem;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.tf-auth-form {
    padding: 3rem 2.6rem;
}

.tf-float-ico {
    position: absolute;
    color: rgba(255, 255, 255, .14);
    animation: tfDrift 9s ease-in-out infinite alternate;
    pointer-events: none;
}

/* ---------- admin sidebar (vertikalna navigacija) ---------- */
.tf-shell {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 1rem;
    align-items: flex-start;
}

.tf-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 78px;
    margin-top: 1rem;
    background: var(--tf-surface);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius);
    box-shadow: var(--tf-shadow-sm);
    padding: 1.1rem .9rem;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.tf-side-label {
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--tf-muted);
    padding: .2rem .8rem .5rem;
}

.tf-side-nav {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.tf-side-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .62rem .8rem;
    border-radius: .7rem;
    color: var(--tf-ink);
    font-weight: 600;
    font-size: .92rem;
    text-decoration: none;
    transition: all .18s ease;
}

.tf-side-link i {
    font-size: 1.05rem;
    color: var(--tf-muted);
    width: 20px;
    text-align: center;
    transition: color .18s;
}

.tf-side-link:hover {
    background: var(--tf-mint);
    color: var(--tf-primary);
}

.tf-side-link:hover i {
    color: var(--tf-primary);
}

.tf-side-link.active {
    background: var(--tf-grad);
    color: #fff;
    box-shadow: 0 6px 14px -6px rgba(15, 118, 110, .5);
}

.tf-side-link.active i {
    color: #fff;
}

.tf-side-badge {
    margin-left: auto;
    background: #fdf3c7;
    color: #723b13;
    font-size: .7rem;
    font-weight: 800;
    padding: .15rem .5rem;
    border-radius: 2rem;
}

.tf-side-link.active .tf-side-badge {
    background: rgba(255, 255, 255, .25);
    color: #fff;
}

.tf-admin-btn {
    background: var(--tf-mint);
    color: var(--tf-primary);
    border: 1.5px solid transparent;
    border-radius: 2rem;
    font-weight: 700;
}

.tf-admin-btn:hover {
    background: var(--tf-grad);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -8px rgba(15, 118, 110, .55);
}

.tf-offcanvas {
    width: 310px;
    border-left: 1px solid var(--tf-border);
}

.tf-offcanvas .offcanvas-body {
    padding: 1.1rem .9rem;
}

/* ---------- dashboard ---------- */
.tf-stat {
    background: var(--tf-surface);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius);
    box-shadow: var(--tf-shadow-sm);
    padding: 1.3rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}

.tf-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--tf-shadow);
}

.tf-stat .ikona {
    width: 52px;
    height: 52px;
    border-radius: 1rem;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}

.tf-stat .ikona.teal { background: var(--tf-grad); }
.tf-stat .ikona.amber { background: linear-gradient(135deg, #d97706, #fbbf24); }
.tf-stat .ikona.blue { background: linear-gradient(135deg, #1d4ed8, #38bdf8); }
.tf-stat .ikona.violet { background: linear-gradient(135deg, #6d28d9, #a78bfa); }

.tf-stat .broj {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--tf-dark);
}

.tf-stat .opis {
    font-size: .8rem;
    color: var(--tf-muted);
    font-weight: 600;
}

a.tf-stat {
    text-decoration: none;
}

.tf-mini-lista .stavka {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--tf-border);
    font-size: .9rem;
}

.tf-mini-lista .stavka:last-child {
    border-bottom: none;
}

/* ---------- prazna stanja ---------- */
.tf-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--tf-muted);
}

.tf-empty i {
    font-size: 2.6rem;
    display: block;
    margin-bottom: .6rem;
    opacity: .45;
}

/* ---------- footer ---------- */
.tf-footer {
    background: #fff;
    border-top: 1px solid var(--tf-border);
    margin-top: 3rem;
    padding: 2.4rem 0 1.4rem;
    font-size: .9rem;
    color: var(--tf-muted);
    flex-shrink: 0;
}

.tf-footer h6 {
    font-weight: 800;
    color: var(--tf-dark);
    margin-bottom: .8rem;
}

.tf-footer a {
    color: var(--tf-muted);
    text-decoration: none;
    transition: color .2s;
}

.tf-footer a:hover {
    color: var(--tf-primary);
}

.tf-footer .bottom {
    border-top: 1px solid var(--tf-border);
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    font-size: .8rem;
    text-align: center;
}

/* ---------- animacije ---------- */
@keyframes tfFloat {
    from { transform: translateY(0) scale(1); }
    to { transform: translateY(40px) scale(1.06); }
}

@keyframes tfDrift {
    from { transform: translateY(-8px) rotate(-6deg); }
    to { transform: translateY(12px) rotate(8deg); }
}

@keyframes tfRowIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@keyframes tfPop {
    0% { transform: scale(.4); opacity: 0; }
    70% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

.tf-pop {
    animation: tfPop .55s cubic-bezier(.2, .9, .3, 1.4) both;
}

/* ---------- responzivnost ---------- */
@media (max-width: 991px) {
    .tf-auth {
        grid-template-columns: 1fr;
        margin: 1.5rem auto;
    }

    .tf-auth-side {
        display: none;
    }

    .tf-auth-form {
        padding: 2.2rem 1.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after,
    .table tbody tr,
    .tf-float-ico,
    .tf-pop {
        animation: none !important;
    }
}

/* ---------- pretrazivi combobox (poste) ---------- */
.tf-combo {
    position: relative;
}

.tf-combo-lista {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border: 1px solid var(--tf-border);
    border-radius: .8rem;
    box-shadow: var(--tf-shadow);
    max-height: 260px;
    overflow-y: auto;
    padding: .35rem;
}

.tf-combo-stavka {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: .45rem .7rem;
    border-radius: .55rem;
    font-size: .9rem;
    color: var(--tf-ink);
    cursor: pointer;
}

.tf-combo-stavka:hover {
    background: var(--tf-mint);
    color: var(--tf-primary);
}

.tf-combo-stavka strong {
    font-family: ui-monospace, Consolas, monospace;
    font-size: .82rem;
    color: var(--tf-primary);
    margin-right: .35rem;
}

.tf-combo-prazno {
    padding: .6rem .7rem;
    font-size: .85rem;
    color: var(--tf-muted);
}

/* ---------- B2B katalog kartice ---------- */
.tf-art-kartica {
    background: var(--tf-surface);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius);
    box-shadow: var(--tf-shadow-sm);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
    animation: tfRowIn .4s ease both;
    animation-delay: calc(var(--i, 0) * 18ms);
}

.tf-art-kartica:hover {
    transform: translateY(-4px);
    box-shadow: var(--tf-shadow);
}

.tf-art-slika {
    position: relative;
    background: #fff;
    border-bottom: 1px solid var(--tf-border);
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    padding: .8rem;
}

.tf-art-slika img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tf-art-traka {
    position: absolute;
    top: .6rem;
    left: .6rem;
    background: linear-gradient(135deg, #d97706, #fbbf24);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    padding: .3rem .6rem;
    border-radius: 2rem;
    box-shadow: 0 4px 10px -4px rgba(217, 119, 6, .6);
}

.tf-art-tijelo {
    padding: .85rem .95rem 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tf-art-naziv {
    font-weight: 700;
    font-size: .88rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.3em;
}

.tf-art-meta {
    color: var(--tf-muted);
    font-size: .74rem;
    margin: .25rem 0 .5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tf-art-cijene {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .7rem;
    margin-top: auto;
}

.tf-cijena {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--tf-primary);
}

.tf-cijena small {
    font-size: .7rem;
    font-weight: 700;
}

.tf-cijena-stara {
    font-size: .8rem;
    color: var(--tf-muted);
    text-decoration: line-through;
}

.tf-art-akcije {
    display: flex;
    gap: .5rem;
    align-items: stretch;
}

/* ---------- kolicina (stepper) ---------- */
.tf-qty {
    display: inline-flex;
    align-items: stretch;
    border: 1.5px solid var(--tf-border);
    border-radius: 2rem;
    overflow: hidden;
    background: #fff;
}

.tf-qty-btn {
    border: none;
    background: transparent;
    width: 28px;
    font-weight: 800;
    color: var(--tf-primary);
    cursor: pointer;
}

.tf-qty-btn:hover {
    background: var(--tf-mint);
}

.tf-qty-input {
    border: none;
    width: 42px;
    text-align: center;
    font-weight: 700;
    font-size: .85rem;
    -moz-appearance: textfield;
    appearance: textfield;
    outline: none;
}

.tf-qty-input::-webkit-outer-spin-button,
.tf-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tf-qty-sm .tf-qty-btn { width: 22px; }
.tf-qty-sm .tf-qty-input { width: 34px; font-size: .8rem; }

/* ---------- plutajuca korpa (donji desni ugao) ---------- */
.tf-korpa-fab {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    z-index: 1040;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--tf-grad);
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 14px 30px -8px rgba(15, 118, 110, .6);
    display: grid;
    place-items: center;
    transition: transform .2s ease, box-shadow .2s ease;
}

.tf-korpa-fab:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 18px 36px -8px rgba(15, 118, 110, .7);
}

.tf-korpa-broj {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #d97706;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    min-width: 22px;
    height: 22px;
    border-radius: 2rem;
    display: grid;
    place-items: center;
    padding: 0 .35rem;
    border: 2px solid #fff;
}

.tf-bump {
    animation: tfPop .45s cubic-bezier(.2, .9, .3, 1.4);
}

.tf-korpa-stavka {
    display: flex;
    align-items: center;
    padding: .6rem 0;
    border-bottom: 1px solid var(--tf-border);
}

.tf-korpa-stavka:last-child {
    border-bottom: none;
}

/* ---------- toast obavjestenja ---------- */
.tf-toast {
    position: fixed;
    bottom: 5.6rem;
    right: 1.4rem;
    z-index: 1060;
    background: var(--tf-dark);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    padding: .65rem 1rem;
    border-radius: .8rem;
    box-shadow: var(--tf-shadow);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
    max-width: 320px;
}

.tf-toast.vidljiv {
    opacity: 1;
    transform: none;
}

.tf-toast.greska {
    background: #9b1c1c;
}

/* ===== Chat podrške ===== */
.tf-chat-fab {
    position: fixed;
    right: 1.4rem;
    bottom: 6.2rem;
    z-index: 1040;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: #0e7490;
    color: #fff;
    font-size: 1.3rem;
    box-shadow: 0 14px 30px -8px rgba(14, 116, 144, .6);
    display: grid;
    place-items: center;
    transition: transform .2s ease, box-shadow .2s ease;
}

.tf-chat-fab:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 18px 36px -8px rgba(14, 116, 144, .7);
}

.tf-chat-fab .tf-korpa-broj {
    background: #dc2626;
}

.tf-nav-badge {
    display: inline-grid;
    place-items: center;
    background: #dc2626;
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    min-width: 19px;
    height: 19px;
    border-radius: 2rem;
    padding: 0 .3rem;
    margin-left: .25rem;
    vertical-align: text-top;
}

.tf-msg {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: .65rem;
}

.tf-msg.desno {
    align-items: flex-end;
}

.tf-msg-bubble {
    max-width: 85%;
    padding: .5rem .85rem;
    border-radius: 1rem;
    border-bottom-left-radius: .3rem;
    background: #f1f5f9;
    color: var(--tf-text, #0f172a);
    white-space: pre-wrap;
    word-break: break-word;
    font-size: .92rem;
}

.tf-msg.desno .tf-msg-bubble {
    background: var(--tf-grad);
    color: #fff;
    border-radius: 1rem;
    border-bottom-right-radius: .3rem;
}

.tf-msg-meta {
    font-size: .72rem;
    color: #94a3b8;
    margin-top: .15rem;
}

.tf-msg-sistem {
    text-align: center;
    font-size: .78rem;
    color: #94a3b8;
    margin: .6rem 0;
}

.tf-chat-status {
    font-size: .82rem;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid var(--tf-border);
    border-radius: .6rem;
    padding: .45rem .7rem;
    margin-bottom: .8rem;
}

.tf-chat-unos {
    display: flex;
    gap: .5rem;
    padding: .7rem .9rem;
    background: #fff;
}

/* operaterska konzola */
.tf-chat-lista {
    max-height: 75vh;
    overflow-y: auto;
}

.tf-chat-sekcija-naslov {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    padding: .7rem 1rem .35rem;
}

.tf-chat-red {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: .55rem 1rem;
    border-bottom: 1px solid var(--tf-border);
    transition: background .15s ease;
}

.tf-chat-red:hover {
    background: #f8fafc;
}

.tf-chat-red.active {
    background: #ecfdf5;
    box-shadow: inset 3px 0 0 var(--tf-primary);
}

.tf-chat-preview {
    color: #64748b;
    font-size: .82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tf-chat-badge {
    display: inline-grid;
    place-items: center;
    background: #dc2626;
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    min-width: 19px;
    height: 19px;
    border-radius: 2rem;
    padding: 0 .3rem;
    flex-shrink: 0;
}

.tf-chat-prozor {
    display: flex;
    flex-direction: column;
    min-height: 60vh;
    max-height: 75vh;
}

.tf-chat-zaglavlje {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .8rem;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--tf-border);
}

.tf-chat-poruke {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* ---------- katalog: klasifikacije, info dugme, detalji popup ---------- */
.tf-art-klasif {
    display: flex;
    gap: .3rem;
    margin-bottom: .5rem;
    overflow: hidden;
    white-space: nowrap;
}

.tf-chip {
    font-size: .66rem;
    font-weight: 700;
    background: var(--tf-mint);
    color: var(--tf-primary);
    padding: .2rem .5rem;
    border-radius: 2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 48%;
}

.tf-chip.sek {
    background: #eef2ff;
    color: #4338ca;
}

.tf-art-info {
    position: absolute;
    top: .6rem;
    right: .6rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--tf-border);
    background: rgba(255, 255, 255, .92);
    color: var(--tf-primary);
    font-size: .9rem;
    display: grid;
    place-items: center;
    transition: all .18s ease;
}

.tf-art-info:hover {
    background: var(--tf-grad);
    color: #fff;
    transform: scale(1.1);
}

.tf-zaliha-btn {
    border: none;
    cursor: pointer;
    transition: transform .15s ease;
}

.tf-zaliha-btn:hover {
    transform: scale(1.06);
}

#artikalModal .modal-content {
    border: none;
    border-radius: 1.2rem;
    box-shadow: var(--tf-shadow);
}

.tf-detalj-slika {
    position: relative;
    background: #fff;
    border: 1px solid var(--tf-border);
    border-radius: 1rem;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    padding: 1.2rem;
}

.tf-detalj-slika img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tf-detalj-info .red {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .4rem 0;
    border-bottom: 1px dashed var(--tf-border);
    font-size: .85rem;
}

.tf-detalj-info .red span {
    color: var(--tf-muted);
    flex-shrink: 0;
}

.tf-detalj-info .red strong {
    text-align: right;
}

.tf-sklad-lista {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.tf-sklad-red {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-size: .82rem;
}

.tf-sklad-red .naziv {
    width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.tf-sklad-red .traka {
    flex-grow: 1;
    height: 8px;
    background: var(--tf-mint);
    border-radius: 1rem;
    overflow: hidden;
}

.tf-sklad-red .punjenje {
    height: 100%;
    background: var(--tf-grad);
    border-radius: 1rem;
}

.tf-sklad-red .kolicina {
    width: 56px;
    text-align: right;
    font-weight: 800;
    color: var(--tf-primary);
}
