html.theme-legacy body {
    background: #080f1e;
    color: #e2e8f0;
    font-family: system-ui, -apple-system, sans-serif;
}

html.theme-legacy #app {
    display: block;
    min-height: 100vh;
}

html.theme-legacy #sidebar {
    width: 220px;
    background: #0a1120;
    border-right: 1px solid #1a2a42;
    box-shadow: none;
    backdrop-filter: none;
}

html.theme-legacy #main {
    margin-left: 220px;
}

html.theme-legacy .sidebar-logo {
    margin-bottom: 0;
    padding: 24px 18px 18px;
    border-bottom: 1px solid #1a2a42;
    border-radius: 0;
    background: none;
}

html.theme-legacy .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;
}

html.theme-legacy .sidebar-logo p {
    font-size: 0.62rem;
    color: #94a3b8;
    margin-top: 3px;
    letter-spacing: 0.06em;
}

html.theme-legacy .sidebar-nav {
    padding: 14px 10px;
}

html.theme-legacy .nav-label {
    font-size: 0.62rem;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0 8px;
    margin-bottom: 8px;
}

html.theme-legacy .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;
    border: 1px solid transparent;
    background: none;
}

html.theme-legacy .nav-item:hover {
    background: #0f1f35;
    color: #ffffff;
}

html.theme-legacy .nav-item.active {
    background: linear-gradient(135deg, #172554cc, #1e1b4bcc);
    color: #93c5fd;
    border-color: #1d4ed830;
}

html.theme-legacy .nav-badge {
    background: #ca8a04;
    color: #000;
}

html.theme-legacy .sidebar-footer {
    padding: 14px 18px;
    border-top: 1px solid #1a2a42;
}

html.theme-legacy .sidebar-footer p {
    font-size: 0.62rem;
    color: #1e3a5f;
}

html.theme-legacy #topbar {
    margin: 0;
    padding: 13px 26px;
    border-radius: 0;
    background: #0a112099;
    backdrop-filter: blur(16px);
    border: 0;
    border-bottom: 1px solid #1a2a42;
    box-shadow: none;
}

html.theme-legacy #pageTitle {
    font-size: 1rem;
}

html.theme-legacy #pageSubtitle {
    font-size: 0.75rem;
    color: #ffffff;
    margin-top: 1px;
}

html.theme-legacy #content {
    padding: 24px 26px;
}

html.theme-legacy #sectionLager,
html.theme-legacy #sectionRN,
html.theme-legacy #sectionUskladjivanje {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

html.theme-legacy .kpi-grid {
    gap: 14px;
    margin-bottom: 20px;
}

html.theme-legacy .kpi-card {
    background: #0a1120;
    border: 1px solid #1a2a42;
    border-top: 2px solid #1d4ed830;
    border-radius: 10px;
    padding: 18px;
    box-shadow: none;
}

html.theme-legacy .kpi-label,
html.theme-legacy .kpi-sub {
    color: #ffffff;
}

html.theme-legacy .kpi-icon {
    background: #0f2040;
}

html.theme-legacy input,
html.theme-legacy select {
    background: #0d1828;
    border: 1px solid #1a2a42;
    color: #e2e8f0;
    border-radius: 8px;
    box-shadow: none;
}

html.theme-legacy input::placeholder {
    color: #334155;
}

html.theme-legacy input:focus,
html.theme-legacy select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px #3b82f618;
}

html.theme-legacy select option {
    background: #0f172a;
    color: #e2e8f0;
}

html.theme-legacy select option:disabled {
    background: #0f172a;
    color: #64748b;
}

html.theme-legacy select optgroup {
    background: #0f172a;
    color: #94a3b8;
}

html.theme-legacy .btn-primary {
    background: linear-gradient(135deg, #1d4ed8, #4338ca);
    color: #fff;
    border-radius: 8px;
}

html.theme-legacy .btn-secondary {
    background: #0f1f35;
    color: #ffffff;
    border: 1px solid #1a2a42;
    border-radius: 8px;
}

html.theme-legacy .btn-secondary:hover {
    background: #152038;
    color: #ffffff;
    border-color: #243656;
}

html.theme-legacy .btn-filter {
    background: #0d1828;
    color: #ffffff;
    border: 1px solid #1a2a42;
    border-radius: 8px;
}

html.theme-legacy .btn-filter.active {
    background: #172554;
    color: #93c5fd;
    border-color: #1d4ed850;
}

html.theme-legacy .btn-filter:hover:not(.active) {
    border-color: #243656;
    color: #ffffff;
}

html.theme-legacy .table-wrap,
html.theme-legacy .upload-zone,
html.theme-legacy .log-panel,
html.theme-legacy .modal-box {
    background: #0b1525;
    border: 1px solid #1a2a42;
    border-radius: 10px;
    box-shadow: none;
}

html.theme-legacy .data-table thead th {
    background: #060e1a;
    color: #ffffff;
    border-bottom: 1px solid #1a2a42;
}

html.theme-legacy .data-table tbody tr {
    border-bottom: 1px solid #0f1e31;
}

html.theme-legacy .data-table tbody tr:hover {
    background: #0c1a2e;
}

html.theme-legacy .izdaj-btn {
    opacity: 0;
    background: #172554;
    color: #60a5fa;
    border: 1px solid #1d4ed840;
    border-radius: 6px;
    padding: 5px 11px;
}

html.theme-legacy .data-table tbody tr:hover .izdaj-btn,
html.theme-legacy .izdaj-btn:hover {
    opacity: 1;
}

html.theme-legacy .izdaj-btn:hover {
    background: #1d4ed8;
    color: white;
    border-color: #1d4ed8;
}

html.theme-legacy .badge-green {
    background: #052e1670;
    color: #4ade80;
    border: 1px solid #16a34a30;
}

html.theme-legacy .badge-yellow {
    background: #42190070;
    color: #facc15;
    border: 1px solid #ca8a0430;
}

html.theme-legacy .badge-gray {
    background: #1e293b;
    color: #64748b;
    border: 1px solid #33415550;
}

html.theme-legacy .pill-novo {
    background: #172554;
    color: #93c5fd;
}

html.theme-legacy .pill-izmena {
    background: #422006;
    color: #fb923c;
}

html.theme-legacy .pill-identicno {
    background: #1e293b;
    color: #64748b;
}

html.theme-legacy .pill-uklonjeno {
    background: #450a0a;
    color: #f87171;
}

html.theme-legacy .diff-pos {
    color: #4ade80;
}

html.theme-legacy .diff-neg {
    color: #f87171;
}

html.theme-legacy .upload-zone {
    border: 2px dashed #1a2a42;
    border-radius: 12px;
    background: #060e1a;
}

html.theme-legacy .upload-zone:hover {
    border-color: #3b82f6;
    background: #0a1830;
}

html.theme-legacy .log-panel {
    background: #060e1a;
    border-radius: 8px;
}

html.theme-legacy .stock-bar-track {
    height: 3px;
    width: 100px;
    border-radius: 2px;
    background: #0f1e31;
}

html.theme-legacy .stock-bar-fill {
    border-radius: 2px;
}

html.theme-legacy .qty-btn {
    background: #0f1f35;
    border: 1px solid #1a2a42;
    color: #64748b;
    border-radius: 50%;
}

html.theme-legacy .qty-btn.minus:hover {
    background: #450a0a;
    border-color: #ef444450;
    color: #f87171;
}

html.theme-legacy .qty-btn.plus:hover {
    background: #052e16;
    border-color: #16a34a50;
    color: #4ade80;
}

html.theme-legacy #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: none;
}

html.theme-legacy #importHistoryWrap .data-table thead th {
    background: rgba(255, 255, 255, 0.03);
    color: #9fb5d1;
}

html.theme-legacy #importHistoryWrap .data-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

html.theme-legacy .history-file {
    color: #e2e8f0;
}

html.theme-legacy .history-note {
    color: #6b7c93;
}

html.theme-legacy .history-num {
    color: #dbe6f3;
}

html.theme-legacy .history-time {
    color: #9aa9bc;
}

html.theme-legacy .text-empty {
    color: #1e3a5f;
}

html.theme-legacy .text-muted {
    color: #64748b;
}

html.theme-legacy .text-soft {
    color: #94a3b8;
}

html.theme-legacy .text-strong {
    color: #ffffff;
}

html.theme-legacy .text-link,
html.theme-legacy .cell-id-link {
    color: #93c5fd;
}

html.theme-legacy .text-warning-soft {
    color: #facc15;
}

html.theme-legacy .text-neutral-dash {
    color: #334155;
}

html.theme-legacy .text-neutral-value {
    color: #cbd5e1;
}

html.theme-legacy .cell-id {
    color: #ffffff;
}

html.theme-legacy .compact-field {
    border-color: #1a2a42;
    background: #0d1828;
    color: #e2e8f0;
}

html.theme-legacy .modal-close-btn {
    color: #94a3b8;
}

html.theme-legacy .modal-close-btn:hover {
    color: #ffffff;
}

html.theme-legacy .artikal-summary-card {
    border-color: #1a2a42;
    background: #0f172a;
}

html.theme-legacy .artikal-summary-label {
    color: #64748b;
}

html.theme-legacy .artikal-summary-value {
    color: #e2e8f0;
}

html.theme-legacy .modal-table-shell {
    border-color: #1a2a42;
}

html.theme-legacy .modal-footer-line {
    border-top-color: #1a2a42;
}

html.theme-legacy .value-positive {
    color: #4ade80;
}

html.theme-legacy .value-returned {
    color: #94a3b8;
    text-decoration: line-through;
}

html.theme-legacy .action-return-btn {
    background: #431407;
    color: #fb923c;
    border-color: #7c2d1240;
}

html.theme-legacy .action-return-btn:hover {
    background: #7c2d12;
    color: #fdba74;
}

html.theme-legacy .payload-label {
    color: #94a3b8;
}

html.theme-legacy .payload-panel {
    border-color: #1a2a42;
    background: #0f172a;
    color: #cbd5e1;
}

html.theme-legacy #discrepancyWrap,
html.theme-legacy #importItemsWrap,
html.theme-legacy #auditLogWrap,
html.theme-legacy #discrepancyHistoryWrap,
html.theme-legacy #controlDashboardWrap {
    background: #0b1525;
    border-color: #1a2a42;
    box-shadow: none;
}

html.theme-legacy #discrepancyWrap .data-table thead th,
html.theme-legacy #importItemsWrap .data-table thead th,
html.theme-legacy #auditLogWrap .data-table thead th,
html.theme-legacy #discrepancyHistoryWrap .data-table thead th,
html.theme-legacy #controlDashboardWrap .data-table thead th {
    background: #060e1a;
    color: #ffffff;
    border-bottom: 1px solid #1a2a42;
}

html.theme-legacy #discrepancyWrap .data-table tbody tr,
html.theme-legacy #importItemsWrap .data-table tbody tr,
html.theme-legacy #auditLogWrap .data-table tbody tr,
html.theme-legacy #discrepancyHistoryWrap .data-table tbody tr,
html.theme-legacy #controlDashboardWrap .data-table tbody tr {
    border-bottom: 1px solid #0f1e31;
}

html.theme-legacy #discrepancyWrap .data-table tbody tr:hover,
html.theme-legacy #importItemsWrap .data-table tbody tr:hover,
html.theme-legacy #auditLogWrap .data-table tbody tr:hover,
html.theme-legacy #discrepancyHistoryWrap .data-table tbody tr:hover,
html.theme-legacy #controlDashboardWrap .data-table tbody tr:hover {
    background: #0c1a2e;
}

@media (max-width: 1100px) {
    html.theme-legacy #sidebar {
        position: static;
        width: auto;
    }

    html.theme-legacy #main {
        margin-left: 0;
    }

    html.theme-legacy #app {
        display: block;
    }

    html.theme-legacy #topbar {
        margin: 0;
    }

    html.theme-legacy #content {
        padding: 16px;
    }
}
