/* Kinix theme: autorska prilagodba KNT Monitora prema NexaDash referenci autora Kinix Themes.
   Svijetli režim koristi toplu sivu osnovu i bijele kartice, a tamni neutralne ugljenosive površine.
   Plave akcije, tanke granice i mali radijusi prate referencu; stilovi su ograničeni na Kinix. */

/* Svijetli režim odvaja bijele radne površine od tople sive pozadine i koristi plave glavne akcije. */
html:root[data-theme="kinix"] {
    --bm-bg: #f0eee6;
    --bm-page-bg: #f0eee6;
    --bm-page-bg-soft: #f7f6f2;
    --bm-shell-bg: #f0eee6;
    --bm-sidebar-bg: #ffffff;
    --bm-topbar-bg: #ffffff;
    --bm-surface: #ffffff;
    --bm-surface-raised: #ffffff;
    --bm-surface-modal: #ffffff;
    --bm-surface-hover: #f6f8fb;
    --bm-border: #dededb;
    --bm-border-subtle: #e9e9e5;
    --bm-border-strong: #c8cbd0;
    --bm-text: #25272b;
    --bm-text-primary: #25272b;
    --bm-text-secondary: #555b63;
    --bm-text-muted: #697078;
    --bm-text-soft: #697078;
    --bm-text-placeholder: #697078;
    --bm-accent: #2371c8;
    --bm-accent-2: #45a5b3;
    --bm-row-hover: #f3f7fc;
    --bm-row-selected: #e8f1fb;
    --bm-table-hover: #f3f7fc;
    --bm-sortable-hover: #2371c8;
    --bm-search-bg: #ffffff;
    --bm-search-border: #dededb;
    --bm-search-icon: #697078;
    --bm-search-icon-active: #2371c8;
    --bm-scrollbar-thumb: #c8cbd0;
    --bm-skeleton-from: #f1f1ed;
    --bm-skeleton-to: #e2e3e1;
    --bm-shadow-soft: 0 2px 6px rgba(45, 45, 38, 0.04);
    --bm-shadow-panel: 0 2px 6px rgba(45, 45, 38, 0.04);
    --bm-brand-primary: #25272b;
    --bm-brand-secondary: #697078;
    --bm-brand-hover: #2371c8;
    --bm-brand-divider: #dededb;
    --bm-tooltip-bg: #25272b;
    --bm-tooltip-color: #ffffff;
    --bm-tooltip-text: #ffffff;
    --bm-tooltip-border: transparent;
    --bm-tooltip-shadow: 0 4px 12px rgba(30, 30, 30, 0.16);
    --kinix-link: #2371c8;
    --kinix-primary-bg: #2371c8;
    --kinix-primary-text: #ffffff;
    --kinix-focus: #2371c8;
    --kinix-success: #187853;
    --kinix-success-bg: #e5f4ec;
    --kinix-warning: #946211;
    --kinix-warning-bg: #fff2d7;
    --kinix-error: #b33948;
    --kinix-error-bg: #fce8eb;
    --kinix-blue: #e8f1fb;
    --kinix-blue-ink: #2371c8;
    --kinix-green: #e5f4ec;
    --kinix-green-ink: #187853;
    --kinix-violet: #eeedf8;
    --kinix-violet-ink: #61559e;
    --kinix-amber: #fff2d7;
    --kinix-amber-ink: #946211;
    --kinix-nav-active: #2371c8;
    --kinix-nav-bg: #f3f7fc;
}

/* Tamni režim koristi ugljenosive površine i svijetloplave linkove za čitljivost na tamnoj podlozi. */
html:root[data-theme="kinix"].dark-theme {
    --bm-bg: #1b1c1f;
    --bm-page-bg: #1b1c1f;
    --bm-page-bg-soft: #212225;
    --bm-shell-bg: #1b1c1f;
    --bm-sidebar-bg: #202125;
    --bm-topbar-bg: #202125;
    --bm-surface: #27282b;
    --bm-surface-raised: #27282b;
    --bm-surface-modal: #27282b;
    --bm-surface-hover: #313337;
    --bm-border: #3b3d42;
    --bm-border-subtle: #34363b;
    --bm-border-strong: #555960;
    --bm-text: #f4f4f5;
    --bm-text-primary: #f4f4f5;
    --bm-text-secondary: #c9ccd2;
    --bm-text-muted: #a5aab2;
    --bm-text-soft: #a5aab2;
    --bm-text-placeholder: #a5aab2;
    --bm-accent: #80b7f1;
    --bm-accent-2: #70c6cd;
    --bm-row-hover: #31363e;
    --bm-row-selected: #263b53;
    --bm-table-hover: #31363e;
    --bm-sortable-hover: #80b7f1;
    --bm-search-bg: #27282b;
    --bm-search-border: #3b3d42;
    --bm-search-icon: #a5aab2;
    --bm-search-icon-active: #80b7f1;
    --bm-scrollbar-thumb: #555960;
    --bm-skeleton-from: #313337;
    --bm-skeleton-to: #3b3d42;
    --bm-brand-primary: #f4f4f5;
    --bm-brand-secondary: #a5aab2;
    --bm-brand-hover: #80b7f1;
    --bm-brand-divider: #3b3d42;
    --bm-tooltip-bg: #f4f4f5;
    --bm-tooltip-color: #1b1c1f;
    --bm-tooltip-text: #1b1c1f;
    --kinix-link: #80b7f1;
    --kinix-primary-bg: #2371c8;
    --kinix-primary-text: #ffffff;
    --kinix-focus: #80b7f1;
    --kinix-success: #83d4ae;
    --kinix-success-bg: #273e34;
    --kinix-warning: #f3c976;
    --kinix-warning-bg: #453a27;
    --kinix-error: #f5a0ae;
    --kinix-error-bg: #452d34;
    --bm-shadow-soft: 0 2px 6px rgba(0, 0, 0, 0.08);
    --bm-shadow-panel: 0 2px 6px rgba(0, 0, 0, 0.08);
    --kinix-nav-active: #80b7f1;
    --kinix-nav-bg: #263548;
    --kinix-blue: #263b53;
    --kinix-blue-ink: #80b7f1;
    --kinix-green: #273e34;
    --kinix-green-ink: #83d4ae;
    --kinix-violet: #353044;
    --kinix-violet-ink: #b9aff0;
    --kinix-amber: #453a27;
    --kinix-amber-ink: #f3c976;
}

/* Ravne površine uklanjaju postojeće teksture, gradijente i blur samo u Kinix temi. */
html:root[data-theme="kinix"],
html:root[data-theme="kinix"] :is(body, .app-shell, .workspace, .workspace-body, .content, .login-shell) {
    color: var(--bm-text-primary) !important;
    background: var(--bm-page-bg) !important;
    background-image: none !important;
}

html:root[data-theme="kinix"] :is(.sidebar, .topbar) {
    background: var(--bm-topbar-bg) !important;
    border-color: var(--bm-border) !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

html:root[data-theme="kinix"] .topbar {
    border-bottom: 1px solid var(--bm-border);
}

html:root[data-theme="kinix"] .sidebar {
    background: var(--bm-sidebar-bg) !important;
    border-radius: 0;
    border-right: 1px solid var(--bm-border) !important;
    box-shadow: var(--bm-shadow-soft) !important;
}

html:root[data-theme="kinix"] :is(.sidebar-wordmark, .sidebar-wordmark--compact, .topbar-page-title) {
    color: var(--bm-text-primary) !important;
    text-shadow: none;
}

html:root[data-theme="kinix"] .sidebar-wordmark__divider {
    background: var(--bm-border-strong);
}

html:root[data-theme="kinix"] .sidebar-link {
    color: var(--bm-text-secondary) !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    font-weight: 500;
}

html:root[data-theme="kinix"] .sidebar-link:hover {
    color: var(--bm-text-primary) !important;
    background: var(--bm-surface-hover) !important;
    border-radius: 4px !important;
}

html:root[data-theme="kinix"] .sidebar-link.active {
    color: var(--kinix-nav-active) !important;
    background: var(--kinix-nav-bg) !important;
    border-radius: 4px !important;
    border-left: 3px solid var(--bm-accent) !important;
}

html:root[data-theme="kinix"] .sidebar-link.active::before {
    content: none !important;
}

html:root[data-theme="kinix"] .sidebar-link .sbi {
    color: inherit !important;
    opacity: 0.85;
}

html:root[data-theme="kinix"] .sidebar-link :is(.sbi svg, .sbi svg *) {
    color: inherit !important;
    stroke: currentColor !important;
}

html:root[data-theme="kinix"] :is(.topbar-brand-logo, .login-card__logo) {
    filter: none;
    opacity: 1;
}

/* Standardne kartice imaju blagu sjenu, a tekst i oznake prate paletu aktivnog režima. */
html:root[data-theme="kinix"] :is(h1, h2, h3, h4, .surface-title, .bm-page-title, .bm-modal-title, .d2-modal-title) {
    color: var(--bm-text-primary) !important;
    font-weight: 600;
    letter-spacing: -0.02em;
}

html:root[data-theme="kinix"] :is(.text-muted, .form-text, .bm-muted, .breadcrumb-shell, .eyebrow, .d2-eyebrow) {
    color: var(--bm-text-muted) !important;
}

html:root[data-theme="kinix"] :is(.card, .panel, .status-panel, .upload-panel, .bm-dashboard-card,
    .bm-analytics-card, .bm-cfg-card, .bm-profile-panel, .bm-info-card, .bm-command-list-card,
    .bm-command-editor-card, .bm-command-info-card, .bm-command-sql-panel, .bm-hotelier-modal-card,
    .bm-certificate-detail-card, .wg-panel, .wg-stat-card, .wg-settings-card, .d2-panel,
    .chat-sidebar, .chat-thread, .chat-info, .chat-info__card, .auth-result-card, .login-card) {
    color: var(--bm-text-primary) !important;
    background: var(--bm-surface) !important;
    border-color: var(--bm-border-subtle) !important;
    border-radius: 5px;
    box-shadow: var(--bm-shadow-panel) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

html:root[data-theme="kinix"] :is(.bm-modal, .bm-column-modal, .d2-modal, .wg-modal,
    .bm-hoteli-info-modal, .topbar-user-dropdown, .topbar-theme-menu) {
    color: var(--bm-text-primary) !important;
    background: var(--bm-surface-modal) !important;
    border-color: var(--bm-border) !important;
    border-radius: 5px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

html:root[data-theme="kinix"] :is(.bm-modal-header, .bm-modal-footer, .d2-modal-header, .d2-modal-footer,
    .wg-modal__header, .wg-modal__footer, .bm-hoteli-info-body, .bm-info-card-title,
    .login-card__header, .login-card__footer, .chat-thread__header) {
    color: var(--bm-text-primary) !important;
    background: var(--bm-surface-modal) !important;
    border-color: var(--bm-border) !important;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] :is(.bm-info-label, .topbar-user-name, .topbar-user-chevron,
    .topbar-user-dropdown-item, .topbar-theme-heading, .bm-profile-label) {
    color: var(--bm-text-secondary) !important;
}

/* Topbar, meniji i obrasci koriste jasne granice i plavi fokus za aktivni izbor. */
html:root[data-theme="kinix"] :is(.sidebar-toggle, .topbar-chat-button, .topbar-user, .theme-segment,
    .topbar-theme-button, .icon-button, .installer-copy-button, .search-shell, .bm-searchbar, .chat-search) {
    color: var(--bm-text-secondary) !important;
    background: var(--bm-surface) !important;
    border-color: var(--bm-border-subtle) !important;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] :is(.topbar-user-avatar, .chat-avatar) {
    color: var(--bm-text-primary);
    background: var(--bm-row-selected) !important;
}

html:root[data-theme="kinix"] :is(.theme-segment__button, .search-input, .bm-search-input, .topbar-theme-item) {
    color: var(--bm-text-secondary) !important;
    background: transparent !important;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] .theme-segment .theme-segment__button.active,
html:root[data-theme="kinix"] .topbar-theme-item[aria-checked="true"],
html:root[data-theme="kinix"] :is(.theme-segment__button, .topbar-theme-item, .topbar-user-dropdown-item):hover {
    color: var(--bm-text-primary) !important;
    background: var(--bm-row-hover) !important;
}

html:root[data-theme="kinix"] :is(.form-control, .form-select, .bm-input, .login-input, .wg-input, .wg-search),
html:root[data-theme="kinix"] input.login-input {
    color: var(--bm-text-primary) !important;
    background-color: var(--bm-surface-raised) !important;
    border-color: var(--bm-border) !important;
    border-radius: 4px;
    box-shadow: none;
}

html:root[data-theme="kinix"] :is(input, textarea)::placeholder {
    color: var(--bm-text-placeholder) !important;
    opacity: 1;
}

html:root[data-theme="kinix"] :is(.form-control, .form-select, .bm-input, .login-input, .wg-input):focus {
    border-color: var(--kinix-focus) !important;
    box-shadow: 0 0 0 3px var(--bm-row-selected) !important;
}

html:root[data-theme="kinix"] :is(.form-control, .form-select, .bm-input, .wg-input):disabled {
    color: var(--bm-text-muted) !important;
    background: var(--bm-surface) !important;
}

html:root[data-theme="kinix"] :is(.btn-primary, .bm-btn-primary, .bm-btn-primary-modal, .wg-btn--primary, .d2-button--primary) {
    color: var(--kinix-primary-text) !important;
    background: var(--kinix-primary-bg) !important;
    border-color: var(--kinix-primary-bg) !important;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] :is(.btn-outline-secondary, .bm-btn-ghost, .bm-btn-icon-columns,
    .d2-button--ghost, .wg-btn:not(.wg-btn--primary):not(.wg-btn--danger):not(.wg-btn--danger-ghost)) {
    color: var(--bm-text-primary) !important;
    background: var(--bm-surface-raised) !important;
    border-color: var(--bm-border) !important;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] :is(.btn-danger, .btn-outline-danger, .bm-btn-danger-modal, .wg-btn--danger, .wg-btn--danger-ghost) {
    color: var(--kinix-error) !important;
    background: var(--kinix-error-bg) !important;
    border-color: var(--kinix-error) !important;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] :is(.btn, .bm-btn-ghost, .wg-btn, .d2-button):hover:not(:disabled) {
    filter: brightness(0.96);
}

html:root[data-theme="kinix"] :is(.bm-filter-tab, .bm-filter-chip, .bm-segment-button, .wg-tab, .chat-tab--active) {
    color: var(--bm-text-secondary) !important;
    background: var(--bm-surface) !important;
    border-color: var(--bm-border) !important;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] :is(.bm-filter-tab.active, .bm-filter-tab--active, .bm-filter-chip--active,
    .bm-segment-button.active, .wg-tab--active, .chat-conversation--active) {
    color: var(--bm-text-primary) !important;
    background: var(--bm-row-selected) !important;
    border-color: var(--bm-border-strong) !important;
}

/* Zajednička HoteliTable i ostale tabele dobijaju neutralno zaglavlje i jasnu selekciju reda. */
html:root[data-theme="kinix"] :is(.bm-table-modern-wrapper, .bm-table-scroll, .bm-table-x-scroll,
    .bm-analytics-table-wrap, .wg-table-wrap, .wg-companies-scroll, .wg-ports-scroll, .wg-history-scroll) {
    background: var(--bm-surface-raised) !important;
    border-color: var(--bm-border) !important;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] :is(.table, .bm-table, .bm-analytics-table, .wg-table) {
    --bs-table-color: var(--bm-text-primary);
    --bs-table-bg: var(--bm-surface-raised);
    --bs-table-border-color: var(--bm-border);
    --bs-table-hover-bg: var(--bm-row-hover);
    --bs-table-hover-color: var(--bm-text-primary);
    color: var(--bm-text-primary) !important;
    border-color: var(--bm-border) !important;
}

html:root[data-theme="kinix"] :is(.table, .bm-table, .bm-analytics-table, .wg-table) thead th,
html:root[data-theme="kinix"] body .content .bm-hoteli-table .bm-table-modern-wrapper .bm-table-header thead th,
html:root[data-theme="kinix"] body .content .bm-clients-page .bm-client-table-wrap .bm-table-header thead th {
    color: var(--bm-text-muted) !important;
    -webkit-text-fill-color: var(--bm-text-muted) !important;
    background: var(--bm-page-bg-soft) !important;
    border-color: var(--bm-border) !important;
    box-shadow: none !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none;
}

html:root[data-theme="kinix"] :is(.table, .bm-table, .bm-analytics-table, .wg-table) tbody td {
    color: var(--bm-text-primary) !important;
    background: var(--bm-surface-raised) !important;
    border-color: var(--bm-border-subtle) !important;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] :is(.table, .bm-table, .bm-analytics-table, .wg-table) tbody tr:hover td {
    background: var(--bm-row-hover) !important;
    border-color: var(--bm-border) !important;
}

html:root[data-theme="kinix"] :is(.table, .bm-table, .bm-analytics-table, .wg-table) tbody tr.bm-row-selected td,
html:root[data-theme="kinix"] :is(.table, .bm-table, .bm-analytics-table, .wg-table) tbody tr.selected td {
    background: var(--bm-row-selected) !important;
    border-color: var(--bm-border-strong) !important;
}

html:root[data-theme="kinix"] .bm-table tbody tr.bm-row-offline:not(.bm-row-selected):not(:hover) td {
    color: var(--bm-text-secondary) !important;
    background: var(--bm-surface) !important;
}

/* Dashboard ima otvoreno zaglavlje i neutralne KPI kartice; akcenti ističu ikone i izbor. */
html:root[data-theme="kinix"] .d2-hero {
    background: transparent !important;
    border-color: transparent !important;
    border-radius: 0;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] :is(.d2-hero, .d2-kpi-card)::after,
html:root[data-theme="kinix"] .d2-software-card::before {
    content: none !important;
}

html:root[data-theme="kinix"] .d2-kpi-card {
    color: var(--bm-text-primary) !important;
    background: var(--bm-surface) !important;
    border-color: var(--bm-border-subtle) !important;
    border-radius: 5px;
    box-shadow: var(--bm-shadow-panel) !important;
}

html:root[data-theme="kinix"] .d2-kpi-card:hover {
    border-color: var(--bm-accent) !important;
    box-shadow: var(--bm-shadow-panel) !important;
    transform: none !important;
}

html:root[data-theme="kinix"] :is(.d2-kpi-icon, .d2-quick-icon) {
    color: var(--kinix-link) !important;
    background: var(--kinix-blue) !important;
    border-radius: 4px;
}

html:root[data-theme="kinix"] .d2-tone-teal .d2-kpi-icon {
    color: var(--kinix-green-ink) !important;
    background: var(--kinix-green) !important;
}

html:root[data-theme="kinix"] .d2-tone-blue .d2-kpi-icon {
    color: var(--kinix-blue-ink) !important;
    background: var(--kinix-blue) !important;
}

html:root[data-theme="kinix"] .d2-tone-amber .d2-kpi-icon {
    color: var(--kinix-amber-ink) !important;
    background: var(--kinix-amber) !important;
}

html:root[data-theme="kinix"] :is(.d2-live-status, .d2-update-progress-title, .d2-update-progress-meta,
    .d2-panel-link, .d2-nefiscal-name, .d2-recent-heading, .d2-software-caption) {
    color: var(--bm-text-secondary) !important;
}

html:root[data-theme="kinix"] :is(.d2-live-status small, .d2-kpi-meta, .d2-kpi-label, .d2-kpi-state-label) {
    color: var(--bm-text-secondary) !important;
}

html:root[data-theme="kinix"] :is(.d2-update-progress, .d2-certificate-alert, .d2-wg-stats div, .d2-quick-card) {
    background: var(--bm-surface-raised) !important;
    border-color: var(--bm-border-subtle) !important;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] .d2-update-progress-segment:not(.is-filled) {
    background: var(--bm-border-strong) !important;
}

html:root[data-theme="kinix"] .d2-update-progress-segment.is-filled {
    background: #31b989 !important;
}

html:root[data-theme="kinix"] .d2-software-card {
    --d2-software-accent: var(--kinix-blue-ink);
    --d2-software-tint: var(--kinix-blue);
    --d2-software-border: var(--bm-border);
    color: var(--bm-text-primary) !important;
    background: var(--bm-surface-raised) !important;
    border-color: var(--bm-border) !important;
    border-radius: 5px;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] .d2-software-card.d2-tone-teal {
    --d2-software-accent: var(--kinix-green-ink);
    --d2-software-tint: var(--kinix-green);
}

html:root[data-theme="kinix"] .d2-software-card.d2-tone-violet {
    --d2-software-accent: var(--kinix-violet-ink);
    --d2-software-tint: var(--kinix-violet);
}

html:root[data-theme="kinix"] .d2-software-card.d2-tone-amber {
    --d2-software-accent: var(--kinix-amber-ink);
    --d2-software-tint: var(--kinix-amber);
}

html:root[data-theme="kinix"] .d2-software-card .d2-software-mark {
    color: var(--d2-software-accent) !important;
    background: var(--d2-software-tint) !important;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] .d2-software-card .d2-software-mark--logo {
    background: #ffffff !important;
    border-color: var(--bm-border) !important;
}

html:root[data-theme="kinix"] :is(.d2-recent-row, .d2-contabo-kpi-row, .d2-wireguard-kpi-row) {
    color: var(--bm-text-primary) !important;
    background: var(--bm-surface) !important;
    border-color: var(--bm-border) !important;
}

html:root[data-theme="kinix"] :is(.d2-software-link, .d2-recent-row, .d2-quick-card):hover {
    background: var(--bm-row-hover) !important;
}

html:root[data-theme="kinix"] :is(.d2-software-ok, .d2-terminal-status--online, .d2-kpi-state-label strong) {
    color: var(--kinix-success) !important;
}

html:root[data-theme="kinix"] .d2-software-ok {
    background: var(--kinix-success-bg) !important;
}

html:root[data-theme="kinix"] :is(.d2-software-alert, .d2-alert-badge, .d2-terminal-status--offline,
    .d2-certificate-status.is-expiring, .d2-certificate-detail-row .is-expiring) {
    color: var(--kinix-warning) !important;
}

html:root[data-theme="kinix"] :is(.d2-software-alert, .d2-alert-badge) {
    background: var(--kinix-warning-bg) !important;
}

html:root[data-theme="kinix"] :is(.d2-certificate-status.is-expired, .d2-certificate-detail-row .is-expired) {
    color: var(--kinix-error) !important;
}

html:root[data-theme="kinix"] .d2-nefiscal-bar span {
    background: var(--bm-accent) !important;
}

/* Ostali prikazi, dijalozi i paginacija koriste istu paletu umjesto dekorativnih gradijenata. */
html:root[data-theme="kinix"] :is(.file-drop, .upload-result, .bm-profile-session-item,
    .bm-profile-image-modal-preview, .bm-largest-db, .bm-chart-empty, .bm-analytics-empty,
    .bm-analytics-loading, .chat-composer, .chat-conversation, .chat-user-row) {
    color: var(--bm-text-secondary) !important;
    background: var(--bm-surface-raised) !important;
    border-color: var(--bm-border) !important;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] :is(.pagination, .bm-pagination) :is(.page-link, button) {
    color: var(--bm-text-secondary) !important;
    background: var(--bm-surface-raised) !important;
    border-color: var(--bm-border) !important;
    box-shadow: none !important;
}

html:root[data-theme="kinix"] :is(.pagination, .bm-pagination) :is(.active .page-link, button.active) {
    color: var(--bm-text-primary) !important;
    background: var(--bm-row-selected) !important;
}

html:root[data-theme="kinix"] :is(.bm-panel-link, .bm-info-link, .btn-link, .bm-search-result-title) {
    color: var(--kinix-link) !important;
}

html:root[data-theme="kinix"] :is(.topbar-theme-button, .topbar-theme-item, .sidebar-link, .d2-quick-card):focus-visible {
    outline: 2px solid var(--kinix-focus);
    outline-offset: 2px;
}


/* Kartice i tabele koriste diskretne razdjelnike, dok izabrane kontrole jasno ističu plavi akcent. */
html:root[data-theme="kinix"] :is(.d2-panel-heading, .d2-kpi-recent, .d2-contabo-kpi-recent) {
    border-color: var(--bm-border-subtle) !important;
}

html:root[data-theme="kinix"] :is(.d2-software-name, .d2-software-count) {
    color: var(--bm-text-primary) !important;
}

html:root[data-theme="kinix"] :is(.d2-software-arrow, .d2-panel-link, .d2-quick-arrow) {
    color: var(--kinix-link) !important;
}

html:root[data-theme="kinix"] .theme-segment .theme-segment__button.active,
html:root[data-theme="kinix"] .topbar-theme-item[aria-checked="true"] {
    color: var(--kinix-link) !important;
    background: var(--bm-row-selected) !important;
}

html:root[data-theme="kinix"] :is(.d2-update-progress, .d2-certificate-alert, .d2-quick-card,
    .d2-recent-row, .d2-contabo-kpi-row, .d2-wireguard-kpi-row, .bm-table-modern-wrapper,
    .topbar-theme-menu, .topbar-user-dropdown, .wg-panel, .wg-stat-card) {
    border-radius: 4px !important;
}

html:root[data-theme="kinix"] .d2-panel-heading {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bm-border-subtle);
}

/* Svijetla strelica u tamnom režimu zadržava čitljivost Bootstrap padajuće liste. */
html:root[data-theme="kinix"].dark-theme .form-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23c9ccd2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-image: var(--bs-form-select-bg-img) !important;
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

/* Bočni meni koristi Kinix plavi akcent samo za aktivni izbor, dok ostale stavke ostaju mirne. */
html:root[data-theme="kinix"] .sidebar-link {
    color: var(--bm-text-secondary) !important;
    background: transparent !important;
}

html:root[data-theme="kinix"] .sidebar-link:hover {
    color: var(--bm-text-primary) !important;
    background: var(--bm-surface-hover) !important;
}

html:root[data-theme="kinix"] .sidebar-link.active {
    color: var(--kinix-nav-active) !important;
    background: var(--kinix-nav-bg) !important;
}

html:root[data-theme="kinix"] .sidebar-link.active .sbi,
html:root[data-theme="kinix"] .sidebar-link.active .sbt,
html:root[data-theme="kinix"] .sidebar-link.active .sbi svg,
html:root[data-theme="kinix"] .sidebar-link.active .sbi svg * {
    color: inherit !important;
    stroke: currentColor !important;
}
