html {
    scroll-behavior: smooth;
}

.detalj-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 100%);
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.detalj-header-left h1 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.detalj-header-left p {
    color: #94a3b8;
    font-size: 13px;
    margin: 0;
}

.btn-back-header {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #e2e8f0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-back-header:hover {
    background: rgba(255,255,255,0.18);
    color: #ffffff;
}

.detalj-content {
    padding: 24px 32px;
    background: #f0f4f8;
    min-height: 100vh;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.info-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

.info-item-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-item-value {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    background: #fef3c7;
    color: #92400e;
}

.zakljucano-overlay {
    pointer-events: none;
    opacity: 0.7;
    filter: grayscale(0.3);
}

.zakljucano-banner {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #92400e;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kompanije-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    margin-bottom: 24px;
    overflow: hidden;
}

.kompanije-card-header {
    background: #f8fafc;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kompanije-table {
    width: 100%;
    border-collapse: collapse;
}

.kompanije-table thead tr {
    background: #e2e8f0;
    border-bottom: 2px solid #94a3b8;
}

.kompanije-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kompanije-table tbody tr {
    border-bottom: 1.5px solid #cbd5e1;
    transition: background 0.15s;
}

.kompanije-table tbody tr:hover {
    background: #f1f5f9;
}

.kompanije-table tbody tr:last-child {
    border-bottom: none;
}

.kompanije-table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: #0f172a;
    vertical-align: middle;
}

.kompanija-name {
    font-weight: 700;
    color: #1e293b;
}

.redni-broj-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #1e3a5f;
    color: #ffffff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.section-heading {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    margin: 56px 0 22px 0;
    padding: 16px 22px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 100%);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(30,58,95,0.22);
    display: flex;
    align-items: center;
    gap: 10px;
    scroll-margin-top: 64px;
    letter-spacing: 0.2px;
}

.section-heading::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 22px;
    background: #38bdf8;
    border-radius: 2px;
    flex-shrink: 0;
}

.msg-info {
    background: #dbeafe;
    border: 2px solid #93c5fd;
    color: #1e40af;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 16px;
    font-weight: 600;
}

.sek-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(15,23,42,0.08);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1.5px solid #cbd5e1;
    transition: box-shadow 0.2s;
}

.sek-card:hover {
    box-shadow: 0 4px 14px rgba(15,23,42,0.12);
}

.sek-card-header {
    background: #f8fafc;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.sek-card-body {
    padding: 20px;
}

.sek-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    margin-top: 16px;
}

.sek-label:first-child {
    margin-top: 0;
}

.sek-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #94a3b8;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sek-textarea:focus {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30,58,95,0.12);
}

.sek-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #94a3b8;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sek-input:focus {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30,58,95,0.12);
}

.btn-sek-save {
    background: linear-gradient(135deg, #1e3a5f, #2d5a8e);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}

.btn-sek-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30,58,95,0.25);
}

.btn-sek-secondary {
    background: #ffffff;
    color: #1e293b;
    border: 2px solid #94a3b8;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
    margin-right: 8px;
}

.btn-sek-secondary:hover {
    background: #f8fafc;
    border-color: #1e3a5f;
    color: #1e3a5f;
}

/* Kompaktna varijanta akcionih dugmadi */
.btn-sek-compact {
    padding: 6px 12px;
    font-size: 12.5px;
    border-width: 1px;
    border-radius: 6px;
    white-space: nowrap;
}

/* Unutar reda akcija razmak drzi gap, ne margine */
.akcije-red .btn-sek-compact {
    margin: 0;
}

/* Akcione kontrole jedna pored druge */
.akcije-red {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0 16px;
}

.import-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #f0f4ff;
    border: 1px solid #c7d7f9;
    border-radius: 6px;
    padding: 5px 10px;
}

.import-inline-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #1e3a5f;
    white-space: nowrap;
}

.btn-add-row {
    background: #f8fafc;
    border: 2px dashed #94a3b8;
    color: #1e293b;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
    margin-top: 8px;
}

.btn-add-row:hover {
    border-color: #2d5a8e;
    color: #2d5a8e;
    background: #f0f4ff;
}

.btn-danger-sm {
    background: #fef2f2;
    border: 2px solid #fca5a5;
    color: #dc2626;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-danger-sm:hover {
    background: #fee2e2;
}

.firma-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(15,23,42,0.08);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1.5px solid #cbd5e1;
    transition: box-shadow 0.2s;
}

.firma-card:hover {
    box-shadow: 0 4px 14px rgba(15,23,42,0.12);
}

.firma-card-header {
    background: #475569;
    color: #ffffff;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    scroll-margin-top: 64px;
    border-bottom: 3px solid #38bdf8;
}

.firma-card-body {
    padding: 22px;
}

.odobrenja-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 1200px) {
    .odobrenja-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .odobrenja-grid {
        grid-template-columns: 1fr;
    }
}

.odobrenje-card {
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 0;
}

.odobrenje-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #cbd5e1;
}

.kupci-tabela-header {
    background: #e2e8f0;
    border-radius: 8px 8px 0 0;
    padding: 14px 16px;
    border: 2px solid #94a3b8;
    border-bottom: none;
    margin-bottom: 0;
}

.odobrenje-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.subsection-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e3a5f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 28px 0 12px 0;
    padding: 0 0 8px 12px;
    border-bottom: 2px solid #dbe3ee;
    border-left: 3px solid #2d5a8e;
    scroll-margin-top: 64px;
}

.subsection-title:first-child {
    margin-top: 0;
}

.sek-divider {
    border: none;
    height: 1px;
    margin: 32px 0;
    background: linear-gradient(90deg, transparent, #cbd5e1 15%, #cbd5e1 85%, transparent);
}

.scoring-table-inner {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #94a3b8;
}

.scoring-table-inner th {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    background: #e2e8f0;
    border: 2px solid #94a3b8;
}

.scoring-table-inner td {
    padding: 8px 12px;
    font-size: 13px;
    color: #0f172a;
    border: 1.5px solid #cbd5e1;
}

.scoring-table-inner tbody tr:hover {
    background: #f1f5f9;
}

.fixed-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: #dbeafe;
    border: 2px solid #93c5fd;
    color: #1e40af;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 300px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   Utility klase koje su se koristile u markupu, a nisu nigdje
   bile definisane (projekat ne ucitava Bootstrap).
   ============================================================ */

.mb-3 { margin-bottom: 16px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin: 12px 0;
    border: 1.5px solid transparent;
}

.alert-warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.alert a { color: inherit; font-weight: 700; }

/* ============================================================
   Horizontalni skrol za siroke tabele + fiksirana prva kolona
   ============================================================ */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

/* Opt-in: prva kolona ostaje vidljiva dok se ostale skroluju horizontalno.
   Stavlja se na tabele sa mnogo kolona (finansijski indikatori, zaduzenost). */
.tbl-sticky th:first-child,
.tbl-sticky td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
}

.tbl-sticky tbody td:first-child {
    background: #ffffff;
}

/* Bez ovoga se inputi (width:100%) skupe i tabela nikad ne prelije,
   pa horizontalni skrol nema efekta. */
.tbl-sticky td .sek-input {
    min-width: 130px;
}

/* Sjenka koja nagovjestava da se sadrzaj nastavlja desno. */
.tbl-sticky th:first-child::after,
.tbl-sticky td:first-child::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 6px;
    transform: translateX(100%);
    pointer-events: none;
    background: linear-gradient(90deg, rgba(15,23,42,0.10), transparent);
}

/* Redovi imaju svoj hover/zebra background — prva kolona mora da ga prati,
   inace bi bijela pozadina "probila" kroz sticky celiju. */
.tbl-sticky tbody tr:hover td:first-child {
    background: #f1f5f9;
}

.scoring-table-inner.tbl-sticky th:first-child {
    background: #e2e8f0;
}

.tbl.tbl-sticky thead th:first-child {
    background: #f8fafc;
}

/* ============================================================
   Zajednicki stil celija tabela — zamjenjuje ponovljene
   inline style atribute u markupu.
   ============================================================ */

.tbl {
    width: 100%;
    border-collapse: collapse;
}

.tbl th {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.tbl td {
    padding: 8px 12px;
}

.tbl--box {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

/* Historija promjena statusa */
.tbl-log {
    width: 100%;
    border-collapse: collapse;
}

.tbl-log th {
    padding: 10px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
}

.tbl-log td {
    padding: 10px 16px;
    font-size: 13px;
    color: #0f172a;
}

/* 5.12 Tabela rizika */
.tbl-rizik {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
}

.tbl-rizik th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    background: #f8fafc;
    width: 50%;
}

.tbl-rizik td {
    padding: 10px 16px;
    font-size: 14px;
}

/* SWOT tabela u Sekciji 8 */
.tbl-swot {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
}

.tbl-swot th {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    background: #1e3a5f;
    width: 50%;
}

.tbl-swot td {
    padding: 10px 12px;
    vertical-align: top;
}
