:root {
    --dodatak-surface: rgba(255, 253, 249, 0.94);
    --dodatak-line: rgba(216, 209, 199, 0.88);
    --dodatak-ink: #23303a;
    --dodatak-muted: #5e6b77;
    --dodatak-accent: #155e75;
}

/* PANEL kao kartica */
.dodatak-panel {
    background: linear-gradient(180deg, var(--dodatak-surface) 0%, rgba(244, 251, 253, 0.92) 100%);
    border: 1px solid var(--dodatak-line);
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    margin-top: 18px;
}

/* HEADER kao kod ostalih */
.dodatak-panel .panel-header {
    margin-bottom: 12px;
}

.dodatak-panel .panel-header h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dodatak-accent);
}

/* TEKST */
.dodatak-copy {
    display: grid;
    gap: 14px;
    color: var(--dodatak-ink);
    line-height: 1.7;
    font-size: 0.98rem;
}

.dodatak-copy p {
    margin: 0;
    text-align: justify;
}

/* BLAGI HOVER kao moderne kartice */
.dodatak-panel:hover {
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* highlight blok */
.dodatak-highlight {
    background: rgba(21, 94, 117, 0.08);
    border: 1px solid rgba(21, 94, 117, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    color: #155e75;
}

/* napomena blok */
.dodatak-note {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.95rem;
    color: #4b5563;
}

/* bolji spacing */
.dodatak-copy {
    gap: 16px;
}


.dodatak-video {
    margin: 18px 0 6px;
    display: grid;
    gap: 10px;
}

.dodatak-video video {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(216, 209, 199, 0.6);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.video-desc {
    font-size: 0.92rem;
    color: #5e6b77;
    line-height: 1.5;
    margin: 0;
}


.video-wrapper {
    position: relative;
    cursor: pointer;
}

.video-wrapper video {
    width: 100%;
    border-radius: 12px;
}

/* PLAY dugme */
.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 42px;
    color: white;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 12px 18px;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* sakrij dugme kad svira */
.video-wrapper.playing .video-play {
    opacity: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* FOOTER */
.dodatak-footer {
    margin: 30px 0 10px;
    padding: 20px 16px 14px;
    border-top: 1px solid var(--dodatak-line);
    text-align: center;
    color: var(--dodatak-muted);
    font-size: 0.95rem;
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
}

/* raspored */
.footer-inner {
    display: grid;
    gap: 6px;
}

/* glavna linija */
.footer-main {
    font-weight: 600;
    color: var(--dodatak-ink);
}

/* kontakt */
.footer-contact {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* copyright */
.footer-copy {
    font-size: 0.85rem;
    opacity: 0.7;
}


/* MOBILE */
@media (max-width: 840px) {
    .dodatak-panel {
        padding: 18px 16px;
    }

    .dodatak-copy {
        gap: 12px;
    }

    .dodatak-footer {
        margin-top: 18px;
        padding-top: 16px;
        font-size: 0.9rem;
    }
}



/* MOBILNI STAVKE */

.cards-wrap {
    display: none;
}

.items-note {
    display: none;
}

@media (max-width: 1100px) {

    .table-wrap {
        display: none;
    }

    .cards-wrap {
        display: block;
    }

    .item-card {
        border: 1px solid #ddd;
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

    .card-header {
        display: flex;
        justify-content: space-between;
        font-weight: bold;
        cursor: pointer;
    }

    .item-card.collapsed .card-body {
        display: none;
    }

    .row-2 {
        display: flex;
        gap: 8px;
    }

    .row-2 input {
        width: 100%;
    }

    .item-card input {
        width: 100%;
        margin: 5px 0;
    }
.item-card label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 6px;
    margin-bottom: 2px;
}

.item-card label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 6px;
    margin-bottom: 2px;
}

/* bold za bitna polja */
.zap-bold {
    font-weight: 600;
    color: #222;
}

/* poravnanja */
.zap-right {
    text-align: right;
}

.zap-center {
    text-align: center;
}

.item-vat-rate:disabled {
    background: #f3f4f6;
    color: #888;
}

    .items-note {
        display: block;
        margin-top: 10px;
        padding: 10px 12px;
        font-size: 13px;
        color: #92400e;
        background: #fff7ed;
        border: 1px solid #fde68a;
        border-radius: 10px;
        line-height: 1.4;
    }
}


/* Objašnjenja */


.document-flow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
    font-size: 14px;
    color: #555;
}

.flow-label {
    font-weight: 600;
}

.flow-steps {
    display: flex;
    align-items: center;
    gap: 6px;
}

.flow-step {
    background: #f3f5f7;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.flow-arrow,
.flow-plus {
    color: #888;
    font-weight: bold;
}

.flow-info-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #888;
}

.document-flow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
    font-size: 14px;
    color: #555;
}
.flow-label {
    font-weight: 600;
}

.flow-steps {
    display: flex;
    align-items: center;
    gap: 6px;
}

.flow-step {
    background: #f3f5f7;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.flow-arrow,
.flow-plus {
    color: #888;
    font-weight: bold;
}

.flow-info-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #888;
    padding: 0 4px;
}

.document-flow-help {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
    font-size: 14px;
    line-height: 1.5;
}
.document-flow-help {
    transition: all 0.2s ease;
}

.document-flow-help p {
    margin: 0 0 8px;
}

.flow-more-link {
    font-weight: 600;
    text-decoration: none;
}

.is-hidden {
    display: none;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.info-icon:hover {
    transform: scale(1.1);
}

.flow-step {
    background: #f3f5f7;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: default;
}

/* hover efekat */
.flow-step:hover {
    transform: translateY(-3px) scale(1.05);
    background: #e0e7ff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.flow-arrow,
.flow-plus {
    transition: all 0.2s ease;
}

.flow-steps:hover .flow-arrow,
.flow-steps:hover .flow-plus {
    color: #6366f1;
}

.flow-step:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(135deg, #e0e7ff, #eef2ff);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.flow-step:active {
    transform: translateY(-1px) scale(1.02);
}

.flow-step.active {
    background: #2563eb;
    color: #fff;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.flow-step.active {
    animation: popIn 0.2s ease;
}

@keyframes popIn {
    0% { transform: scale(0.95); }
    100% { transform: scale(1.05); }
}

.flow-link {
    cursor: pointer;
    text-decoration: none;
}

.flow-link:hover {
    text-decoration: none;
}

.flow-link:active {
    transform: scale(0.95);
}


/* === GRID === */
.dok-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 16px;
}

/* === KARTICE === */
.dok-item {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

/* hover efekat (odskok + senka) */
.dok-item:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

/* suptilna linija gore kao highlight */
.dok-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0ea5a4, #3b82f6);
    opacity: 0.85;
}

/* === NASLOVI === */
.dok-item h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

/* === TEKST === */
.dok-item p {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

/* === FLOW SEKCIJA === */
.dok-flow {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
    border: 1px solid #e5e7eb;
}

.dok-flow h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
}

.dok-flow p {
    margin: 6px 0;
    font-size: 14px;
    color: #1f2937;
}

/* PROFaktura – plava */
.dok-item:nth-child(1)::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* AVANSNA – zelena */
.dok-item:nth-child(2)::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}

/* FAKTURA – narandžasta */
.dok-item:nth-child(3)::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* OTPREMNICA – ljubičasta */
.dok-item:nth-child(4)::before {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.dok-item:nth-child(1) h3 { color: #2563eb; }
.dok-item:nth-child(2) h3 { color: #059669; }
.dok-item:nth-child(3) h3 { color: #d97706; }
.dok-item:nth-child(4) h3 { color: #7c3aed; }

/* inicijalno stanje */
.dok-ikona {
    display: inline-block;
    transition: transform 0.35s ease;
}

/* hover efekat */
.dok-item:hover .dok-ikona {
    transform: rotate(-12deg) scale(1.2);
}

.dok-item:hover {
    transform: translateY(-6px) scale(1.02);
}

/* === RESPONSIVE SITNICE === */
@media (max-width: 768px) {
    .dok-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .dok-item {
        padding: 14px;
    }

    .dok-item h3 {
        font-size: 15px;
    }

    .dok-item p {
        font-size: 13px;
    }
}


@media (max-width: 768px) {
    .flow-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .flow-arrow,
    .flow-plus {
        display: none;
    }
}

@media (max-width: 768px) {

    .flow-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .flow-arrow,
    .flow-plus {
        display: none;
    }

    .flow-step::before {
        content: "↓ ";
        color: #999;
    }
}