/* Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html,
body {
    min-height: 100%;
    background: #080f1e;
}
body { color: #e2e8f0; font-family: system-ui, -apple-system, sans-serif; }

/* Layout: Sidebar + Main */
#app { display: block; min-height: 100vh; }
#sidebar {
    background: #0a1120;
    border-right: 1px solid #1a2a42;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 220px;
    z-index: 20;
}
.sidebar-logo { padding: 24px 18px 18px; border-bottom: 1px solid #1a2a42; }
.sidebar-logo h1 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    background: linear-gradient(135deg, #60a5fa 30%, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sidebar-logo p { font-size: 0.62rem; color: #94a3b8; margin-top: 3px; letter-spacing: 0.06em; }
.sidebar-nav { padding: 14px 10px; flex: 1; }
.nav-label { font-size: 0.62rem; color: #334155; text-transform: uppercase; letter-spacing: 0.12em; padding: 0 8px; margin-bottom: 8px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 8px;
    margin-bottom: 2px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
    background: none;
    width: 100%;
    text-align: left;
}
.nav-item:hover { background: #0f1f35; color: #ffffff; }
.nav-item.active {
    background: linear-gradient(135deg, #172554cc, #1e1b4bcc);
    color: #93c5fd;
    border-color: #1d4ed830;
}
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.nav-badge {
    background: #ca8a04;
    color: #000;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 6px;
    margin-left: auto;
    line-height: 1.4;
}
.sidebar-footer { padding: 14px 18px; border-top: 1px solid #1a2a42; }
.sidebar-footer p { font-size: 0.62rem; color: #1e3a5f; }
#main { margin-left: 220px; display: flex; flex-direction: column; min-height: 100vh; }

/* Topbar */
#topbar {
    background: #0a112099;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid #1a2a42;
    padding: 13px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}
#pageTitle { font-size: 1rem; font-weight: 700; }
#pageSubtitle { font-size: 0.75rem; color: #ffffff; margin-top: 1px; }
#content { padding: 24px 26px; flex: 1; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-card {
    background: #0a1120;
    border: 1px solid #1a2a42;
    border-top: 2px solid #1d4ed830;
    border-radius: 10px;
    padding: 18px;
}
.kpi-label { font-size: 0.7rem; color: #ffffff; text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 10px; }
.kpi-value { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.kpi-sub { font-size: 0.72rem; color: #ffffff; margin-top: 8px; }
.kpi-icon { background: #0f2040; border-radius: 8px; padding: 7px; }

/* Search */
.search-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.search-wrap { position: relative; flex: 1; }
.search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); opacity: 0.35; pointer-events: none; }
#searchInput { width: 100%; padding: 9px 12px 9px 34px; font-size: 0.875rem; }

/* Inputs / Selects */
input, select {
    background: #0d1828;
    border: 1px solid #1a2a42;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    color-scheme: dark;
}
input:focus, select:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px #3b82f618; }
input::placeholder { color: #334155; }
select option { background: #0f172a; color: #e2e8f0; }
select option:disabled { background: #0f172a; color: #64748b; }
select optgroup { background: #0f172a; color: #94a3b8; }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #1d4ed8, #4338ca);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-secondary {
    background: #0f1f35;
    color: #ffffff;
    border: 1px solid #1a2a42;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-secondary:hover { background: #152038; color: #ffffff; border-color: #243656; }
.btn-filter {
    background: #0d1828;
    color: #ffffff;
    border: 1px solid #1a2a42;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-filter.active { background: #172554; color: #93c5fd; border-color: #1d4ed850; }
.btn-filter:hover:not(.active) { border-color: #243656; color: #ffffff; }

.theme-toggle-btn-single {
    border: 1px solid #1a2a42;
    border-radius: 999px;
    padding: 7px 13px;
    background: #0d1828;
    color: #93c5fd;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle-btn-single:hover {
    background: #172554;
    color: #ffffff;
    border-color: #243656;
}

/* Tables */
.table-wrap { border: 1px solid #1a2a42; border-radius: 10px; overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
    background: #060e1a;
    color: #ffffff;
    padding: 11px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-bottom: 1px solid #1a2a42;
    position: sticky;
    top: 0;
    z-index: 2;
    cursor: pointer;
    user-select: none;
    transition: color 0.12s;
}
.data-table thead th:hover { color: #60a5fa; }
.data-table tbody tr { border-bottom: 1px solid #0f1e31; transition: background 0.1s; }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #0c1a2e; }
.data-table tbody tr:hover .izdaj-btn { opacity: 1; }
.data-table td { padding: 13px 14px; }

.izdaj-btn {
    opacity: 0;
    background: #172554;
    color: #60a5fa;
    border: 1px solid #1d4ed840;
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 0.73rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.izdaj-btn:hover { background: #1d4ed8; color: white; border-color: #1d4ed8; opacity: 1; }

.val-ok { color: #4ade80; font-size: 1.05rem; }
.val-warning { color: #fb923c; font-weight: 600; font-size: 1.05rem; }
.val-critical { color: #f87171; font-weight: 700; font-size: 1.05rem; }
.val-zero { color: #475569; font-size: 1.05rem; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.badge-green { background: #052e1670; color: #4ade80; border: 1px solid #16a34a30; }
.badge-yellow { background: #42190070; color: #facc15; border: 1px solid #ca8a0430; }
.badge-gray { background: #1e293b; color: #64748b; border: 1px solid #33415550; }

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    animation: pulse-anim 2s ease-in-out infinite;
}
@keyframes pulse-anim {
    0%,100% { box-shadow: 0 0 0 0 #4ade8050; }
    50% { box-shadow: 0 0 0 5px transparent; }
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(4, 10, 22, 0.92);
}
.modal-box {
    background: #0b1525;
    border: 1px solid #1a2a42;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 1px #ffffff06;
}

.qty-btn {
    background: #0f1f35;
    border: 1px solid #1a2a42;
    color: #64748b;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}
.qty-btn.minus:hover { background: #450a0a; border-color: #ef444450; color: #f87171; }
.qty-btn.plus:hover { background: #052e16; border-color: #16a34a50; color: #4ade80; }

.pill { display:inline-block; padding:2px 8px; border-radius:999px; font-size:0.68rem; font-weight:700; letter-spacing:0.04em; }
.pill-novo { background:#172554; color:#93c5fd; }
.pill-izmena { background:#422006; color:#fb923c; }
.pill-identicno { background:#1e293b; color:#64748b; }
.pill-uklonjeno { background:#450a0a; color:#f87171; }
.diff-pos { color:#4ade80; font-weight:700; }
.diff-neg { color:#f87171; font-weight:700; }

.log-panel {
    background:#060e1a;
    border:1px solid #1a2a42;
    border-radius:8px;
    padding:14px;
    font-family:monospace;
    font-size:0.78rem;
    max-height:160px;
    overflow-y:auto;
    margin-top:16px;
}
.log-info { color:#64748b; }
.log-ok { color:#4ade80; }
.log-warn { color:#facc15; }
.log-error { color:#f87171; }

.upload-zone {
    border: 2px dashed #1a2a42;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #060e1a;
}
.upload-zone:hover { border-color: #3b82f6; background: #0a1830; }

#importHistoryWrap {
    background: linear-gradient(180deg, rgba(10, 16, 28, 0.96), rgba(8, 14, 25, 0.96));
    border-color: rgba(71, 85, 105, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}
#importHistoryWrap .data-table thead th { background: rgba(255, 255, 255, 0.03); color: #9fb5d1; }
#importHistoryWrap .data-table tbody tr:hover { background: rgba(59, 130, 246, 0.05); }
#importHistoryWrap .data-table td { padding-top: 15px; padding-bottom: 15px; vertical-align: middle; }
.history-file { color: #e2e8f0; font-weight: 600; letter-spacing: 0.01em; }
.history-note {
    margin-top: 4px;
    font-size: 0.72rem;
    color: #6b7c93;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.history-num {
    text-align: center;
    color: #dbe6f3;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
}
.history-time {
    text-align: center;
    color: #9aa9bc;
    font-size: 0.79rem;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
    white-space: nowrap;
}

.stock-bar-track { height: 3px; background: #0f1e31; border-radius: 2px; margin-top: 5px; width: 100px; }
.stock-bar-fill { height: 100%; border-radius: 2px; transition: width 0.3s; }

.text-empty { color: #1e3a5f; }
.text-muted { color: #64748b; }
.text-soft { color: #94a3b8; }
.text-strong { color: #ffffff; }
.text-link { color: #93c5fd; }
.text-warning-soft { color: #facc15; }
.text-neutral-dash { color: #334155; }
.text-neutral-value { color: #cbd5e1; }
.cell-id {
    font-family: monospace;
    color: #ffffff;
}
.cell-id-link {
    font-family: monospace;
    color: #93c5fd;
}
.compact-field {
    width: 100%;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;
    font-size: 0.75rem;
}
.modal-meta-title {
    font-size: 0.82rem;
    font-weight: 500;
}
.modal-section-title {
    font-size: 0.86rem;
    font-weight: 600;
}
.modal-section-note {
    font-size: 0.76rem;
    margin-top: 3px;
}
.modal-close-btn {
    color: #334155;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.3rem;
    padding: 0 6px;
    line-height: 1;
    transition: color 0.15s ease;
}
.modal-close-btn:hover {
    color: #94a3b8;
}
.artikal-summary-card {
    padding: 10px 12px;
    border: 1px solid #1a2a42;
    border-radius: 12px;
    background: #0f172a;
}
.artikal-summary-label {
    font-size: 0.68rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.artikal-summary-value {
    margin-top: 6px;
    color: #e2e8f0;
}
.inline-link-button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    text-decoration: underline;
}
.modal-table-shell {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    border: 1px solid #1a2a42;
    border-radius: 8px;
}
.modal-footer-line {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #1a2a42;
}
.value-positive {
    color: #4ade80;
    font-weight: 700;
}
.value-returned {
    color: #1e3a5f;
    text-decoration: line-through;
}
.action-return-btn {
    background: #431407;
    color: #fb923c;
    border: 1px solid #7c2d1240;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.action-return-btn:hover {
    background: #7c2d12;
    color: #fdba74;
}
.action-return-label {
    font-size: 0.7rem;
}
.payload-label {
    font-size: 0.67rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 6px;
}
.payload-panel {
    margin: 0;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #1a2a42;
    background: #0f172a;
    color: #cbd5e1;
    overflow: auto;
    max-height: 44vh;
    font-size: 0.8rem;
    line-height: 1.55;
}
.rn-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0b1525;
    border: 1px solid #3b82f6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 210px;
    overflow-y: auto;
    z-index: 200;
}
.rn-option {
    padding: 9px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1a2a42;
    transition: background 0.1s ease;
}
.rn-option:last-child {
    border-bottom: 0;
}
.rn-option:hover {
    background: #1a2a42;
}
.rn-option-label {
    font-family: monospace;
    font-size: 0.88rem;
}
.rn-option-status {
    font-size: 0.7rem;
    margin-left: 12px;
}
.rn-option-status[data-status="otvoren"] {
    color: #4ade80;
}
.rn-option-status[data-status="u toku"] {
    color: #facc15;
}
.rn-option-status[data-status="zatvoren"] {
    color: #64748b;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1a2a42; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #243656; }

:root {
    --new-bg: #0a0f15;
    --new-bg-2: #0f1722;
    --new-panel: #121a26;
    --new-panel-2: #141d2a;
    --new-line: rgba(166, 185, 213, 0.14);
    --new-line-soft: rgba(166, 185, 213, 0.08);
    --new-text: #f4f7fb;
    --new-muted: #9aa9bc;
    --new-blue: #5fb7ff;
    --new-blue-2: #2d7df6;
    --new-blue-soft: rgba(95, 183, 255, 0.14);
    --new-green: #4ade80;
    --new-amber: #ffbf66;
    --new-red: #ff7878;
    --new-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    --sidebar-w: 260px;
}

html {
    background: var(--new-bg);
}

body {
    background: var(--new-bg);
    color: var(--new-text);
    font-family: Inter, "Segoe UI", sans-serif;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 0 0, rgba(95, 183, 255, 0.12), transparent 18%),
        radial-gradient(circle at 100% 0, rgba(74, 222, 128, 0.06), transparent 14%),
        linear-gradient(180deg, var(--new-bg), var(--new-bg-2));
    background-repeat: no-repeat;
}

#sidebar,
#topbar,
.kpi-card,
.table-wrap,
.modal-box,
.upload-zone,
.log-panel {
    border: 1px solid var(--new-line);
    box-shadow: none;
}

#sidebar {
    width: var(--sidebar-w);
    background: #101823;
    backdrop-filter: none;
}

#main { margin-left: var(--sidebar-w); }
#app { position: relative; z-index: 1; }
.sidebar-logo, .sidebar-footer { border-color: var(--new-line); }

.sidebar-logo {
    margin-bottom: 8px;
    padding: 20px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(95, 183, 255, 0.08), rgba(95, 183, 255, 0.02)), var(--new-panel);
}

.sidebar-logo h1 {
    background: linear-gradient(135deg, #dff1ff 10%, var(--new-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-logo p,
.sidebar-footer p,
.nav-label,
#pageSubtitle,
.kpi-sub,
input::placeholder { color: var(--new-muted); }

.nav-item {
    padding: 13px 14px;
    border-radius: 18px;
    margin-bottom: 8px;
    border-color: transparent;
    background: #141c28;
}
.nav-item:hover { background: #182230; }
.nav-item.active {
    background: var(--new-blue-soft);
    color: #c7e8ff;
    border-color: rgba(95, 183, 255, 0.26);
}
.nav-badge { background: var(--new-amber); }

#topbar {
    margin: 20px 26px 0;
    border-radius: 22px;
    background: #141d2a;
    border-bottom: 1px solid var(--new-line);
    padding: 18px 22px;
    backdrop-filter: none;
    box-shadow: none;
    position: static;
}
#pageTitle { font-size: 1.12rem; }
#content { padding: 24px 26px 32px; }

#sectionLager,
#sectionRN,
#sectionUskladjivanje {
    padding: 24px;
    border: 1px solid var(--new-line);
    border-radius: 30px;
    background: var(--new-panel);
    box-shadow: none;
}

.nav-item,
.btn-primary,
.btn-secondary,
.btn-filter,
.izdaj-btn,
.qty-btn,
.upload-zone {
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        opacity 0.15s ease;
}

.btn-primary:hover {
    opacity: 0.92;
    transform: none;
}

.kpi-grid { gap: 16px; }
.kpi-card {
    background: var(--new-panel-2);
    border-radius: 22px;
    border-top-width: 1px;
}
.kpi-label { color: var(--new-muted); }
.kpi-icon { background: rgba(95, 183, 255, 0.12); }

input, select, .btn-filter, .btn-secondary {
    background: #182230;
    border-color: var(--new-line);
    color: var(--new-text);
    border-radius: 14px;
}

.btn-primary {
    background: linear-gradient(180deg, var(--new-blue), var(--new-blue-2));
    color: #07131f;
    border-radius: 14px;
}

.btn-secondary:hover,
.btn-filter:hover:not(.active) {
    background: #1b2635;
    border-color: rgba(95, 183, 255, 0.20);
}

.btn-filter.active {
    background: var(--new-blue-soft);
    color: #c7e8ff;
    border-color: rgba(95, 183, 255, 0.26);
}

.table-wrap,
.upload-zone,
.log-panel,
.modal-box {
    background: var(--new-panel-2);
    border-radius: 24px;
    box-shadow: none;
}

.data-table thead th {
    background: #18212e;
    color: var(--new-muted);
    border-bottom-color: var(--new-line-soft);
    position: static;
}
.data-table tbody tr {
    border-bottom-color: var(--new-line-soft);
    transition: none;
}
.data-table tbody tr:hover { background: #192230; }

.izdaj-btn {
    opacity: 1;
    background: var(--new-blue-soft);
    color: #c7e8ff;
    border-color: rgba(95, 183, 255, 0.25);
    border-radius: 12px;
    padding: 8px 12px;
}
.izdaj-btn:hover {
    background: linear-gradient(180deg, var(--new-blue), var(--new-blue-2));
    color: #07131f;
    border-color: transparent;
}

.val-ok { color: var(--new-green); }
.val-warning { color: var(--new-amber); }
.val-critical { color: var(--new-red); }
.val-zero { color: #68778d; }

.badge-green { background: rgba(74,222,128,0.12); color: var(--new-green); border-color: rgba(74,222,128,0.18); }
.badge-yellow { background: rgba(255,191,102,0.14); color: var(--new-amber); border-color: rgba(255,191,102,0.18); }
.badge-gray { background: rgba(255,255,255,0.05); color: var(--new-muted); border-color: var(--new-line); }

.pill-novo { background: #172554; color: #c7e8ff; }
.pill-izmena { background: #3a2812; color: var(--new-amber); }
.pill-identicno { background: #1d2735; color: var(--new-muted); }
.pill-uklonjeno { background: #3a1820; color: var(--new-red); }

.diff-pos { color: var(--new-green); }
.diff-neg { color: var(--new-red); }

.upload-zone {
    border-style: dashed;
    border-width: 1.5px;
    border-color: rgba(95, 183, 255, 0.28);
    background: #141d2a;
}
.upload-zone:hover {
    border-color: rgba(95, 183, 255, 0.45);
    background: #172131;
}

.modal-box,
#sectionLager,
#sectionRN,
#sectionUskladjivanje,
#topbar,
#sidebar {
    backface-visibility: hidden;
}

.stock-bar-track {
    height: 6px;
    width: 120px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
}
.stock-bar-fill { border-radius: 999px; }

.qty-btn {
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    border-color: var(--new-line);
}

.log-panel { color: var(--new-muted); }
.hidden { display: none !important; }

.scroll-top-btn {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 80;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid #1a2a42;
    background: rgba(10, 17, 32, 0.94);
    color: #e2e8f0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.scroll-top-btn:hover {
    background: #0f1f35;
    border-color: #243656;
    transform: translateY(-1px);
}

html.theme-light .text-empty { color: #64748b; }
html.theme-light .text-muted { color: #64748b; }
html.theme-light .text-soft { color: #64748b; }
html.theme-light .text-strong { color: #1e293b; }
html.theme-light .text-link,
html.theme-light .cell-id-link { color: #2563eb; }
html.theme-light .text-warning-soft { color: #b45309; }
html.theme-light .text-neutral-dash { color: #94a3b8; }
html.theme-light .text-neutral-value { color: #334155; }
html.theme-light .cell-id { color: #1e293b; }
html.theme-light .compact-field {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #1e293b;
}
html.theme-light .modal-close-btn {
    color: #64748b;
}
html.theme-light .modal-close-btn:hover {
    color: #334155;
}
html.theme-light .artikal-summary-card {
    border-color: #e2e8f0;
    background: #ffffff;
}
html.theme-light .artikal-summary-label {
    color: #64748b;
}
html.theme-light .artikal-summary-value {
    color: #1e293b;
}
html.theme-light .modal-table-shell {
    border-color: #cbd5e1;
}
html.theme-light .modal-footer-line {
    border-top-color: #cbd5e1;
}
html.theme-light .value-positive {
    color: #16a34a;
}
html.theme-light .value-returned {
    color: #94a3b8;
}
html.theme-light .action-return-btn {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}
html.theme-light .action-return-btn:hover {
    background: #ffedd5;
    color: #9a3412;
}
html.theme-light .payload-label {
    color: #64748b;
}
html.theme-light .payload-panel {
    border-color: #d5deeb;
    background: #f8fafc;
    color: #334155;
}
html.theme-light .rn-dropdown {
    background: #ffffff;
    border-color: #3b82f6;
}
html.theme-light .rn-option {
    border-bottom-color: #e2e8f0;
}
html.theme-light .rn-option:hover {
    background: #eff6ff;
}
html.theme-light .rn-option-label {
    color: #1e293b;
}
html.theme-light .rn-option-status[data-status="zatvoren"] {
    color: #94a3b8;
}
html.theme-light .scroll-top-btn {
    background: rgba(255, 255, 255, 0.96);
    color: #334155;
    border-color: #cbd5e1;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}
html.theme-light .scroll-top-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
html.theme-light .theme-toggle-btn-single {
    background: #ffffff;
    color: #2563eb;
    border-color: #cbd5e1;
}
html.theme-light .theme-toggle-btn-single:hover {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #94a3b8;
}

@media (max-width: 1100px) {
    #sidebar { position: static; width: auto; }
    #main { margin-left: 0; }
    #app { display: block; }
    #topbar { margin: 16px; }
    #content { padding: 16px; }
}

@media (max-width: 768px) {
    .search-row,
    #topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .kpi-grid { grid-template-columns: 1fr; }
    .data-table { min-width: 760px; }
    .table-wrap { overflow: auto; }
}
