html, body {
    height: 100%;
    overflow: hidden;
    font-family: Inter, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #eef1fb 0%, #f0f4ff 40%, #f7f0ff 100%);
    color: #1d2749;
}

/* ── 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: #fff;
    border: 1px solid #edf0fb;
    border-radius: 24px;
    box-shadow: 0 16px 36px rgba(102, 112, 154, 0.08);
}

.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: #18213f;
}

.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: #18213f;
}

.panel-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f9d6c;
    background: #ebfff6;
}

.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, #fcfcff 0%, #f5f7ff 100%);
    border-radius: 20px;
}

.chart-placeholder span {
    display: block;
    border-radius: 999px 999px 10px 10px;
    background: linear-gradient(180deg, #cfd6f7 0%, #a7b1ea 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 #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;
    }
}
/* ================================================================
   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: #50607f;
    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;
}

.sbt {
    display: inline-block;
    white-space: nowrap;
}

.sidebar-link:hover {
    color: #3b28cc;
    background: #eef0ff;
    box-shadow: 0 2px 10px rgba(84, 104, 255, 0.10);
    transform: translateX(3px);
}

.sidebar-link:hover .sbi {
    opacity: 1;
}

.sidebar-link.active {
    color: #2a1fa8 !important;
    background: #c7cdff !important;
    box-shadow: 0 4px 16px rgba(84, 104, 255, 0.22) !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: #1a2540;
    color: #f0f4ff;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #2e3f6a;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 9999;
}

html.sidebar-collapsed .sidebar-link:hover .sbtt {
    opacity: 1;
}

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: #1a2746;
    border-color: #2a3b5e;
}

html.dark-theme .topbar-user-name {
    color: #c5cfea;
}

/* ================================================================
   DARK THEME — BM TABLE (Kompanije, Korisnici, ...)
   NOTE: Per-component overrides are in each .razor.css file
   ================================================================ */

/* ================================================================
   CSS VARIABLES — BM COMPONENTS
   ================================================================ */
:root {
    --bm-surface:             #ffffff;
    --bm-surface-raised:      #f4f6ff;
    --bm-surface-modal:       #ffffff;
    --bm-border:              #dde3f4;
    --bm-border-subtle:       #eaeffa;
    --bm-text-primary:        #2f3d63;
    --bm-text-secondary:      #6b7494;
    --bm-text-muted:          #8c93b3;
    --bm-text-placeholder:    #b0b7ca;
    --bm-row-hover:           #f0f3ff;
    --bm-row-selected:        #e8ecff;
    --bm-scrollbar-thumb:     #c8d0ef;
    --bm-search-bg:           #ffffff;
    --bm-search-border:       #dde3f4;
    --bm-skeleton-from:       #eaeffa;
    --bm-skeleton-to:         #f4f6ff;
    --bm-sortable-hover:      #5468ff;
    --bm-accent:              #5468ff;
    --bm-accent-2:            #7c3aed;
    --bm-table-hover:         rgba(84,104,255,0.06);
}

html.dark-theme {
    --bm-surface:             #0f172a;
    --bm-surface-raised:      #111f38;
    --bm-surface-modal:       #111f38;
    --bm-border:              #1e2d4a;
    --bm-border-subtle:       #1a2746;
    --bm-text-primary:        #c5cfea;
    --bm-text-secondary:      #7a8db5;
    --bm-text-muted:          #5a6a8a;
    --bm-text-placeholder:    #5a6a8a;
    --bm-row-hover:           #1a2746;
    --bm-row-selected:        #1e3160;
    --bm-scrollbar-thumb:     #2a3b5e;
    --bm-search-bg:           #1a2746;
    --bm-search-border:       #2a3b5e;
    --bm-skeleton-from:       #1a2746;
    --bm-skeleton-to:         #243258;
    --bm-sortable-hover:      #7e8fff;
}

/* ================================================================
   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;
}

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-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: #eef1fb !important;
    color: #2f3d63 !important;
    border: 1px solid #c8d0e8 !important;
    box-shadow: none !important;
    -webkit-text-fill-color: #2f3d63 !important;
}

.login-input--password,
input.login-input--password {
    padding-right: 3.2rem !important;
}

.login-input::placeholder,
input.login-input::placeholder {
    color: #9ba4c0 !important;
    opacity: 1 !important;
}

.login-input:focus,
input.login-input:focus {
    background: #eef1fb !important;
    color: #2f3d63 !important;
    -webkit-text-fill-color: #2f3d63 !important;
    border-color: #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 #eef1fb inset !important;
    -webkit-text-fill-color: #2f3d63 !important;
}

html.dark-theme .login-input,
html.dark-theme input.login-input {
    background: #0e1c35 !important;
    color: #c5cfea !important;
    border: 1px solid #243457 !important;
    -webkit-text-fill-color: #c5cfea !important;
    box-shadow: none !important;
}

html.dark-theme .login-input::placeholder,
html.dark-theme input.login-input::placeholder {
    color: #5a6a8a !important;
    opacity: 1 !important;
}

html.dark-theme .login-input:focus,
html.dark-theme input.login-input:focus {
    background: #0e1c35 !important;
    color: #c5cfea !important;
    -webkit-text-fill-color: #c5cfea !important;
    border-color: #5468ff !important;
    box-shadow: 0 0 0 3px rgba(84, 104, 255, 0.18) !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 #0e1c35 inset !important;
    -webkit-text-fill-color: #c5cfea !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: #7a8db5;
}

html.dark-theme .login-eye:hover {
    color: #a0afff;
    background: rgba(84, 104, 255, 0.15) !important;
}

/* ── Card dark override ───────────────────────────────────────── */
html.dark-theme .login-card {
    background: #0d1b2e !important;
    border-color: #1e2d4a !important;
    color: #c5cfea !important;
}

html.dark-theme .login-card__header h4 {
    color: #e4eaff !important;
}

html.dark-theme .login-label {
    color: #7a8db5 !important;
}

/* ===== SNACKBAR ===== */
.bm-snackbar-host {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    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; }

/* ── Lokalni inline toast (per-page, per-user) ───────────────────────── */
.bm-copy-toast {
    position: fixed;
    top: 1.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: 9999;
    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);
}

/* Modal box */
.bm-modal {
    background: var(--bm-surface);
    border: 1px solid var(--bm-border);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,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: 1.25rem 2rem 1.1rem;
    border-bottom: 1px solid var(--bm-border);
}

.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: 1rem 2rem;
    background: var(--bm-surface-raised);
    border-top: 1px solid var(--bm-border);
}

html.dark-theme .bm-modal-footer {
    background: rgba(255,255,255,0.02);
}

/* 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);
}

.bm-btn-primary-modal:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

