/* =====================================================================
   Zajednicki dizajn (10.10.2026): kartice, dugmad, tabele, znacke,
   raspored "glavna kolona + sticky panel desno" i tabovi.
   Prefiks zd-. Bootstrap se ne ucitava, sve zajednicko je ovdje;
   stilovi specificni za jednu stranicu ostaju u <style> te stranice.
   ===================================================================== */


:root {
    --zd-navy: #1e3a5f;
    --zd-navy-2: #2d5a8e;
    --zd-bg: #f0f4f8;
    --zd-card: #ffffff;
    --zd-border: #e2e8f0;
    --zd-border-strong: #cbd5e1;
    --zd-text: #0f172a;
    --zd-muted: #64748b;
    --zd-faint: #94a3b8;
    --zd-ai: #7c3aed;
    --zd-ai-bg: #f5f3ff;
    --zd-green: #047857;
    --zd-green-bg: #d1fae5;
    --zd-amber: #92400e;
    --zd-amber-bg: #fef3c7;
    --zd-red: #b91c1c;
    --zd-red-bg: #fee2e2;
}

.zd-loading { padding: 24px 32px; color: var(--zd-muted); }

/* ---------- Tabovi ---------- */
.zd-tabs {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--zd-card);
    border-bottom: 1px solid var(--zd-border-strong);
    box-shadow: 0 1px 4px rgba(15,23,42,0.06);
}

.zd-tabs-inner {
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 0 24px;
    overflow-x: auto;
}

.zd-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 14px 9px;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    color: var(--zd-muted);
    font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.zd-tab:hover { background: #f8fafc; color: var(--zd-text); }

.zd-tab.active {
    color: var(--zd-navy);
    border-bottom-color: var(--zd-navy);
}

.zd-tab-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--zd-border);
    color: var(--zd-muted);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.zd-tab.active .zd-tab-num { background: var(--zd-navy); color: #fff; }

.zd-tab-text { display: flex; flex-direction: column; line-height: 1.2; }
.zd-tab-name { font-size: 13px; font-weight: 700; }
.zd-tab-sub { font-size: 11px; color: var(--zd-faint); }

.zd-tabs-spacer { flex: 1; }

.zd-firma-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 4px 0 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--zd-muted);
    flex-shrink: 0;
}

.zd-firma-filter select,
.zd-select {
    padding: 6px 10px;
    border: 1.5px solid var(--zd-border-strong);
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    color: var(--zd-text);
    background: #fff;
    max-width: 240px;
    text-transform: none;
    letter-spacing: 0;
}

.zd-select { width: 100%; max-width: none; }

.zd-ai-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    background: var(--zd-ai);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(124,58,237,0.35);
}

/* ---------- Layout: glavna kolona + panel ---------- */
.zd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
    padding: 20px 24px 40px;
    background: var(--zd-bg);
    min-height: 100vh;
}

.zd-main { min-width: 0; }

.zd-aside {
    position: sticky;
    top: 68px; /* ispod tab trake */
    max-height: calc(100vh - 84px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 1200px) {
    .zd-layout { grid-template-columns: minmax(0, 1fr); }
    .zd-aside { position: static; max-height: none; order: -1; }
}

/* ---------- Kartice ---------- */
.zd-card {
    background: var(--zd-card);
    border: 1px solid var(--zd-border-strong);
    border-radius: 10px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.05);
}

.zd-card-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--zd-border);
    background: #f8fafc;
    border-radius: 10px 10px 0 0;
}

.zd-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--zd-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.zd-card-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.zd-card-body { padding: 14px 16px; }

.zd-sek {
    font-size: 11px;
    font-weight: 600;
    color: var(--zd-faint);
    background: #fff;
    border: 1px solid var(--zd-border);
    border-radius: 4px;
    padding: 1px 6px;
}

.zd-count {
    font-size: 11px;
    background: var(--zd-navy);
    color: #fff;
    border-radius: 999px;
    padding: 1px 8px;
}

.zd-firma-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--zd-navy);
}

.zd-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid var(--zd-border);
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}

.zd-sub-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 14px 0 8px;
}

.zd-sub-head:first-child { margin-top: 0; }

.zd-sub-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.zd-sub-title--sm { font-size: 12px; color: var(--zd-muted); }

.zd-sub-head > .zd-toolbar,
.zd-sub-head > .zd-ai-group { margin-left: auto; }

.zd-subcard {
    border: 1px solid var(--zd-border);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    background: #fcfdfe;
}

.zd-subcard-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.zd-subcard-head .zd-toolbar { margin-left: auto; }
.zd-input-title { flex: 1 1 200px; font-weight: 600; }
.zd-main .zd-input-year { width: 96px; flex: 0 0 96px; }

.zd-divider { height: 1px; background: var(--zd-border); margin: 16px 0; }

.zd-empty { font-size: 12px; color: var(--zd-faint); font-style: italic; margin: 4px 0 8px; }
.zd-empty--sm { margin: 0; }

.zd-hint { font-size: 12px; color: var(--zd-muted); }
.zd-hint a, .zd-hidden-note a { color: var(--zd-navy-2); font-weight: 600; }

/* ---------- Forme ---------- */
.zd-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.zd-grid-2--cards { gap: 0 16px; }

.zd-grid-form {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 12px 16px;
}

@media (max-width: 900px) {
    .zd-grid-2, .zd-grid-form { grid-template-columns: minmax(0, 1fr); }
}

.zd-field { min-width: 0; }
.zd-field--hint { display: flex; align-items: flex-end; }

.zd-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0 0 4px;
}

.zd-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.zd-label-row .zd-label { margin: 0; }

/* Kompaktna polja u novim karticama */
.zd-main .sek-input {
    padding: 6px 10px;
    border-width: 1.5px;
    border-color: var(--zd-border-strong);
    border-radius: 6px;
    font-size: 13px;
}

/* Textarea: 3 reda u mirovanju, raste sa sadrzajem dok je u fokusu (Chrome/Edge 123+). */
.zd-ta {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1.5px solid var(--zd-border-strong);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.45;
    font-family: inherit;
    color: var(--zd-text);
    background: #fff;
    resize: vertical;
    outline: none;
    field-sizing: content;
    min-height: calc(3 * 1.45em + 16px);
    max-height: calc(3 * 1.45em + 16px);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.zd-ta:focus {
    max-height: 60vh;
    border-color: var(--zd-navy);
    box-shadow: 0 0 0 3px rgba(30,58,95,0.12);
}

/* Zakljucan zahtjev ne prima fokus, pa se tada prikazuje cijeli tekst. */
.zakljucano-overlay .zd-ta { max-height: none; }

/* ---------- Key-value ---------- */
.zd-kv-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.zd-kv-card {
    border: 1px solid var(--zd-border);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fcfdfe;
}

.zd-kv-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--zd-text);
}

.zd-kv {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 12px;
    margin: 0;
    font-size: 12px;
}

.zd-kv dt { color: var(--zd-muted); font-weight: 600; }
.zd-kv dd { margin: 0; color: var(--zd-text); overflow-wrap: anywhere; }

/* ---------- Odobrenja (Sek. 3) ---------- */
.zd-main .odobrenja-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }

.zd-odo-grid { display: flex; flex-direction: column; gap: 4px; }

.zd-odo-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.zd-odo-label { font-size: 11px; color: var(--zd-muted); font-weight: 600; }
.zd-main .zd-odo-row .sek-input { padding: 4px 8px; font-size: 12px; }

/* ---------- Dugmad ---------- */
.btn-tool {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: #334155;
    background: #fff;
    border: 1px solid var(--zd-border-strong);
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.btn-tool:hover { background: #f1f5f9; border-color: var(--zd-faint); }
.btn-tool--xs { padding: 2px 8px; font-size: 11px; }
.btn-tool--ai { color: var(--zd-ai); border-color: #ddd6fe; background: var(--zd-ai-bg); }
.btn-tool--ai:hover { background: #ede9fe; border-color: #c4b5fd; }

/* InputFile je sakriven unutar label.btn-tool; klik na labelu otvara izbor fajla. */
.zd-file { display: none; }

.zd-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.zd-toolbar-sep { width: 1px; height: 18px; background: var(--zd-border-strong); margin: 0 2px; }

.zd-ai-group { display: inline-flex; align-items: center; gap: 4px; }

.btn-ai {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--zd-ai);
    border: 1px solid var(--zd-ai);
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-ai:hover:not(:disabled) { background: #6d28d9; }
.btn-ai:disabled { opacity: 0.55; cursor: wait; }

.btn-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background: #fff;
    border: 1px solid var(--zd-border-strong);
    border-radius: 6px;
    cursor: pointer;
}

.btn-icon:hover, .btn-icon.active { background: var(--zd-ai-bg); border-color: #c4b5fd; }

.btn-x {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--zd-red);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
}

.btn-x:hover { background: var(--zd-red-bg); border-color: #fecaca; }

.btn-primary-lg, .btn-secondary-lg, .btn-success-lg {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.15s, background 0.15s;
}

.btn-primary-lg { color: #fff; background: linear-gradient(135deg, var(--zd-navy), var(--zd-navy-2)); border: none; }
.btn-success-lg { color: #fff; background: #059669; border: none; }
.btn-secondary-lg { color: var(--zd-text); background: #fff; border: 1.5px solid var(--zd-border-strong); }
.btn-primary-lg:hover:not(:disabled), .btn-success-lg:hover { filter: brightness(1.08); }
.btn-secondary-lg:hover { background: #f8fafc; }
.btn-primary-lg:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- AI prompt editor ---------- */
.zd-prompt {
    background: var(--zd-ai-bg);
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.zd-prompt label { display: block; font-size: 11px; font-weight: 700; color: var(--zd-ai); margin-bottom: 6px; }

.zd-prompt textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 110px;
    padding: 8px;
    border: 1px solid #ddd6fe;
    border-radius: 6px;
    font-size: 12px;
    font-family: Consolas, monospace;
}

/* ---------- Poruke ---------- */
.zd-status-line { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.zd-status-line:empty { display: none; }

.zd-msg { font-size: 12px; font-weight: 600; margin: 0; }
.zd-msg.ok { color: var(--zd-green); }
.zd-msg.err { color: var(--zd-red); }
.zd-msg.info { color: var(--zd-navy-2); }
.zd-msg.ai { color: var(--zd-ai); }

.zd-pre { white-space: pre-wrap; }

/* ---------- Tabele ---------- */
.zd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 6px;
}

.zd-table th {
    text-align: left;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--zd-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #f8fafc;
    border-bottom: 1.5px solid var(--zd-border-strong);
    white-space: nowrap;
}

.zd-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--zd-text);
    vertical-align: middle;
}

.zd-table tbody tr:hover td { background: #f8fafc; }

.zd-table th.num, .zd-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zd-main .zd-table .num .sek-input { text-align: right; font-variant-numeric: tabular-nums; }
.zd-table td.neg { color: var(--zd-red); }
.zd-col-name { font-weight: 600; color: #334155; min-width: 160px; }
.zd-table .zd-col-pct { color: var(--zd-faint); font-size: 11px; }
.zd-col-badge { width: 80px; }

.zd-table--edit td { padding: 3px 4px; }
.zd-main .zd-table--edit .sek-input { padding: 4px 6px; font-size: 12px; min-width: 80px; }
.zd-table--edit tbody th.zd-col-name { padding: 3px 4px; background: transparent; border-bottom: 1px solid #f1f5f9; }
.zd-main .zd-table--wide .sek-input { min-width: 90px; }

.zd-row-act { width: 30px; text-align: center; }

.zd-table--fin thead th:first-child,
.zd-table--fin tbody td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
.zd-table--fin thead th:first-child { background: #f8fafc; }

.zd-table--rizik td:last-child { width: 55%; }

.zd-group-row td {
    background: #f1f5f9 !important;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #475569;
    padding: 5px 8px;
}

.zd-hidden-note { font-size: 11px; color: var(--zd-faint); margin-bottom: 10px; min-height: 2px; }

.zd-tab-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.zd-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

/* ---------- Znacke ---------- */
.zd-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.zd-badge--green { background: var(--zd-green-bg); color: var(--zd-green); }
.zd-badge--amber { background: var(--zd-amber-bg); color: var(--zd-amber); }
.zd-badge--red { background: var(--zd-red-bg); color: var(--zd-red); }

.zd-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--zd-faint);
}

.zd-trend { font-size: 9px; margin-left: 3px; color: var(--zd-faint); }

/* ---------- Slike ---------- */
.zd-slike { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.zd-slike:empty { display: none; }

.zd-slika {
    display: grid;
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr) 24px;
    align-items: center;
    gap: 8px;
}

.zd-slika-ime { font-size: 12px; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- SWOT ---------- */
.zd-swot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
}

.zd-swot-head {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.zd-swot-head--plus { background: var(--zd-green-bg); color: var(--zd-green); }
.zd-swot-head--minus { background: var(--zd-red-bg); color: var(--zd-red); }

.zd-swot-topic {
    grid-column: 1 / -1;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-top: 8px;
    padding-bottom: 2px;
    border-bottom: 1px dashed var(--zd-border);
}

.zd-swot-plus { border-left: 4px solid #34d399; }
.zd-swot-minus { border-left: 4px solid #f87171; }

/* ---------- Desni panel ---------- */
.zd-panel {
    background: var(--zd-card);
    border: 1px solid var(--zd-border-strong);
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.05);
}

.zd-panel--actions { display: flex; flex-direction: column; gap: 8px; }

.zd-panel-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--zd-muted);
    margin-bottom: 8px;
}

.zd-panel-sub {
    font-size: 11px;
    font-weight: 700;
    color: var(--zd-muted);
    margin: 12px 0 4px;
}

.zd-kv--panel { font-size: 12px; }

.zd-panel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

.zd-panel-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.zd-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.zd-panel-note { font-size: 11px; color: var(--zd-muted); margin: 8px 0 0; }

.zd-autosave { font-size: 11px; color: var(--zd-faint); line-height: 1.4; text-align: center; }

.zd-ai-usage { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--zd-muted); }
.zd-ai-usage strong { font-size: 16px; color: var(--zd-ai); }

.zd-panel-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    color: #334155;
    cursor: pointer;
}

.zd-log { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.zd-log li { padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; }
.zd-log-meta { color: var(--zd-faint); font-size: 11px; margin-bottom: 3px; }
.zd-log-note { color: var(--zd-muted); font-size: 11px; margin-top: 3px; }

.status-pill.status-pill--done { background: var(--zd-green-bg); color: var(--zd-green); }

/* ---------- Navigacija izmedju tabova ---------- */
.zd-tab-nav {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

/* ---------- Duge forme: lista sekcija, mini obracun (zahtjev FL) ---------- */
.zd-panel-klijent {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    font-size: 15px;
    color: var(--zd-text);
    margin-bottom: 4px;
}

.zd-panel-klijent + .zd-panel-note { margin: 0 0 8px; }
.zd-panel-klijent + .zd-kv,
.zd-panel-note + .zd-kv { margin-top: 10px; }

.zd-obracun-mini {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
}

.zd-obracun-mini > div {
    background: #f8fafc;
    border: 1px solid var(--zd-border);
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.zd-obracun-mini span { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--zd-muted); }
.zd-obracun-mini strong { font-size: 13px; color: var(--zd-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.zd-obracun-mini .los { background: var(--zd-red-bg); border-color: #fecaca; }
.zd-obracun-mini .los strong { color: var(--zd-red); }

.zd-sek-nav { display: flex; flex-direction: column; gap: 1px; }

.zd-sek-link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 5px 8px;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: var(--zd-muted);
    text-align: left;
    cursor: pointer;
}

.zd-sek-link:hover { background: #f1f5f9; color: var(--zd-text); }

.zd-sek-link.active {
    background: #eff6ff;
    border-left-color: var(--zd-navy);
    color: var(--zd-navy);
}

.zd-sek-broj {
    width: 20px;
    flex-shrink: 0;
    font-size: 11px;
    color: var(--zd-faint);
    text-align: right;
}

.zd-sek-link.active .zd-sek-broj { color: var(--zd-navy); }
.zd-sek-link .zd-badge { margin-left: auto; }

.zd-btn-puna { width: 100%; }
.zd-btn-par { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.zd-btn-par > button { padding-left: 6px; padding-right: 6px; white-space: normal; }

.zd-msg-btn {
    background: var(--zd-red-bg);
    color: var(--zd-red);
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.zd-potvrda-wrap:empty { display: none; }
.zd-potvrda-wrap .potvrda-box { margin-bottom: 0; }

/* Elementi koji postoje samo dok je panel ispod/iznad sadrzaja (uski ekrani). */
.zd-samo-usko { display: none; }

@media (max-width: 1200px) {
    .zd-samo-usko { display: block; }
}

/* ---------- Tabovi unutar glavne kolone forme (zahtjev PL) ---------- */
.zd-tabs--forma {
    top: 70px; /* ispod sticky zaglavlja stranice */
    z-index: 8;
    margin: 0 0 14px;
    border: 1px solid var(--zd-border-strong);
    border-radius: 10px;
}

.zd-tabs--forma .zd-tabs-inner { padding: 0 8px; }
.zd-tab .zd-badge { margin-left: 2px; }

.zd-badge--siva { background: #e2e8f0; color: #334155; }

.zd-link-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--zd-navy-2);
    cursor: pointer;
    text-align: left;
}

.zd-link-btn:hover { text-decoration: underline; }

.zd-panel-list li.zd-aktivna .zd-link-btn { color: var(--zd-text); font-weight: 700; }
.zd-panel-list li.zd-aktivna::before { content: "▸"; color: var(--zd-navy); margin-right: -4px; }

.zd-centar { text-align: center; }

/* =====================================================================
   Ujednacen izgled ostalih stranica (10.10.2026).
   Stranice imaju svoje <style> blokove sa istim nazivima klasa (.card, th, td...);
   ovdje su selektori vezani za omotac stranice (.admin-wrapper, .dash-...) pa
   imaju jacu specificnost i vaze bez obzira na redoslijed ucitavanja.
   ===================================================================== */

/* ---------- Zaglavlja svih stranica: nize i ujednacena ---------- */
.admin-wrapper .admin-header,
.dashboard-wrapper .dash-header,
.scoring-wrapper .scoring-header,
.prompt-wrapper .prompt-header,
.novi-wrapper .novi-header {
    padding: 14px 24px;
}

.admin-wrapper .admin-header h1,
.dashboard-wrapper .dash-header-left h1,
.scoring-wrapper .scoring-header h1,
.prompt-wrapper .prompt-header h1,
.novi-wrapper .novi-header h1 {
    font-size: 18px;
}

.admin-wrapper .admin-header p,
.dashboard-wrapper .dash-header-left p,
.scoring-wrapper .scoring-header p,
.prompt-wrapper .prompt-header p,
.novi-wrapper .novi-header p {
    font-size: 12px;
}

/* ---------- Sadrzaj ---------- */
.admin-wrapper .admin-content { padding: 20px 24px 40px; max-width: 1640px; }
.dashboard-wrapper .dash-content { padding: 20px 24px 40px; max-width: 1640px; }
.scoring-wrapper .scoring-content { padding: 20px 24px 40px; max-width: 1400px; }
.prompt-wrapper .prompt-content { padding: 20px 24px 40px; max-width: 1100px; }
.novi-wrapper .novi-content { padding: 20px 24px 40px; }

/* ---------- Kartice ---------- */
.admin-wrapper .card,
.prompt-wrapper .prompt-card,
.novi-wrapper .form-card,
.scoring-wrapper .upload-card {
    border: 1px solid var(--zd-border-strong);
    border-radius: 10px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.05);
}

.admin-wrapper .card-header,
.prompt-wrapper .prompt-card-header,
.novi-wrapper .form-card-header,
.scoring-wrapper .upload-card-header {
    padding: 10px 16px;
    font-size: 14px;
}

.admin-wrapper .card-body,
.prompt-wrapper .prompt-card-body,
.novi-wrapper .form-card-body,
.scoring-wrapper .upload-card-body {
    padding: 14px 16px;
}

/* ---------- Tabele ---------- */
.admin-wrapper th,
.dashboard-wrapper .zahtjev-table thead th,
.scoring-wrapper .scoring-table thead th {
    padding: 7px 10px;
    font-size: 11px;
}

.admin-wrapper td,
.dashboard-wrapper .zahtjev-table tbody td,
.scoring-wrapper .scoring-table tbody td {
    padding: 6px 10px;
    font-size: 13px;
}

/* Hover preko boje reda (upozorenje, nacrt) - ne zamjenjuje je. */
.admin-wrapper tbody tr:hover td,
.dashboard-wrapper .zahtjev-table tbody tr:hover td,
.scoring-wrapper .scoring-table tbody tr:hover td {
    box-shadow: inset 0 0 0 9999px rgba(15,23,42,0.035);
}

.admin-wrapper th.num,
.admin-wrapper td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---------- Filteri iznad lista ---------- */
.admin-wrapper .filteri {
    background: var(--zd-card);
    border: 1px solid var(--zd-border-strong);
    border-radius: 10px;
    padding: 10px 14px;
    gap: 10px 12px;
    margin-bottom: 14px;
}

.admin-wrapper .filter-group { gap: 4px; }
.admin-wrapper .filter-group label { font-size: 11px; }

.admin-wrapper .filter-group input,
.admin-wrapper .filter-group select,
.admin-wrapper .search-input {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
    border-color: var(--zd-border-strong);
}

.admin-wrapper .toolbar { margin-bottom: 14px; gap: 10px; }

/* ---------- Forme ---------- */
.admin-wrapper .form-grid { gap: 10px 14px; }
.admin-wrapper .form-group { gap: 4px; }
.admin-wrapper .form-group label { font-size: 12px; }

.admin-wrapper .form-group input,
.admin-wrapper .form-group select,
.admin-wrapper .form-group textarea,
.novi-wrapper .form-field input,
.novi-wrapper .form-field select,
.scoring-wrapper .form-field input {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
}

/* Checkbox/radio ne dobijaju padding polja. */
.admin-wrapper .form-group input[type=checkbox],
.admin-wrapper .form-group input[type=radio] { padding: 0; }

.admin-wrapper .msg-ok,
.admin-wrapper .msg-err { padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }

/* ---------- Statistike na dashboardu analize ---------- */
.dashboard-wrapper .stats-row { gap: 12px; margin-bottom: 18px; }
.dashboard-wrapper .stat-card { padding: 14px 16px; border-radius: 10px; }
