/* ============================= */
/* NOVI IZGLED FAKTURE */
/* Dodati na kraj glavnog CSS fajla */
/* ============================= */

.faktura-novi-izgled {
    background: #ffffff;
    color: #111827;
    max-width: 980px;
    margin: 20px auto;
    padding: 45px 55px;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
    font-size: 14px;
    line-height: 1.45;
}

.faktura-zaglavlje {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.faktura-izdavalac {
    flex: 1;
    color: #111827;
}

.faktura-izdavalac .naziv-firme {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #0f172a;
}

.faktura-logo {
    width: 260px;
    text-align: right;
}

.faktura-logo img {
    max-width: 240px;
    max-height: 120px;
    object-fit: contain;
}

.logo-placeholder {
    width: 220px;
    height: 90px;
    margin-left: auto;
    border: 1px dashed #9ca3af;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-weight: 700;
    letter-spacing: 2px;
}

.linija-zaglavlje {
    height: 3px;
    background: #111827;
    margin: 28px 0 55px;
}

.faktura-info-red {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 45px;
    align-items: start;
    margin-bottom: 40px;
}

.faktura-podaci {
    padding-top: 20px;
}

.red-podatka {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 15px;
    margin-bottom: 12px;
    align-items: center;
}

.red-podatka span {
    font-weight: 700;
    color: #374151;
}

.red-podatka strong {
    color: #111827;
}

.kupac-box {
    border: 2px solid #111827;
    padding: 16px 18px;
    min-height: 145px;
    background: #ffffff;
}

.kupac-naslov {
    font-weight: 800;
    text-transform: uppercase;
    color: #111827;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.kupac-naziv {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 6px;
}

.kupac-crta {
    border-bottom: 1px solid #111827;
    margin-bottom: 10px;
}

.kupac-box div {
    margin-bottom: 5px;
}

.tabela-fakture-print {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 13px;
}

.tabela-fakture-print th,
.tabela-fakture-print td {
    border: 1px solid #374151;
    padding: 10px 8px;
    vertical-align: middle;
}

.tabela-fakture-print th {
    background: #f3f4f6;
    font-weight: 800;
    color: #111827;
}

.tabela-fakture-print small {
    color: #4b5563;
}

.tabela-fakture-print .centar {
    text-align: center;
}

.tabela-fakture-print .desno {
    text-align: right;
}

.tabela-fakture-print .sirina-rb {
    width: 55px;
}

.tabela-fakture-print .ukupno-label {
    font-weight: 800;
    background: #f9fafb;
}

.tabela-fakture-print .ukupno-iznos {
    font-weight: 900;
    font-size: 15px;
    background: #f9fafb;
}

.rezime-fakture {
    display: flex;
    justify-content: flex-end;
    gap: 25px;
    margin-top: 18px;
    padding: 12px 0;
    color: #111827;
}

.napomena-fakture {
    margin-top: 45px;
    font-size: 14px;
    color: #111827;
}

.potpisi-fakture {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 80px;
    margin-top: 95px;
}

.potpis-blok {
    width: 260px;
    text-align: center;
    color: #111827;
    font-weight: 600;
}

.potpis-desno {
    margin-left: auto;
}

.potpis-tekst {
    margin-bottom: 18px;
    font-weight: 700;
    font-size: 13px;
}

.potpis-linija {
    border-bottom: 1px solid #111827;
    height: 28px;
    margin-bottom: 8px;
}

/* ŠTAMPA / PDF */

@media print {
    body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .noprint,
    .sidebar,
    .meni,
    .navigacija,
    .zaglavlje-aplikacije,
    .podnozje-aplikacije,
    header,
    footer {
        display: none !important;
    }

    .faktura-novi-izgled {
        box-shadow: none !important;
        border-radius: 0 !important;
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 18mm 16mm !important;
        font-size: 12px !important;
    }

    .faktura-izdavalac .naziv-firme {
        font-size: 16px !important;
    }

    .faktura-logo img {
        max-width: 210px !important;
        max-height: 95px !important;
    }

    .logo-placeholder {
        display: none !important;
    }

    .linija-zaglavlje {
        margin: 20px 0 42px !important;
        height: 2px !important;
        background: #000000 !important;
    }

    .faktura-info-red {
        grid-template-columns: 1.1fr 0.9fr !important;
        gap: 35px !important;
        margin-bottom: 34px !important;
    }

    .red-podatka {
        grid-template-columns: 190px 1fr !important;
        margin-bottom: 9px !important;
    }

    .kupac-box {
        border: 1.5px solid #000000 !important;
        padding: 12px !important;
    }

    .tabela-fakture-print th,
    .tabela-fakture-print td {
        border: 1px solid #000000 !important;
        padding: 7px 6px !important;
    }

    .tabela-fakture-print th {
        background: #eeeeee !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .napomena-fakture {
        margin-top: 38px !important;
    }

    .potpisi-fakture {
        margin-top: 85px !important;
    }

    @page {
        size: A4;
        margin: 0;
    }
}

/* Manji ekrani */

@media screen and (max-width: 800px) {
    .faktura-novi-izgled {
        padding: 25px;
    }

    .faktura-zaglavlje {
        flex-direction: column;
    }

    .faktura-logo {
        width: 100%;
        text-align: left;
    }

    .faktura-info-red {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .red-podatka {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .potpisi-fakture {
        flex-direction: column;
        align-items: stretch;
        gap: 35px;
    }

    .potpis-blok {
        width: 100%;
    }
}
