/* ===== DV1 TAB: INLINE LABELA I INPUT ===== */
.dv1-inline-field {
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
}

.dv1-inline-field label {
    min-width: 120px;
    margin-bottom: 0;
    font-weight: 500;
    white-space: nowrap;
}

.dv1-inline-field input {
    flex: 1 1 0;
    min-width: 0;
}
/* ========== SIDEBAR FAB (Mobile) ========== */
.sidebar-fab {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--gray-800), var(--gray-700));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    z-index: 1050;
    box-shadow: var(--shadow-md);
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}
.sidebar-fab:active {
    transform: scale(0.92);
}

/* ========== BAZIČNI LAYOUT ========== */
body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--gray-50);
    overflow-x: hidden;
}

.archive-container {
    display: flex;
    padding-top: var(--navbar-height);
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.archive-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--gray-800) 0%, var(--gray-700) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.sidebar-section {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-section h3 {
    margin: 0 0 15px 0;
    font-size: 0.9em;
    font-weight: 600;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-btn {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sidebar-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(5px);
}

.sidebar-btn .btn-icon {
    font-size: 1.2em;
}

.sidebar-btn .btn-text {
    flex: 1;
    text-align: left;
}

.sidebar-btn.active-doc {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ========== MAIN CONTENT ========== */
.archive-main {
    flex: 1;
    padding: 30px;
    background: var(--gray-50);
}

.import-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 10px 10px;
    text-align: center;
    margin-bottom: 5px;
    border-radius: var(--radius-lg);
    transition: filter var(--transition-fast);
}

/* Hint tekst "Tapni za XML" — sakriven na desktopu */
.import-header .xml-hint {
    display: none;
}

.import-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.import-subtitle {
    margin: 5px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.import-form-container {
    padding: 15px;
    background: var(--gray-50);
}

/* ========== KOMPAKTNA SEKCIJA ========== */
.compact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.compact-left,
.compact-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compact-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    background: white;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.compact-label {
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--gray-200);
}

.compact-section textarea {
    resize: none;
    padding: 6px 8px;
    border: 1px solid var(--gray-400);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: inherit;
    line-height: 1.3;
    background: white;
    color: var(--gray-800);
}

.compact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.osnovni-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.osnovni-col {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

/* Faktura + Valuta u istom redu (paritet/mjesto) */
.val-row {
    flex-direction: row !important;
    gap: 8px;
    align-items: flex-end;
}

.val-row > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.val-row > div:last-child {
    flex: 0 0 auto;
}

/* ========== VAL INFO PANEL (desna kolona - read only prikaz) ========== */
.val-info-panel {
    background: white;
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    gap: 0 !important;
}

.val-info-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.val-info-row:last-child {
    border-bottom: none;
}

.val-info-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-600);
    white-space: nowrap;
    min-width: 120px;
}

.val-info-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-800);
    flex: 1;
    text-align: right;
}

.val-info-currency {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    min-width: 32px;
    text-align: left;
}

.val-info-main .val-info-value {
    font-size: 15px;
    color: var(--primary-dark);
}

.val-info-main .val-info-currency {
    font-size: 13px;
    font-weight: 700;
}

.field-compact {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.field-compact.full-width {
    grid-column: 1 / -1;
}

.field-compact label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-600);
}

.field-compact input,
.field-compact select {
    padding: 5px 8px;
    border: 1px solid var(--gray-400);
    border-radius: var(--radius-sm);
    font-size: 12px;
    background: white;
    color: var(--gray-800);
}

/* ========== ROBA ========== */
.goods-section {
    background: white;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 15px;
    margin-bottom: 15px;
}

.section-label {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-200);
}

.goods-table-wrapper {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
}

.goods-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: white;
}

.goods-table thead {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.goods-table th {
    padding: 8px;
    border: 1px solid var(--gray-300);
    font-weight: 600;
    text-align: left;
    color: var(--gray-700);
}

.goods-table td {
    padding: 6px 8px;
    border: 1px solid var(--gray-300);
    color: var(--gray-800);
}

.goods-totals {
    text-align: right;
    margin-top: 10px;
    padding: 10px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.goods-totals strong {
    color: var(--primary);
}

/* ========== TABOVI ========== */
.tabs-section {
    background: white;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.tab-buttons {
    display: flex;
    background: white;
    border-bottom: 2px solid var(--primary);
}

.tab-button {
    padding: 10px 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    transition: all var(--transition-fast);
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: rgba(102, 126, 234, 0.05);
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: white;
}

.tab-content-wrapper {
    background: var(--gray-50);
    padding: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.btn-print {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-print:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ========== TAB FORME ========== */
.tab-form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-field.full-width {
    flex: 1 1 100%;
}

.form-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

.form-field input,
.form-field select {
    padding: 4px 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px;
    height: 25px;
    background: white;
    color: var(--gray-800);
}

.form-field input.darker-border {
    border: 1px solid var(--gray-400);
}

.form-field input[readonly] {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* ========== DV1 ========== */
.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
}

/* ========== DATE PICKER ========== */
.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.date-display {
    flex: 1;
    padding: 8px 40px 8px 10px !important;
    border: 1px solid var(--gray-400);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--gray-50);
    color: var(--gray-800);
}

.date-picker-btn {
    position: absolute;
    right: 5px;
    width: 30px;
    height: 30px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition-fast);
}

.date-picker-btn:hover {
    background: var(--primary-dark);
}

/* ========== INTERNI / TRANSPORT TABELE ========== */
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: white;
}

.invoice-table thead th {
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-700);
    background: white;
    border: 1px solid var(--gray-300);
}

.invoice-table thead th:nth-child(1) {
    width: 50%;
}

.invoice-table thead th:nth-child(2) {
    width: 15%;
    text-align: right;
}

.invoice-table thead th:nth-child(3) {
    width: 10%;
    text-align: center;
}

.invoice-table tbody td {
    padding: 8px;
    border: 1px solid var(--gray-300);
    vertical-align: middle;
    color: var(--gray-800);
}

.invoice-table tbody td:nth-child(2) {
    text-align: right;
}

.invoice-table tbody td:nth-child(3) {
    text-align: center;
}

.invoice-table input[type="text"],
.invoice-table input[type="number"] {
    padding: 4px 8px;
    border: 1px solid var(--gray-400);
    border-radius: var(--radius-sm);
    font-size: 13px;
    width: 100%;
    background: var(--gray-50);
    color: var(--gray-800);
}

.invoice-table input[type="number"] {
    text-align: right;
}

.invoice-table .currency-input {
    text-align: center;
}

.invoice-table .total-row td {
    background: var(--gray-100);
    font-weight: 700;
    border-top: 2px solid var(--gray-400);
}

.invoice-table .total-label {
    display: flex;
    align-items: center;
    font-weight: 700;
}

/* ========== NEPOTPUNA PRIJAVA ========== */
.nepotpuna-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 15px;
    margin-bottom: 20px;
}

.nepotpuna-full-width {
    grid-column: 1 / -1;
    max-width: none;
}

.nepotpuna-layout-65-35 {
    display: grid;
    grid-template-columns: 62% 35%;
    gap: 3%;
}

.guarantee-box {
    border: 1px solid var(--gray-400);
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--gray-50);
}

.guarantee-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.guarantee-grid-span2 {
    grid-column: span 2;
}

.inline-label-field {
    display: flex;
    gap: 5px;
    align-items: center;
}

.inline-label-field label {
    width: 35%;
    white-space: nowrap;
    text-align: right;
    font-size: 11px;
    font-weight: 600;
}

.inline-label-field input {
    width: 65%;
}

/* ========== NEPOTPUNA - TRANSPARENTNA POZADINA ========== */
#tab-nepotpuna {
    background: transparent !important; /* OBAVEZNO TRANSPARENT! */
}

#tab-nepotpuna .form-field label {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 3px;
}

#tab-nepotpuna input,
#tab-nepotpuna .guarantee-box input {
    background: white;
    height: 25px;
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid var(--gray-300);
}

/* Svi wrapper div-ovi TRANSPARENT */
#tab-nepotpuna > div {
    background: transparent !important;
}

/* Samo boxovi bijeli */
#tab-nepotpuna > div[style*="border: 2px solid"] {
    background: white !important;
}

/* ========== FOOTER ========== */
.import-footer {
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-700) 100%);
    color: white;
    padding: 40px 20px 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo-text h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: var(--primary);
}

.footer-logo-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.footer-link:hover {
    color: white;
}

.footer-link.icon-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn.ghost {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: white;
}

.btn.full-width {
    width: 100%;
}

/* ========== TABLET (700–1200px) ========== */
@media (max-width: 1200px) and (min-width: 769px) {
    .val-info-label {
        min-width: 105px;
        font-size: 10.5px;
    }

    .val-info-value {
        font-size: 12px;
    }

    .val-info-main .val-info-value {
        font-size: 13px;
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    /* Sidebar drawer overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1100;
    }
    .sidebar-overlay.open {
        display: block;
    }

    /* Sidebar kao slide-in drawer s lijeve strane */
    .archive-container {
        flex-direction: row;
    }

    .archive-sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        width: 280px;
        height: calc(100vh - 60px);
        z-index: 1101;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }

    .archive-sidebar.open {
        transform: translateX(0);
    }

    /* Glavni sadržaj zauzima punu širinu, ne prelazi ekran */
    .archive-main {
        width: 100%;
        min-width: 0;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Tabele sa horizontalnim scrollom umjesto overflow */
    .goods-section,
    .tabs-section,
    #tab-zut {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Grid na dvije kolone na mobitelu */
    .compact-grid {
        grid-template-columns: 1fr 1fr;
    }

    .osnovni-split {
        grid-template-columns: 1fr;
    }

    /* Val info panel na mobitelu - manji min-width za labelu */
    .val-info-label {
        min-width: 100px;
        font-size: 10px;
    }

    /* FAB dugme za otvaranje sidebara */
    .sidebar-fab {
        display: flex !important;
    }

    /* Kompaktna sekcija - jedna kolona */
    .compact-section {
        grid-template-columns: 1fr;
    }

    .tab-form-grid {
        flex-direction: column;
    }

    /* Tab buttons - scroll horizontalno */
    .tab-buttons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .tab-buttons::-webkit-scrollbar {
        display: none;
    }
    .tab-button {
        flex-shrink: 0;
        font-size: 12px;
        padding: 10px 10px;
        white-space: nowrap;
    }

    /* Tab content padding manji */
    .tab-content-wrapper {
        padding: 12px;
    }

    /* Import header kompaktniji + klikabilan */
    .import-header {
        padding: 16px;
    }
    .import-header:active {
        filter: brightness(1.15);
    }
    .import-header .xml-hint {
        display: block;
    }

    /* Tab form: broj/datum red → kolona na mobilnom */
    .tab-form-grid[style*="align-items: flex-end"],
    .tab-form-grid[style*="align-items:flex-end"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    /* Polja s max-width: 200px → puna širina na mobilnom */
    .form-field[style*="max-width: 200px"],
    .form-field[style*="max-width:200px"] {
        max-width: 100% !important;
    }

    /* Print button puna širina */
    .form-field[style*="margin-left: auto"],
    .form-field[style*="margin-left:auto"] {
        margin-left: 0 !important;
    }
    .btn-print {
        width: 100%;
    }

    /* Inline grid 35% 35% → jedna kolona */
    div[style*="grid-template-columns: 35%"],
    div[style*="grid-template-columns:35%"] {
        grid-template-columns: 1fr !important;
    }

    /* Sva form-field input/select puna širina, osim polja u flex redu (valuta) */
    .form-field input:not(#osiCurrency),
    .form-field select {
        width: 100% !important;
        box-sizing: border-box;
    /* Valuta polje — uvijek fiksna širina */
    #osiCurrency {
        width: 55px !important;
        flex-shrink: 0 !important;
    }
}

/* ========================================
   ZUT TABELA - CSS ADDON
   ========================================
   Dodaj ovaj kod NA KRAJ postojećeg import.css
   ======================================== */

/* === ZUT TABELA - OVERRIDE POSTOJEĆIH PRAVILA === */

/* Wrapper za spacing između redova */
#tab-zut table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    font-size: 13px;
    background: white;
}

/* THEAD - Header stilizovanje */
#tab-zut table thead {
    background: white;
}

#tab-zut table thead tr {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-700);
    text-align: left;
}

#tab-zut table thead th {
    padding: 10px 12px 10px 0;
    border-bottom: 2px solid var(--primary);
}

/* === ŠIRINE KOLONA (precizne) === */
#tab-zut table thead th:nth-child(1) { width: 180px; } /* Vrsta troška */
#tab-zut table thead th:nth-child(2) { width: 90px; }  /* Iznos */
#tab-zut table thead th:nth-child(3) { width: 100px; } /* Broj fakture */
#tab-zut table thead th:nth-child(4) { width: 110px; } /* Datum fakt. */
#tab-zut table thead th:nth-child(5) { width: 280px; } /* Naziv pružaoca */
#tab-zut table thead th:nth-child(6) { width: 130px; } /* JIB pružaoca */

/* TBODY - Redovi */
#tab-zut table tbody tr {
    background: transparent;
}

#tab-zut table tbody td {
    padding-right: 12px;
    vertical-align: middle;
    padding-top: 2px;
    padding-bottom: 2px;
    color: var(--gray-800);
}

/* Label kolona (prva kolona) */
#tab-zut table tbody td:nth-child(1) {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    padding-right: 15px;
}

/* === INPUT POLJA - KONZISTENTNA VISINA === */
#tab-zut table tbody input[type="text"] {
    width: 100%;
    border: 1px solid var(--gray-400);
    border-radius: var(--radius-sm);
    font-size: 13px;
    box-sizing: border-box;
    height: 25px;
    background: var(--gray-50);
    color: var(--gray-800);
    height: 25px; /* KONZISTENTNO sa ostalim poljima */
}

/* Iznos polje - desno poravnanje */
#tab-zut table tbody input.zut-amount-input {
    text-align: right;
    font-weight: 500;
}

/* === DATE PICKER U ZUT TABELI - OVERRIDE === */

/* Wrapper mora biti relative za button positioning */
#tab-zut table tbody .date-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/* Display input sa prostorom za button */
#tab-zut table tbody .date-display {
    flex: 1;
    padding: 4px 32px 4px 8px !important;
    border: 1px solid var(--gray-400);
    border-radius: var(--radius-sm);
    font-size: 13px;
    height: 25px !important;
    box-sizing: border-box;
    background: white;
    color: var(--gray-800);
}

/* Date picker button - manji za tabelu */
#tab-zut table tbody .date-picker-btn {
    position: absolute;
    right: 2px;
    width: 24px;
    height: 21px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
}

#tab-zut table tbody .date-picker-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Hidden input - sakrij ga */
#tab-zut table tbody .date-input-wrapper input[type="date"] {
    display: none;
}

/* === UKUPNO RED - STYLING === */
#tab-zut > div:has(#zutCalculatedTotal) {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 15px;
}

#tab-zut > div:has(#zutCalculatedTotal) strong {
    font-size: 14px;
    color: var(--gray-800);
    font-weight: 700;
}

#tab-zut #zutCalculatedTotal {
    width: 100px;
    text-align: right;
    font-weight: 700;
    font-size: 14px;
    padding: 6px 10px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    color: var(--primary);
    height: 25px;
    box-sizing: border-box;
}

/* === UKUPNA VRIJEDNOST U DEKLARACIJI === */
#tab-zut > div:has(#zutFinalDeclarationValue) {
    margin-top: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
}

#tab-zut #zutFinalDeclarationValue {
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
}

/* === FIX ZA Z-INDEX - Sprječava overflow problema === */
#tab-zut {
    position: relative;
    z-index: 1;
}

#tab-zut table tbody .date-input-wrapper {
    z-index: 5;
}

#tab-zut .date-picker-btn {
    z-index: 10;
}

/* === RESPONSIVENESS === */
@media (max-width: 1024px) {
    #tab-zut table {
        font-size: 12px;
    }
    
    #tab-zut table thead th:nth-child(5) {
        width: 220px; /* Manji "Naziv pružaoca" */
    }
}

@media (max-width: 768px) {
    /* Sakrij thead */
    #tab-zut table thead {
        display: none;
    }

    /* Tabela, tbody, tr — block */
    #tab-zut table,
    #tab-zut table tbody {
        display: block;
        width: 100%;
    }

    /* Svaki red → kartica */
    #tab-zut table tbody tr:not(.zut-total-row) {
        display: block;
        background: var(--gray-50);
        border: 2px solid var(--primary);
        border-radius: 10px;
        margin-bottom: 12px;
        overflow: hidden;
    }

    /* Naziv troška → plavi header kartice */
    #tab-zut table tbody tr td.zut-row-label {
        display: block;
        background: linear-gradient(135deg, var(--primary), var(--primary-light));
        color: white;
        font-size: 13px;
        font-weight: 600;
        padding: 10px 14px;
        letter-spacing: 0.3px;
    }

    /* Polja s labelama → 2-column mini grid */
    #tab-zut table tbody tr td[data-label] {
        display: flex;
        flex-direction: column;
        padding: 6px 14px;
        border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    }

    #tab-zut table tbody tr td[data-label]:last-child {
        border-bottom: none;
        padding-bottom: 10px;
    }

    /* Label iznad inputa */
    #tab-zut table tbody tr td[data-label]::before {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 700;
        color: var(--primary);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 3px;
    }

    #tab-zut table tbody tr td[data-label] input {
        width: 100% !important;
        box-sizing: border-box;
        padding: 6px 8px !important;
        border-radius: var(--radius-sm);
        border: 1px solid var(--gray-400);
        background: var(--gray-50);
        color: var(--gray-800);
    }

    /* Ukupno red */
    #tab-zut table tbody tr.zut-total-row {
        display: flex;
        align-items: center;
        gap: 10px;
        background: rgba(102, 126, 234, 0.05);
        border: 2px solid var(--primary);
        border-radius: 8px;
        padding: 10px 14px;
        margin-top: 4px;
    }

    #tab-zut table tbody tr.zut-total-row td {
        display: block;
        border: none;
        padding: 0;
    }

    #tab-zut table tbody tr.zut-total-row td:first-child {
        font-size: 14px;
        font-weight: 700;
        color: var(--primary);
        white-space: nowrap;
    }

    #tab-zut table tbody tr.zut-total-row td:last-child {
        flex: 1;
    }

    #tab-zut table tbody tr.zut-total-row td input {
        width: 100% !important;
        text-align: right;
        font-weight: bold;
        padding: 6px 8px !important;
        background: var(--gray-50);
        color: var(--gray-800);
        border: 1px solid var(--gray-400);
    }
}
}

.tmb-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 12px 0;
}

.tmb-actions h4 {
  margin: 0 0 4px;
  color: #003399;
  font-size: 16px;
}

.tmb-actions p {
  margin: 0;
  color: #5b6472;
  font-size: 13px;
}

.tmb-sheet-table {
  background: #fff;
  border: 1px solid #7b8794;
  overflow-x: auto;
}

.tmb-row {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) 130px minmax(150px, 1fr) minmax(220px, 1.4fr);
  min-width: 860px;
  border-bottom: 1px solid #b8c0cc;
}

.tmb-row:last-child {
  border-bottom: 0;
}

.tmb-row > span,
.tmb-row > input {
  min-height: 34px;
  padding: 7px 8px;
  border: 0;
  border-right: 1px solid #b8c0cc;
  font-size: 13px;
}

.tmb-row > span:last-child {
  border-right: 0;
}

.tmb-row input,
.tmb-row select {
  width: 100%;
  box-sizing: border-box;
  background: #fffdf4;
  font-weight: 600;
  border: 0;
  padding: 7px 8px;
  font-size: 13px;
}

.tmb-head {
  background: #e8edf7;
  font-weight: 700;
}

.tmb-declared {
  background: #f7fafc;
}

.tmb-footer-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding: 15px;
  background: #fff;
  border: 1px solid #d7dce5;
}

.tmb-form-grid {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border: 1px solid #d7dce5;
}

.tmb-form-section {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.tmb-form-section:last-child {
  border-bottom: 0;
}

.tmb-form-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7a8d;
  margin: 0 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e8ecf2;
}

.tmb-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}

.tmb-form-row.full {
  grid-template-columns: 1fr;
}

.tmb-footer-fields label,
.tmb-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-weight: 700;
  color: #2c3e50;
  font-size: 13px;
}

.tmb-footer-fields input,
.tmb-form-grid input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #9aa4b2;
  border-radius: 4px;
}
