html, body {
    height: 100%;
    overflow: hidden !important;
    font-family: Inter, 'Segoe UI', Helvetica, Arial, sans-serif;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(247, 249, 253, 0.94) 42%, rgba(240, 244, 250, 0.98) 100%),
        radial-gradient(70% 55% at 82% 0%, rgba(68, 87, 231, 0.10), rgba(68, 87, 231, 0) 62%),
        #f5f7fb;
    color: #1f2a44;
}

/* ── Theme-aware logo ────────────────────────────────────────────────── */
/* Light tema (podrazumevano): prikaži light logo, sakrij dark */
.bm-logo--dark  { display: none; }
.bm-logo--light { display: inline; }

/* Dark tema: prikaži dark logo, sakrij light */
html.dark-theme .bm-logo--dark  { display: inline; }
html.dark-theme .bm-logo--light { display: none; }
/* ───────────────────────────────────────────────────────────────────── */

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
    margin: 0;
}

a, .btn-link {
    color: #635bff;
}

.content {
    padding-top: 0;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]):not(.login-input) {
    outline: 1px solid #26b050;
}

.invalid:not(.login-input) {
    outline: 1px solid #e50000;
}

.login-input.valid,
.login-input.modified,
.login-input.invalid {
    outline: none !important;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.dashboard-preview {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.metric-card,
.panel {
    background: var(--bm-surface);
    border: 1px solid var(--bm-border-subtle);
    border-radius: 16px;
    box-shadow: var(--bm-shadow-soft);
}

.metric-card {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.metric-label,
.panel-heading span,
.list-item span,
th {
    color: #8c93b3;
}

.metric-card strong {
    font-size: 1.7rem;
    line-height: 1.1;
    color: var(--bm-text-primary);
}

.metric-trend {
    font-size: 0.88rem;
    font-weight: 600;
}

.metric-trend.positive {
    color: #0f9d6c;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
    gap: 1rem;
}

.panel {
    padding: 1.25rem;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-heading h2 {
    margin: 0;
    font-size: 1.08rem;
    color: var(--bm-text-primary);
}

.panel-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #08745f;
    background: #e8faf5;
}

.chart-placeholder {
    height: 280px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 0.65rem;
    padding: 1rem 0.5rem 0.25rem;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
    border: 1px solid var(--bm-border-subtle);
    border-radius: 14px;
}

.chart-placeholder span {
    display: block;
    border-radius: 999px 999px 10px 10px;
    background: linear-gradient(180deg, rgba(68, 87, 231, 0.36) 0%, rgba(15, 159, 154, 0.34) 100%);
}

.chart-placeholder span:nth-child(1) { height: 35%; }
.chart-placeholder span:nth-child(2) { height: 48%; }
.chart-placeholder span:nth-child(3) { height: 42%; }
.chart-placeholder span:nth-child(4) { height: 58%; }
.chart-placeholder span:nth-child(5) { height: 64%; }
.chart-placeholder span:nth-child(6) { height: 60%; }
.chart-placeholder span:nth-child(7) { height: 72%; }
.chart-placeholder span:nth-child(8) { height: 66%; }
.chart-placeholder span:nth-child(9) { height: 80%; }
.chart-placeholder span:nth-child(10) { height: 74%; }
.chart-placeholder span:nth-child(11) { height: 88%; }
.chart-placeholder span:nth-child(12) { height: 82%; }

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid #edf0fb;
}

.list-item:last-child {
    border-bottom: 0;
}

.list-item strong {
    display: block;
}

.orders-panel a {
    text-decoration: none;
    font-weight: 600;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.95rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--bm-border, #edf0fb);
}

tbody tr:last-child td {
    border-bottom: 0;
}

.order-status {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.order-status.done {
    color: #0f9d6c;
    background: #ebfff6;
}

.order-status.pending {
    color: #b77a10;
    background: #fff8e8;
}

.dark-theme .metric-card,
.dark-theme .panel {
    background: #16213c;
    border-color: #263557;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.dark-theme .metric-label,
.dark-theme .panel-heading span,
.dark-theme .list-item span,
.dark-theme th {
    color: #98a5ca;
}

.dark-theme .metric-card strong,
.dark-theme .panel-heading h2,
.dark-theme .list-item strong,
.dark-theme td {
    color: #eef3ff;
}

.dark-theme .chart-placeholder {
    background: linear-gradient(180deg, #111a31 0%, #16213c 100%);
}

.dark-theme .chart-placeholder span {
    background: linear-gradient(180deg, #6f7ed9 0%, #4b5fb8 100%);
}

.dark-theme .list-item,
.dark-theme th,
.dark-theme td {
    border-bottom-color: #263557;
}

.dark-theme .orders-panel a {
    color: #aebdff;
}

.dark-theme .order-status.done {
    color: #7ff1c0;
    background: rgba(30, 112, 82, 0.24);
}

.dark-theme .order-status.pending {
    color: #ffd580;
    background: rgba(148, 101, 18, 0.22);
}

@media (max-width: 1100px) {
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    html,
    body {
        min-height: 100%;
        overflow: auto;
    }

    .bm-modal-overlay {
        align-items: flex-start;
        overflow-y: auto;
        padding: 0.5rem;
    }

    .bm-modal {
        width: min(100%, calc(100vw - 1rem));
        max-height: calc(100dvh - 1rem);
    }

    .bm-modal-body,
    .bm-info-modal-body {
        padding: 1rem;
    }

    .brand-panel {
        justify-content: flex-start;
        padding: 0.1rem 3.25rem 0.55rem 0.1rem;
    }

    .brand-logo {
        height: 42px;
        max-width: min(180px, calc(100vw - 5rem));
    }

    .navbar-toggler {
        top: 0.55rem;
        right: 0.85rem;
        width: 2.35rem;
        height: 2.35rem;
    }

    .nav-scrollable {
        max-height: min(62vh, 520px);
        overflow-y: auto;
        padding-right: 0.25rem;
    }

    .sidebar-item-logout {
        margin-top: 0.4rem;
    }

    html.sidebar-collapsed .nav-sections {
        align-items: stretch;
    }

    html.sidebar-collapsed .sidebar-item {
        justify-content: stretch;
    }

    html.sidebar-collapsed .sidebar-link {
        width: 100% !important;
        justify-content: flex-start !important;
        gap: 0.85rem;
        padding: 0 1.1rem 0 1.7rem !important;
    }

    html.sidebar-collapsed .sbt {
        display: inline-block !important;
        width: auto;
        overflow: visible;
    }

    html.sidebar-collapsed .sbtt {
        display: none;
    }

    .bm-dashboard-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    }
}

@media (max-width: 640px) {
    .bm-dashboard-grid {
        gap: 1rem;
    }

    .bm-dashboard-card {
        padding: 1.2rem 1rem;
    }

    .bm-dashboard-card__top {
        gap: 0.85rem;
    }

    .bm-dashboard-card__value {
        font-size: 2.2rem;
    }
}
/* ================================================================
   SIDEBAR NAV  (global – NavLink renders <a> outside CSS isolation)
   ================================================================ */
.sidebar-item {
    position: relative;
    width: 100%;
}

.sidebar-link {
    display: flex !important;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    height: 42px;
    min-height: 42px;
    padding: 0 1.1rem 0 1.7rem;
    border-radius: 8px;
    text-decoration: none !important;
    color: var(--bm-text-secondary, #66738d);
    font-size: 0.93rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    cursor: pointer;
    position: relative;
    overflow: visible;
    background-color: transparent;
    border: none;
    box-shadow: none;
    transition: background-color 0.18s ease, color 0.18s ease,
                box-shadow 0.18s ease, transform 0.15s ease;
}

/* icon wrapper */
.sbi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.3rem;
    height: 1.3rem;
    opacity: 0.55;
    transition: opacity 0.18s ease;
}

.sbi::before,
.sbi::after {
    content: none !important;
    display: none !important;
}

.sbi svg {
    width: 1.3rem;
    height: 1.3rem;
    display: block;
    flex-shrink: 0;
}

.sbi--Hoteli,
.sbi--Backoffice6,
.sbi--Garson6,
.sbi--Enu {
    width: 1.62rem;
    height: 1.62rem;
}

.sbi--Hoteli svg,
.sbi--Backoffice6 svg,
.sbi--Garson6 svg,
.sbi--Enu svg {
    width: 1.62rem;
    height: 1.62rem;
}

.sbt {
    display: inline-block;
    white-space: nowrap;
}

.sidebar-link:hover {
    color: var(--bm-accent, #4457e7);
    background: #eef3ff;
    box-shadow: 0 8px 20px rgba(31, 42, 68, 0.08);
    transform: translateX(3px);
}

.sidebar-link:hover .sbi {
    opacity: 1;
}

.sidebar-link.active {
    color: #2637b6 !important;
    background: linear-gradient(135deg, #eef3ff 0%, #dfe6ff 100%) !important;
    box-shadow: 0 10px 24px rgba(68, 87, 231, 0.16) !important;
    border-radius: 8px !important;
    transform: translateX(5px);
    height: 42px;
    min-height: 42px;
    text-decoration: none !important;
    font-size: 0.95rem;
}

.sidebar-link.active .sbi {
    opacity: 1;
}

/* dark theme */
html.dark-theme .sidebar-link {
    color: #9daace;
}

html.dark-theme .sidebar-link:hover {
    color: #e8edff;
    background: #1a2746;
    box-shadow: 0 4px 12px rgba(10, 18, 37, 0.28);
}

html.dark-theme .sidebar-link.active {
    background: linear-gradient(135deg, #4a5ce8 0%, #3d4ed4 100%) !important;
    box-shadow: 0 8px 22px rgba(38, 49, 180, 0.38) !important;
}

/* ── sidebar collapsed state ─────────────────────────────────────── */
html.sidebar-collapsed .sidebar-link {
    padding: 0 !important;
    width: 42px !important;
    justify-content: center !important;
    border-radius: 8px;
    gap: 0;
    transform: none !important;
    margin-left: auto;
    margin-right: auto;
}

html.sidebar-collapsed .sidebar-link:hover {
    transform: none !important;
}

/* ── Collapsed sidebar tooltip ───────────────────────────────────── */
.sbtt {
    display: none;
    pointer-events: none;
}

html.sidebar-collapsed .sidebar-link {
    position: relative;
}

html.sidebar-collapsed .sidebar-link::after {
    content: none;
}

html.sidebar-collapsed .sbtt {
    display: block;
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #24304a;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 12px 28px rgba(31, 42, 68, 0.22);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 9999;
}

html.sidebar-collapsed .sidebar-link:hover .sbtt {
    opacity: 1;
}

[data-bm-tooltip] {
    position: relative;
}

[data-bm-tooltip]::before,
[data-bm-tooltip]::after {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
    z-index: 10050;
}

[data-bm-tooltip]::before {
    content: attr(data-bm-tooltip);
    top: calc(100% + 0.55rem);
    right: 0;
    max-width: min(280px, calc(100vw - 2rem));
    padding: 0.42rem 0.62rem;
    border: 1px solid var(--bm-tooltip-border, rgba(219, 227, 239, 0.92));
    border-radius: 6px;
    background: var(--bm-tooltip-bg, #ffffff);
    color: var(--bm-tooltip-color, #24304a);
    box-shadow: var(--bm-tooltip-shadow, 0 14px 34px rgba(31, 42, 68, 0.16));
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.22;
    text-align: center;
    white-space: nowrap;
    transform: translateY(-4px);
}

[data-bm-tooltip]::after {
    content: "";
    top: calc(100% + 0.28rem);
    right: 1rem;
    width: 0.55rem;
    height: 0.55rem;
    border-left: 1px solid var(--bm-tooltip-border, rgba(219, 227, 239, 0.92));
    border-top: 1px solid var(--bm-tooltip-border, rgba(219, 227, 239, 0.92));
    background: var(--bm-tooltip-bg, #ffffff);
    transform: translateY(-4px) rotate(45deg);
}

[data-bm-tooltip]:hover::before,
[data-bm-tooltip]:hover::after,
[data-bm-tooltip]:focus-visible::before,
[data-bm-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
}

[data-bm-tooltip]:hover::before,
[data-bm-tooltip]:focus-visible::before {
    transform: translateY(0);
}

[data-bm-tooltip]:hover::after,
[data-bm-tooltip]:focus-visible::after {
    transform: translateY(0) rotate(45deg);
}

html.dark-theme [data-bm-tooltip] {
    --bm-tooltip-bg: #181923;
    --bm-tooltip-color: #f2f2f4;
    --bm-tooltip-border: rgba(255,255,255,0.13);
    --bm-tooltip-shadow: 0 16px 34px rgba(0,0,0,0.36);
}

html.sidebar-collapsed .nav-scrollable,
html.sidebar-collapsed .nav-sections {
    overflow: visible;
}

html.sidebar-collapsed .sbt {
    display: none !important;
    width: 0;
    overflow: hidden;
}

html.sidebar-collapsed .sbi {
    opacity: 0.7;
    margin: 0;
}

html.sidebar-collapsed .sidebar-link:hover .sbi,
html.sidebar-collapsed .sidebar-link.active .sbi {
    opacity: 1;
}

html.sidebar-collapsed .sidebar-item {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* hide brand text, keep logo mark */
html.sidebar-collapsed .navbar-brand {
    display: none !important;
}

html.sidebar-collapsed .brand-panel {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

html.sidebar-collapsed .brand-mark {
    margin: 0 auto;
}

/* collapsed: zmanjši logo na ikonu veličine */
html.sidebar-collapsed .brand-logo {
    height: 28px !important;
    max-width: 36px !important;
    object-fit: contain;
}

html.sidebar-collapsed .nav-sections {
    align-items: center;
}

html.dark-theme .sidebar-link.active::before {
    background: rgba(220, 228, 255, 0.95);
}

/* ── Collapsed sidebar tooltip ───────────────────────────────────── */
html.sidebar-collapsed .sidebar-link {
    position: relative;
}

/* ================================================================
   DARK THEME — SIDEBAR & TOPBAR
   ================================================================ */
html.dark-theme .sidebar {
    background: #0f172a;
    border-right-color: #1e2d4a;
}

html.dark-theme .topbar {
    background: #0f172a;
    border-bottom-color: #1e2d4a;
}

html.dark-theme .search-shell {
    background: #1a2746;
    border-color: #2a3b5e;
}

html.dark-theme .search-input {
    color: #c5cfea;
}

html.dark-theme .search-input::placeholder {
    color: #5a6a8a;
}

html.dark-theme .icon-button {
    background: #1a2746;
    border-color: #2a3b5e;
    color: #9daace;
}

html.dark-theme .icon-button:hover {
    background: #243258;
    border-color: #3d4ed4;
}

html.dark-theme .theme-toggle-label {
    color: #9daace;
}

html.dark-theme .surface-title {
    color: #e6ebff;
}

html.dark-theme .breadcrumb-shell {
    color: #5a6a8a;
}

/* ================================================================
   DARK THEME — TOPBAR USER
   ================================================================ */
html.dark-theme .topbar-user {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.10);
}

html.dark-theme .topbar-user-name {
    color: #f2f2f4;
}

/* ================================================================
   DARK THEME — BM TABLE (Kompanije, Korisnici, ...)
   NOTE: Per-component overrides are in each .razor.css file
   ================================================================ */

/* ================================================================
   CSS VARIABLES — BM COMPONENTS
   ================================================================ */
:root {
    --bm-page-bg:             #f5f7fb;
    --bm-page-bg-soft:        #eef2f8;
    --bm-shell-bg:            #f4f7fb;
    --bm-sidebar-bg:          #f7f9fc;
    --bm-topbar-bg:           rgba(255, 255, 255, 0.82);
    --bm-surface:             #ffffff;
    --bm-surface-raised:      #f7f9fd;
    --bm-surface-modal:       #ffffff;
    --bm-border:              #dbe3ef;
    --bm-border-subtle:       #e8edf5;
    --bm-text-primary:        #24304a;
    --bm-text-secondary:      #66738d;
    --bm-text-muted:          #8a95aa;
    --bm-text-placeholder:    #aab4c4;
    --bm-row-hover:           #f2f5ff;
    --bm-row-selected:        #e8edff;
    --bm-scrollbar-thumb:     #b9c5d8;
    --bm-search-bg:           #ffffff;
    --bm-search-border:       #d9e1ee;
    --bm-skeleton-from:       #e8edf5;
    --bm-skeleton-to:         #f7f9fd;
    --bm-sortable-hover:      #4457e7;
    --bm-accent:              #4457e7;
    --bm-accent-2:            #0f9f9a;
    --bm-table-hover:         rgba(68, 87, 231, 0.07);
    --bm-shadow-soft:         0 10px 26px rgba(31, 42, 68, 0.07);
    --bm-shadow-panel:        0 18px 42px rgba(31, 42, 68, 0.10);
}

html.dark-theme {
    --bm-page-bg:             #232323;
    --bm-page-bg-soft:        #272729;
    --bm-shell-bg:            #232323;
    --bm-sidebar-bg:          #0f172a;
    --bm-topbar-bg:           #0f172a;
    --bm-surface:             #303033;
    --bm-surface-raised:      #363638;
    --bm-surface-modal:       #303033;
    --bm-border:              rgba(255,255,255,0.09);
    --bm-border-subtle:       rgba(255,255,255,0.06);
    --bm-text-primary:        #f2f2f4;
    --bm-text-secondary:      #c5c6cc;
    --bm-text-muted:          #8f929c;
    --bm-text-placeholder:    #777a84;
    --bm-row-hover:           rgba(168,117,255,0.13);
    --bm-row-selected:        rgba(34,211,238,0.13);
    --bm-scrollbar-thumb:     rgba(255,255,255,0.20);
    --bm-search-bg:           #363638;
    --bm-search-border:       rgba(255,255,255,0.10);
    --bm-skeleton-from:       #3a3a3d;
    --bm-skeleton-to:         #454548;
    --bm-sortable-hover:      #22d3ee;
    --bm-accent:              #a875ff;
    --bm-accent-2:            #22d3ee;
    --bm-table-hover:         rgba(34,211,238,0.08);
    --bm-shadow-soft:         0 10px 24px rgba(0,0,0,0.20);
    --bm-shadow-panel:        0 18px 40px rgba(0,0,0,0.25);
}

/* ================================================================
   DARK THEME — BM MODAL
   NOTE: Per-component overrides are in each .razor.css file
   ================================================================ */

/* ================================================================
   DARK THEME — FORM CONTROLS (global)
   ================================================================ */
html.dark-theme .form-control,
html.dark-theme .form-select {
    background: #1a2746;
    border-color: #2a3b5e;
    color: #c5cfea;
}

html.dark-theme .form-control:focus,
html.dark-theme .form-select:focus {
    background: #1e2d4a;
    border-color: #5468ff;
    color: #e6ebff;
    box-shadow: 0 0 0 3px rgba(84, 104, 255, 0.16);
}

html.dark-theme .form-control:disabled,
html.dark-theme .form-select:disabled {
    background: #111f38;
    color: #5a6a8a;
}

/* ================================================================
   DARK THEME — NAVBAR (NavMenu CSS isolation overrides)
   ================================================================ */
html.dark-theme .brand-mark {
    background: linear-gradient(135deg, #4a5ce8 0%, #3d4ed4 100%);
}

/* ================================================================
   LOGIN / REGISTER  –  consolidated global styles
   ================================================================ */

.login-card {
    width: 100%;
    padding: 2.15rem;
    border: 1px solid var(--bm-border, #dde3f4);
    border-radius: 8px;
    background: var(--bm-surface, #fff);
    color: var(--bm-text-primary, #2f3d63);
    box-shadow: 0 18px 42px rgba(102, 112, 154, 0.14);
}

.login-card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 1.65rem;
    text-align: center;
}

.login-card__logo {
    width: min(180px, 70%);
    height: 52px;
    object-fit: contain;
    margin-bottom: 0.55rem;
}

.login-card__header h4 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 750;
    color: var(--bm-text-primary, #2f3d63);
}

.login-card__header p {
    margin: 0;
    color: var(--bm-text-secondary, #6b7494);
    font-size: 0.92rem;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding: 0.78rem 0.9rem;
    border: 1px solid rgba(220, 38, 38, 0.22);
    border-radius: 8px;
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    font-size: 0.88rem;
    line-height: 1.35;
}

.login-alert__icon {
    flex: 0 0 1rem;
    width: 1rem;
    height: 1rem;
    margin-top: 0.1rem;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 15h-2v-2h2v2Zm0-4h-2V7h2v6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.login-field {
    margin-bottom: 1rem;
}

.login-label {
    display: block;
    margin-bottom: 0.38rem;
    color: var(--bm-text-secondary, #6b7494);
    font-size: 0.82rem;
    font-weight: 700;
}

.login-input-icon {
    position: absolute;
    left: 0.85rem;
    z-index: 1;
    width: 1rem;
    height: 1rem;
    background: var(--bm-accent, #5468ff);
    opacity: 0.68;
    pointer-events: none;
}

.login-input-icon--email {
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Zm0 3.2V17h16V8.2l-7.4 5.2a1 1 0 0 1-1.2 0L4 8.2Zm1.2-1.2 6.8 4.8L18.8 7H5.2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.login-input-icon--lock {
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2 0h6V7a3 3 0 0 0-6 0v3Zm-3 2v7h12v-7H6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 2.75rem;
    margin-top: 0.2rem;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--bm-accent, #5468ff), var(--bm-accent-2, #7c3aed));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(84, 104, 255, 0.26);
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(84, 104, 255, 0.32);
}

.login-btn:disabled {
    opacity: 0.72;
    cursor: default;
}

.login-btn__spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.36);
    border-top-color: #fff;
    border-radius: 999px;
    animation: login-spin 0.7s linear infinite;
}

@keyframes login-spin {
    to {
        transform: rotate(360deg);
    }
}

.login-card__footer {
    margin-top: 1.25rem;
    color: var(--bm-text-secondary, #6b7494);
    font-size: 0.87rem;
    text-align: center;
}

.login-link {
    color: var(--bm-accent, #5468ff);
    font-weight: 800;
    text-decoration: none;
}

.login-link:hover {
    text-decoration: underline;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.login-input,
input.login-input {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    height: 2.85rem !important;
    padding: 0 0.9rem 0 2.9rem !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background: var(--bm-surface-raised, #f4f6ff) !important;
    color: var(--bm-text-primary, #2f3d63) !important;
    border: 1px solid var(--bm-border, #dde3f4) !important;
    box-shadow: none !important;
    -webkit-text-fill-color: var(--bm-text-primary, #2f3d63) !important;
}

.login-input--password,
input.login-input--password {
    padding-right: 3.2rem !important;
}

.login-input::placeholder,
input.login-input::placeholder {
    color: var(--bm-text-placeholder, #b0b7ca) !important;
    opacity: 1 !important;
}

.login-input:focus,
input.login-input:focus {
    background: var(--bm-surface, #fff) !important;
    color: var(--bm-text-primary, #2f3d63) !important;
    -webkit-text-fill-color: var(--bm-text-primary, #2f3d63) !important;
    border-color: var(--bm-accent, #5468ff) !important;
    box-shadow: 0 0 0 3px rgba(84, 104, 255, 0.13) !important;
}

.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--bm-surface-raised, #f4f6ff) inset !important;
    -webkit-text-fill-color: var(--bm-text-primary, #2f3d63) !important;
}

html.dark-theme .login-input,
html.dark-theme input.login-input {
    background: var(--bm-surface-raised, #363638) !important;
    color: var(--bm-text-primary, #f2f2f4) !important;
    border: 1px solid var(--bm-border, rgba(255,255,255,0.09)) !important;
    -webkit-text-fill-color: var(--bm-text-primary, #f2f2f4) !important;
    box-shadow: none !important;
}

html.dark-theme .login-input::placeholder,
html.dark-theme input.login-input::placeholder {
    color: var(--bm-text-placeholder, #777a84) !important;
    opacity: 1 !important;
}

html.dark-theme .login-input:focus,
html.dark-theme input.login-input:focus {
    background: var(--bm-surface, #303033) !important;
    color: var(--bm-text-primary, #f2f2f4) !important;
    -webkit-text-fill-color: var(--bm-text-primary, #f2f2f4) !important;
    border-color: var(--bm-accent, #a875ff) !important;
    box-shadow: 0 0 0 3px rgba(168, 117, 255, 0.16) !important;
}

html.dark-theme .login-input:-webkit-autofill,
html.dark-theme .login-input:-webkit-autofill:hover,
html.dark-theme .login-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--bm-surface-raised, #363638) inset !important;
    -webkit-text-fill-color: var(--bm-text-primary, #f2f2f4) !important;
}

/* ── Eye toggle button ────────────────────────────────────────── */
.login-eye {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none !important;
    border-radius: 6px;
    cursor: pointer;
    background: transparent !important;
    color: #8c93b3;
    transition: color 0.15s ease, background 0.15s ease;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.login-eye:hover {
    color: #5468ff;
    background: rgba(84, 104, 255, 0.1) !important;
}

.login-eye svg {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
    pointer-events: none;
}

html.dark-theme .login-eye {
    background: transparent !important;
    color: var(--bm-text-muted, #8c93b3);
}

html.dark-theme .login-eye:hover {
    color: var(--bm-accent, #a875ff);
    background: rgba(168, 117, 255, 0.13) !important;
}

/* ── Card dark override ───────────────────────────────────────── */
html.dark-theme .login-card {
    background: var(--bm-surface, #303033) !important;
    border-color: var(--bm-border, rgba(255,255,255,0.09)) !important;
    color: var(--bm-text-primary, #f2f2f4) !important;
}

html.dark-theme .login-card__header h4 {
    color: var(--bm-text-primary, #f2f2f4) !important;
}

html.dark-theme .login-label {
    color: var(--bm-text-secondary, #c5c6cc) !important;
}

/* ===== SNACKBAR ===== */
.bm-snackbar-host {
    position: fixed;
    top: 5rem;
    right: 1.5rem;
    z-index: 40000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.bm-snackbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 260px;
    max-width: 420px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    pointer-events: all;
    animation: bm-snackbar-enter 0.25s ease;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.bm-snackbar-exit {
    opacity: 0;
    transform: translateX(30px);
}

@keyframes bm-snackbar-enter {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.bm-snackbar-info    { background: #0d6efd; }
.bm-snackbar-success { background: #198754; }
.bm-snackbar-warning { background: #e68a00; }
.bm-snackbar-error   { background: #dc3545; }

.bm-snackbar-text { flex: 1; }

.bm-snackbar-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.8;
    padding: 0 0.1rem;
}

.bm-snackbar-close:hover { opacity: 1; }

/* Chat composer koristi Blazor InputFile komponentu, pa nativni input dobija globalni stil.
   Pravilo sakriva browser tekst "Nije odabran fajl", ali ostavlja klikabilnu zonu preko ikonice za prilog. */
.chat-file-input {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    opacity: 0 !important;
    overflow: hidden !important;
    color: transparent !important;
    background: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    cursor: pointer !important;
}

.chat-file-input::file-selector-button,
.chat-file-input::-webkit-file-upload-button {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    color: transparent !important;
    background: transparent !important;
    font-size: 0 !important;
    cursor: pointer !important;
}

/* ── Lokalni inline toast (per-page, per-user) ───────────────────────── */
.bm-copy-toast {
    position: fixed;
    top: 5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    z-index: 40000;
    animation: bm-copy-toast-in 0.2s ease;
    pointer-events: none;
    background: #10b981;
    color: #fff;
}

.bm-copy-toast--success { background: #10b981; color: #fff; }
.bm-copy-toast--warning { background: #f59e0b; color: #fff; }
.bm-copy-toast--error   { background: #ef4444; color: #fff; }

@keyframes bm-copy-toast-in {
    from { opacity: 0; transform: translateY(-0.5rem); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════
   Profile page – modal & form (global scope, CSS isolation bypass)
   ═══════════════════════════════════════════════════════════════════════ */

/* Overlay */
.bm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    backdrop-filter: blur(3px);
    pointer-events: none;
}

.bm-modal-overlay--top {
    z-index: 1100;
}

/* Svi modalni slojevi moraju biti iznad sticky topbara, jer topbar koristi visok z-index zbog globalnih akcija i notifikacija. */
.bm-modal-overlay,
.bm-modal-backdrop {
    z-index: 26000 !important;
}

.bm-modal,
.bm-column-modal {
    z-index: 26010 !important;
}

.bm-modal-overlay .bm-modal {
    pointer-events: all;
}

/* Modal box */
.bm-modal {
    background: var(--bm-surface);
    border: 1px solid var(--bm-border);
    border-radius: 14px;
    box-shadow: 0 28px 80px rgba(31, 42, 68, 0.18), 0 6px 18px rgba(31, 42, 68, 0.08);
    width: calc(100% - 2rem);
    max-width: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: bm-modal-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bm-modal-in {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.bm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafd 100%);
    border-bottom: 1px solid var(--bm-border-subtle);
}

.bm-modal-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bm-text-primary);
    letter-spacing: -0.01em;
}

.bm-modal-title svg {
    width: 19px;
    height: 19px;
    color: #5468ff;
    flex-shrink: 0;
}

.bm-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--bm-text-muted);
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.bm-modal-close:hover {
    background: var(--bm-surface-raised);
    color: var(--bm-text-primary);
}

.bm-modal-close svg { width: 16px; height: 16px; }

/* Body */
.bm-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.5rem 2rem;
}

/* Footer */
.bm-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: #f7f9fd;
    border-top: 1px solid var(--bm-border-subtle);
}

html.dark-theme .bm-modal-header {
    background: transparent;
    border-bottom-color: var(--bm-border);
}

html.dark-theme .bm-modal-footer {
    background: rgba(255,255,255,0.02);
}

.topbar-notifications-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 30000 !important;
    align-items: flex-start;
    padding: 4.75rem 1rem 1rem;
    overflow: hidden;
    pointer-events: auto;
}

.topbar-notifications-modal-overlay .topbar-notifications-modal {
    width: min(820px, calc(100vw - 2rem)) !important;
    max-width: min(820px, calc(100vw - 2rem)) !important;
    max-height: calc(100dvh - 5.75rem);
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

/* Info modal */
.bm-info-modal {
    max-width: 820px;
    width: 96vw;
}

.bm-info-modal--wide {
    max-width: 1050px;
    width: 96vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

.bm-info-modal--cert {
    max-width: 1360px;
    width: 98vw;
}

.bm-badge-new {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    background: #5468ff;
    color: #fff;
    vertical-align: middle;
    margin-left: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bm-info-card--error {
    border: 1px solid #e74c3c;
    background: rgba(231,76,60,.07);
}

.bm-info-modal-body {
    padding: 1.5rem 2rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.bm-info-cards-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1rem;
}

.bm-info-cards-grid--cert {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .bm-info-cards-grid--cert {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .bm-info-cards-grid,
    .bm-info-cards-grid--cert {
        grid-template-columns: 1fr;
    }
}


.bm-info-card {
    background: var(--bm-surface-raised);
    border: 1px solid var(--bm-border);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bm-info-card-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bm-accent, #5468ff);
    margin-bottom: 0.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--bm-border);
}

.bm-agent-command-groups {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem 1.05rem;
}

.bm-agent-command-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bm-agent-command-group-title {
    color: var(--bm-text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.bm-agent-command-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.bm-agent-command-grid .btn.bm-agent-command-button {
    width: 2.15rem;
    height: 2.15rem;
    min-height: 2.15rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.bm-command-icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    pointer-events: none;
}

.bm-agent-command-note {
    color: var(--bm-text-muted);
    font-size: 0.78rem;
    margin-top: 0.25rem;
}

.bm-agent-command-note--running {
    color: #2563eb;
}

.bm-agent-command-note--success {
    color: #15803d;
}

.bm-agent-command-note--error {
    color: #b91c1c;
}

.bm-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    min-height: 1.6rem;
}

.bm-info-label {
    color: var(--bm-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.bm-info-value {
    color: var(--bm-text-primary);
    text-align: right;
    word-break: break-all;
}

/* Form fields */
.bm-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 520px) {
    .bm-field-row { grid-template-columns: 1fr; }
}

.bm-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bm-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--bm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.bm-input {
    width: 100%;
    height: 2.6rem;
    padding: 0 0.9rem;
    border-radius: 8px;
    border: 1.5px solid var(--bm-border);
    background: var(--bm-surface);
    color: var(--bm-text-primary);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-sizing: border-box;
}

.bm-input:hover:not(:focus) {
    border-color: #a0aec0;
}

.bm-input:focus {
    border-color: #5468ff;
    background: var(--bm-surface);
    box-shadow: 0 0 0 3px rgba(84,104,255,0.12);
}

.bm-input::placeholder {
    font-style: italic;
    font-size: 0.82rem;
    color: var(--bm-text-muted);
    opacity: 0.75;
}

html.dark-theme .bm-input {
    background: rgba(255,255,255,0.04);
}

html.dark-theme .bm-input:focus {
    background: rgba(255,255,255,0.06);
}

/* Password eye toggle */
.bm-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.bm-input-pw { padding-right: 2.6rem; }

.bm-eye {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.8rem;
    height: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--bm-text-muted);
    padding: 0;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.bm-eye:hover { color: #5468ff; }
.bm-eye svg   { width: 1rem; height: 1rem; pointer-events: none; }

/* Validation */
.bm-validation {
    font-size: 0.78rem;
    color: #ef4444;
}

/* Feedback messages */
.bm-form-msg {
    font-size: 0.83rem;
    font-weight: 500;
    padding: 0.55rem 0.8rem;
    border-radius: 6px;
}

.bm-form-msg--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.bm-form-msg--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

html.dark-theme .bm-form-msg--success {
    background: rgba(16,185,129,0.12);
    color: #6ee7b7;
    border-color: rgba(16,185,129,0.3);
}

html.dark-theme .bm-form-msg--error {
    background: rgba(239,68,68,0.12);
    color: #fca5a5;
    border-color: rgba(239,68,68,0.3);
}

/* Modal buttons */
.bm-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.35rem;
    padding: 0 1.2rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--bm-text-secondary);
    border: 1px solid var(--bm-border);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bm-btn-ghost:hover {
    background: var(--bm-surface-raised);
    color: var(--bm-text-primary);
    border-color: #a0aec0;
}

.bm-btn-primary-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.35rem;
    padding: 0 1.2rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    background: #5468ff;
    color: #fff;
    border: none;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.bm-btn-primary-modal:hover:not(:disabled) {
    background: #4356f0;
    box-shadow: 0 2px 8px rgba(84,104,255,0.35);
}

html.dark-theme .bm-refresh-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 4v5h5M20 20v-5h-5'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M20.49 9A9 9 0 0 0 5.64 5.64L4 9m16 6-1.64 3.36A9 9 0 0 1 3.51 15'/%3E%3C/svg%3E") !important;
}

html.dark-theme .bm-client-badge--host {
    color: #34400f !important;
    background: #dbe69a !important;
    border-color: #b8c969 !important;
}

html.dark-theme .bm-status-pill {
    color: #ffffff !important;
}

html.dark-theme .bm-status-pill--online {
    color: #ffffff !important;
}

html.dark-theme .bm-client-badge--cloud {
    color: #ffffff !important;
    background: rgba(14, 165, 233, 0.28) !important;
    border-color: rgba(125, 211, 252, 0.5) !important;
}

html.dark-theme .bm-client-badge--cloud::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M17.5 19H8a5 5 0 1 1 1.35-9.81A7 7 0 0 1 22 13.5A5.5 5.5 0 0 1 17.5 19Z'/%3E%3C/svg%3E") no-repeat center / contain !important;
}

html.dark-theme .bm-rooms-badge {
    color: #d7eafe !important;
}

html.dark-theme .bm-rooms-badge__icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='rgba(96,165,250,0.16)' viewBox='0 0 24 24'%3E%3Cpath stroke='%2397c9ee' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 10.5 12 3l9 7.5V21a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V10.5Z'/%3E%3C/svg%3E") !important;
}

/* Dark charcoal refresh */
html.dark-theme body {
    background: #232323;
    color: var(--bm-text-primary);
}

html.dark-theme .sidebar-link {
    color: #b9bac3;
    border: 1px solid transparent;
}

html.dark-theme .sidebar-link:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.06);
    box-shadow: 0 8px 20px rgba(0,0,0,0.20);
}

html.dark-theme .sidebar-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(168,117,255,0.24), rgba(34,211,238,0.12)) !important;
    border-color: rgba(168,117,255,0.32) !important;
    box-shadow: inset 3px 0 0 #a875ff, 0 12px 26px rgba(0,0,0,0.22) !important;
}

html.dark-theme .sidebar-link.active .sbi,
html.dark-theme .sidebar-link:hover .sbi {
    color: #a875ff;
}

html.dark-theme .sidebar-link.active::before {
    background: #22d3ee;
}

html.dark-theme .brand-mark {
    background: linear-gradient(135deg, #a875ff 0%, #22d3ee 100%);
}

.form-control,
.form-select {
    background-color: var(--bm-search-bg, #ffffff);
    border-color: var(--bm-search-border, #d9e1ee);
    color: var(--bm-text-primary, #24304a);
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff;
    border-color: var(--bm-accent, #4457e7);
    color: var(--bm-text-primary, #24304a);
    box-shadow: 0 0 0 3px rgba(68, 87, 231, 0.13);
}

.form-control::placeholder {
    color: var(--bm-text-placeholder, #aab4c4);
}

html.dark-theme .form-control,
html.dark-theme .form-select {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.10);
    color: #f2f2f4;
}

html.dark-theme .form-control:focus,
html.dark-theme .form-select:focus {
    background: rgba(255,255,255,0.08);
    border-color: rgba(34,211,238,0.65);
    box-shadow: 0 0 0 3px rgba(34,211,238,0.12);
    color: #ffffff;
}

/* Config edit modals use Blazor EditForm, whose generated form can miss
   component-scoped selectors. Keep the layout global so the footer stays pinned. */
.bm-config-edit-modal {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.bm-config-edit-modal > form.bm-config-edit-form {
    display: flex !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.bm-config-edit-modal > form.bm-config-edit-form > .bm-modal-header,
.bm-config-edit-modal > form.bm-config-edit-form > .bm-modal-footer {
    flex: 0 0 auto !important;
}

.bm-config-edit-modal > form.bm-config-edit-form > .bm-config-edit-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Shared search controls */
.bm-searchbar {
    height: 2.4rem !important;
    min-height: 2.4rem !important;
}

.bm-searchbar .bm-search-input {
    height: 100% !important;
}

input.bm-search-input {
    height: 2.4rem !important;
}

.bm-search-icon {
    width: 1.18rem !important;
    height: 1.18rem !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23111827' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m21 21-4.35-4.35M10.5 18a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15Z'/%3E%3C/svg%3E") no-repeat center / contain !important;
}

html.dark-theme .bm-search-icon {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23edf2ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m21 21-4.35-4.35M10.5 18a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15Z'/%3E%3C/svg%3E") no-repeat center / contain !important;
}

.bm-search-clear {
    width: 1.55rem !important;
    min-width: 1.55rem !important;
    height: 1.55rem !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    font-size: 1.22rem !important;
    line-height: 1 !important;
}

.bm-btn-icon-columns,
.bm-hoteli-columns-button {
    min-height: 2.4rem !important;
}

input.bm-search-input::placeholder,
.bm-searchbar .bm-search-input::placeholder {
    color: #c1c8d4 !important;
    opacity: 1 !important;
}

html.dark-theme {
    --bm-text-placeholder: #3f424b;
}

html.dark-theme input.bm-search-input::placeholder,
html.dark-theme .bm-searchbar .bm-search-input::placeholder {
    color: #3f424b !important;
    opacity: 1 !important;
}

html.dark-theme .bm-btn-primary-modal {
    background: linear-gradient(135deg, #8b5cf6, #22d3ee);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(0,0,0,0.24);
}

html.dark-theme .bm-btn-primary-modal:hover:not(:disabled) {
    background: linear-gradient(135deg, #9b6dff, #39e1f2);
    box-shadow: 0 12px 28px rgba(0,0,0,0.30);
}

html.dark-theme .bm-btn-ghost {
    color: #d7d8dd;
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.10);
}

html.dark-theme .bm-btn-ghost:hover {
    color: #ffffff;
    background: rgba(168,117,255,0.13);
    border-color: rgba(168,117,255,0.30);
}

.bm-dashboard-card__image--garson {
    width: min(178px, 55%);
    height: 3.25rem;
    max-width: 178px;
    object-fit: contain;
    object-position: left center;
    border-radius: 4px;
    clip-path: inset(0 round 4px);
}

@media (max-width: 960px) {
    html.sidebar-collapsed .brand-panel {
        justify-content: flex-start;
        padding: 0.1rem 3.25rem 0.55rem 0.1rem;
    }

    html.sidebar-collapsed .brand-logo {
        height: 42px !important;
        max-width: min(180px, calc(100vw - 5rem)) !important;
        object-fit: contain;
    }

    html.sidebar-collapsed .nav-scrollable {
        overflow-y: auto;
    }

    html.sidebar-collapsed .nav-sections {
        align-items: stretch;
        overflow: visible;
    }

    html.sidebar-collapsed .sidebar-item {
        display: block;
        justify-content: stretch;
    }

    html.sidebar-collapsed .sidebar-link {
        width: 100% !important;
        justify-content: flex-start !important;
        gap: 0.85rem !important;
        padding: 0 1.1rem 0 1.7rem !important;
        margin-left: 0;
        margin-right: 0;
    }

    html.sidebar-collapsed .sbi {
        margin: 0;
        opacity: 0.55;
    }

    html.sidebar-collapsed .sbt {
        display: inline-block !important;
        width: auto;
        overflow: visible;
    }

    html.sidebar-collapsed .sbtt {
        display: none !important;
    }
}

/* Klijenti ikonica u sidebaru je narandzasta u obje teme. */
.sidebar-link .sbi--Klijenti,
.sidebar-link:hover .sbi--Klijenti,
.sidebar-link.active .sbi--Klijenti,
html.dark-theme .sidebar-link .sbi--Klijenti,
html.dark-theme .sidebar-link:hover .sbi--Klijenti,
html.dark-theme .sidebar-link.active .sbi--Klijenti {
    color: #f59e0b !important;
    opacity: 1 !important;
    width: 1.55rem;
    height: 1.55rem;
}

.sidebar-link .sbi--Klijenti svg,
.sidebar-link:hover .sbi--Klijenti svg,
.sidebar-link.active .sbi--Klijenti svg,
html.dark-theme .sidebar-link .sbi--Klijenti svg,
html.dark-theme .sidebar-link:hover .sbi--Klijenti svg,
html.dark-theme .sidebar-link.active .sbi--Klijenti svg {
    width: 1.55rem;
    height: 1.55rem;
    color: #f59e0b !important;
    stroke: #f59e0b !important;
}

.sidebar-link .sbi--Klijenti svg *,
.sidebar-link:hover .sbi--Klijenti svg *,
.sidebar-link.active .sbi--Klijenti svg *,
html.dark-theme .sidebar-link .sbi--Klijenti svg *,
html.dark-theme .sidebar-link:hover .sbi--Klijenti svg *,
html.dark-theme .sidebar-link.active .sbi--Klijenti svg * {
    stroke: #f59e0b !important;
}
