/* ═══════════════════════════════════════════════════════
   INSTALLICO – Fresh Blue/White/Orange theme
   Primary  : #1e6fdb  (sky blue)
   CTA      : #f97316  (warm orange)
   Surface  : #ffffff / #f5f8ff
   Text     : #1a2640 / #4b5e7a
   ═══════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────── */
:root {
    --clr-primary:       #1e6fdb;
    --clr-primary-dark:  #155bb5;
    --clr-primary-light: #e8f1fd;
    --clr-primary-ring:  rgba(30,111,219,.18);

    --clr-cta:           #f97316;
    --clr-cta-dark:      #ea6b0a;
    --clr-cta-ring:      rgba(249,115,22,.2);

    --clr-bg:            #f5f8ff;
    --clr-surface:       #ffffff;
    --clr-border:        #dce6f5;
    --clr-border-light:  #eef3fb;

    --clr-text:          #1a2640;
    --clr-text-muted:    #4b5e7a;
    --clr-text-subtle:   #8ca0bc;

    --clr-success:       #16a34a;
    --clr-danger:        #dc2626;
    --clr-warning:       #d97706;

    --radius-sm:         6px;
    --radius-md:         10px;
    --radius-lg:         14px;
    --shadow-sm:         0 1px 3px rgba(30,70,150,.07);
    --shadow-md:         0 4px 16px rgba(30,70,150,.10);
}

/* ── Base ──────────────────────────────────────────── */
html, body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: .9rem;
    color: var(--clr-text);
    background: var(--clr-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--clr-primary); }
a:hover { color: var(--clr-primary-dark); }

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -.01em; color: var(--clr-text); }

/* ── Buttons ───────────────────────────────────────── */
.btn {
    font-weight: 500;
    border-radius: var(--radius-md);
    font-size: .85rem;
    transition: all .15s ease;
}

/* Primary – blue */
.btn-primary {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: #fff;
}
.btn-primary:hover, .btn-primary:active {
    background: var(--clr-primary-dark);
    border-color: var(--clr-primary-dark);
    color: #fff;
}
.btn-primary:focus-visible {
    box-shadow: 0 0 0 3px var(--clr-primary-ring);
}

/* CTA – orange (use btn-warning override or new class) */
.btn-cta, .btn-warning {
    background: var(--clr-cta);
    border-color: var(--clr-cta);
    color: #fff !important;
    font-weight: 600;
}
.btn-cta:hover, .btn-warning:hover {
    background: var(--clr-cta-dark);
    border-color: var(--clr-cta-dark);
    color: #fff !important;
}
.btn-cta:focus-visible, .btn-warning:focus-visible {
    box-shadow: 0 0 0 3px var(--clr-cta-ring);
}

/* Outline secondary – clean light */
.btn-outline-secondary {
    border-color: var(--clr-border);
    color: var(--clr-text-muted);
    background: var(--clr-surface);
}
.btn-outline-secondary:hover {
    background: var(--clr-primary-light);
    border-color: var(--clr-primary);
    color: var(--clr-primary);
}

/* Secondary – subtle fill */
.btn-secondary {
    background: var(--clr-primary-light);
    border-color: var(--clr-primary-light);
    color: var(--clr-primary);
}
.btn-secondary:hover {
    background: #d4e5fa;
    border-color: #d4e5fa;
    color: var(--clr-primary-dark);
}

/* Outline primary */
.btn-outline-primary {
    border-color: var(--clr-primary);
    color: var(--clr-primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: #fff;
}

/* Danger */
.btn-outline-danger { border-color: #fca5a5; color: var(--clr-danger); background: transparent; }
.btn-outline-danger:hover { background: #fef2f2; border-color: #fca5a5; color: var(--clr-danger); }
.btn-danger { background: var(--clr-danger); border-color: var(--clr-danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }

.btn-sm { padding: .3rem .7rem; font-size: .79rem; border-radius: var(--radius-sm); }
.btn-lg { padding: .65rem 1.3rem; font-size: .95rem; }

/* ── Forms ─────────────────────────────────────────── */
.form-control, .form-select {
    border-radius: var(--radius-md);
    border-color: var(--clr-border);
    background: var(--clr-surface);
    font-size: .9rem;
    color: var(--clr-text);
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px var(--clr-primary-ring);
    background: var(--clr-surface);
}
.form-control::placeholder { color: var(--clr-text-subtle); }
.form-label { font-size: .83rem; font-weight: 600; color: var(--clr-text-muted); }
.input-group-text {
    border-color: var(--clr-border);
    background: var(--clr-surface);
    color: var(--clr-text-subtle);
}

/* ── Cards ─────────────────────────────────────────── */
.card {
    border: 1px solid var(--clr-border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background: var(--clr-surface);
}
.card-body { padding: 1.25rem; }
.card:hover { box-shadow: var(--shadow-md); transition: box-shadow .2s; }

/* ── Badges ────────────────────────────────────────── */
.badge {
    font-weight: 600;
    border-radius: var(--radius-sm);
    font-size: .72rem;
}
.bg-primary { background: var(--clr-primary) !important; }
.bg-success  { background: var(--clr-success) !important; }
.bg-danger   { background: var(--clr-danger)  !important; }
.bg-warning  { background: var(--clr-cta)     !important; color: #fff !important; }

/* ── Tables ────────────────────────────────────────── */
.table { font-size: .875rem; color: var(--clr-text); }
.table thead th {
    font-weight: 600;
    font-size: .73rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--clr-text-muted);
    background: var(--clr-bg);
    border-bottom: 1.5px solid var(--clr-border);
    padding: .75rem 1rem;
}
.table tbody td { padding: .8rem 1rem; vertical-align: middle; border-color: var(--clr-border-light); }
.table tbody tr:hover { background: var(--clr-primary-light); }

/* ── Modal ─────────────────────────────────────────── */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(20,50,120,.14);
    background: var(--clr-surface);
}
.modal-header {
    border-bottom: 1px solid var(--clr-border-light);
    background: var(--clr-bg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-footer { border-top: 1px solid var(--clr-border-light); }

/* ── Breadcrumb ────────────────────────────────────── */
.breadcrumb { font-size: .8rem; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--clr-border); }
.breadcrumb-item.active { color: var(--clr-text-muted); }
.breadcrumb-item a { color: var(--clr-primary); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* ── Pagination ────────────────────────────────────── */
.page-link { color: var(--clr-primary); border-color: var(--clr-border); background: var(--clr-surface); }
.page-link:hover { background: var(--clr-primary-light); color: var(--clr-primary-dark); border-color: var(--clr-border); }
.page-item.active .page-link { background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; }
.page-item.disabled .page-link { color: var(--clr-text-subtle); background: var(--clr-bg); }

/* ── Alerts ────────────────────────────────────────── */
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; border-radius: var(--radius-md); }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; border-radius: var(--radius-md); }
.alert-warning { background: #fff7ed; border-color: #fed7aa; color: #92400e; border-radius: var(--radius-md); }
.alert-info { background: var(--clr-primary-light); border-color: #bfdbfe; color: #1e40af; border-radius: var(--radius-md); }

/* ── Validation ────────────────────────────────────── */
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--clr-success); }
.invalid { outline: 1px solid var(--clr-danger); }
.validation-message { color: var(--clr-danger); font-size: .8rem; }
.is-invalid { border-color: var(--clr-danger) !important; }
.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.15) !important; }

/* ── Dropdown ──────────────────────────────────────── */
.dropdown-menu { border-color: var(--clr-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.dropdown-item:hover { background: var(--clr-primary-light); color: var(--clr-primary); }
.dropdown-item.active { background: var(--clr-primary); color: #fff; }

/* ── Misc ──────────────────────────────────────────── */
.text-primary { color: var(--clr-primary) !important; }
.text-muted   { color: var(--clr-text-muted) !important; }
.border       { border-color: var(--clr-border) !important; }
.bg-light     { background: var(--clr-bg) !important; }

/* ── Mobile ────────────────────────────────────────── */
@media (max-width: 640.98px) {
    /* iOS Safari увеличава (zoom) страницата винаги когато фокусирано поле има
       font-size < 16px. Налагаме 16px на ВСЯКО поле за въвеждане — с !important, за
       да победим Bootstrap -sm вариантите, per-component inline <style> блокове и
       scoped стиловете, които иначе връщат по-малък шрифт. Checkbox/radio/range/color
       са изключени (за тях font-size няма значение и не искаме да ги уголемяваме). */
    input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
    textarea, select,
    .form-control, .form-select, .form-control-sm, .form-select-sm {
        font-size: 16px !important;
    }
    .form-control, .form-select { min-height: 44px; }
    .btn { min-height: 40px; }
}

/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVE FOUNDATION (reusable across all pages)
   ═══════════════════════════════════════════════════════ */

/* ── Page toolbar: title row + actions that wrap nicely ─ */
.page-toolbar {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
/* Push a group to the right on desktop; full-width on phones. */
.toolbar-spacer { margin-left: auto; }

/* ── Responsive table → stacked cards on phones ─────────
   Opt-in: add class "table-stack" to a <table>, and give each
   <td> a data-label="Column name". On phones the header row is
   hidden and every <tr> renders as a card with label/value rows. */
@media (max-width: 767.98px) {
    table.table-stack { border: 0; }
    table.table-stack thead { display: none; }
    table.table-stack,
    table.table-stack tbody,
    table.table-stack tr,
    table.table-stack td { display: block; width: 100%; }

    table.table-stack tr {
        background: var(--clr-surface);
        border: 1px solid var(--clr-border);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
        margin-bottom: .6rem;
        padding: .35rem .25rem;
    }
    table.table-stack tr:hover { background: var(--clr-surface); }

    table.table-stack td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        text-align: right;
        padding: .45rem .85rem !important;
        border: 0 !important;
        border-bottom: 1px solid var(--clr-border-light) !important;
        min-height: 0;
    }
    table.table-stack tr td:last-child { border-bottom: 0 !important; }

    /* The column name, pulled from data-label. */
    table.table-stack td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--clr-text-subtle);
        text-align: left;
        flex: 0 0 42%;
        white-space: nowrap;
    }
    /* Cells without a label (e.g. action buttons) span the full width. */
    table.table-stack td:not([data-label]) { justify-content: flex-end; }
    table.table-stack td:not([data-label])::before { content: none; }
    /* Let a cell opt out of the label entirely. */
    table.table-stack td.td-full {
        justify-content: flex-start;
        text-align: left;
    }
    table.table-stack td.td-full::before { content: none; }
}

/* ── Modals → bottom sheets on phones ──────────────────
   On phones every Bootstrap modal becomes a sheet pinned to the
   bottom: rounded top, grab handle, fixed header/footer and an
   internally scrollable body. Works for both plain modals and
   ones whose body+footer are wrapped in an <EditForm>/<form>. */
@media (max-width: 767.98px) {
    .modal-dialog {
        margin: 0; max-width: none; width: 100%;
        position: fixed; left: 0; right: 0; bottom: 0;
        display: flex; align-items: flex-end;
    }
    .modal-dialog-centered { min-height: auto; }
    .modal-content {
        width: 100%; max-height: 92dvh;
        border: none; border-radius: 18px 18px 0 0;
        box-shadow: 0 -8px 30px rgba(0,0,0,.2);
        animation: sheet-up .22s ease;
        display: flex; flex-direction: column; overflow: hidden;
    }
    .modal-content > form {
        display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
    }
    .modal-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .modal-header, .modal-footer { flex: 0 0 auto; }
    .modal-header {
        position: relative; padding: 1.1rem 1rem .85rem;
        background: var(--clr-surface, #fff);
    }
    /* grab handle */
    .modal-header::before {
        content: ""; position: absolute; top: 7px; left: 50%;
        transform: translateX(-50%);
        width: 40px; height: 4px; border-radius: 3px; background: #cbd5e1;
    }
    .modal-footer {
        padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
        gap: .5rem; border-top: 1px solid var(--clr-border, #e2e8f0);
        background: var(--clr-surface, #fff);
    }
    /* Stack footer buttons full-width so they're easy to tap. */
    .modal-footer > .btn { flex: 1 1 auto; min-height: 46px; }
}

/* ═══════════════════════════════════════════════════════
   SHARED MOBILE DESIGN SYSTEM (action sheet · FAB · kebab)
   Used by <ActionSheet> and the Обекти list/details pages.
   ═══════════════════════════════════════════════════════ */
@keyframes sheet-up   { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes sheet-fade { from { opacity: 0; } to { opacity: 1; } }

/* kebab (⋮) overflow trigger — 44px tap target */
.kebab-btn {
    width: 44px; height: 44px; border-radius: 10px;
    border: 1px solid var(--clr-border, #e2e8f0); background: #fff;
    color: #475569; font-size: 1.1rem; line-height: 1; padding: 0;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.kebab-btn:active { background: #f1f5f9; }

/* bottom action sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1090; animation: sheet-fade .15s ease; }
.action-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1091;
    background: #fff; border-radius: 18px 18px 0 0;
    padding: .25rem .75rem calc(.75rem + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 30px rgba(0,0,0,.2);
    max-height: 90vh; overflow-y: auto; animation: sheet-up .2s ease;
}
.action-sheet .sheet-grabber { display: block; width: 40px; height: 4px; border-radius: 3px; background: #cbd5e1; margin: .5rem auto .6rem; }
.sheet-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; padding: .25rem .75rem .4rem; }
.sheet-row {
    display: flex; align-items: center; gap: .75rem; width: 100%;
    background: none; border: none; text-align: left; text-decoration: none;
    padding: .85rem .75rem; border-radius: 10px; font-size: 1rem; color: #1e293b; min-height: 52px;
}
.sheet-row:hover, .sheet-row:active { background: #f1f5f9; color: #1e293b; }
.sheet-row-active { color: #1e6fdb; font-weight: 700; }
.sheet-row-active .sheet-row-icon { color: #1e6fdb; }
.sheet-row-icon { font-size: 1.05rem; color: #64748b; flex-shrink: 0; width: 1.25rem; text-align: center; }
.sheet-row-label { flex: 1; min-width: 0; }
.sheet-row-trail { color: #1e6fdb; flex-shrink: 0; }
.sheet-row-destructive,
.sheet-row-destructive:hover,
.sheet-row-destructive:active { color: #dc2626; }
.sheet-row-destructive .sheet-row-icon { color: #dc2626; }
.sheet-row-cancel { justify-content: center; font-weight: 700; color: #64748b; margin-top: .25rem; border-top: 1px solid #f1f5f9; border-radius: 0; }

/* floating action button */
.app-fab {
    display: none;
    /* Offset above the mobile bottom tab bar (~58px) so they never overlap. */
    position: fixed; right: 16px; bottom: calc(74px + env(safe-area-inset-bottom));
    width: 56px; height: 56px; border-radius: 50%;
    align-items: center; justify-content: center;
    background: var(--clr-primary, #1e6fdb); color: #fff; border: none;
    box-shadow: 0 6px 20px rgba(30,111,219,.45);
    font-size: 1.45rem; z-index: 1030;
}
.app-fab:hover, .app-fab:focus { color: #fff; }
.app-fab:active { transform: scale(.94); }
@media (max-width: 767.98px) { .app-fab { display: flex; } }

/* Compact circular "+" (no text label) — used next to small section labels. */
.add-plus-sm {
    width: 30px; height: 30px; min-height: 30px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.add-plus-sm > i { font-size: .9rem; line-height: 1; }

/* Circular "+" add buttons on phones (text label hidden via d-none d-md-inline).
   On desktop they keep their normal labelled-button look. Solid "good blue". */
@media (max-width: 767.98px) {
    .add-plus-btn {
        width: 42px; height: 42px; min-height: 42px; padding: 0;
        display: inline-flex; align-items: center; justify-content: center;
        border-radius: 50%;
        background: #1e6fdb; border: none; color: #fff;
        box-shadow: 0 2px 8px rgba(30,111,219,.35);
    }
    .add-plus-btn:hover, .add-plus-btn:focus, .add-plus-btn:active {
        background: #1d5dcc; color: #fff;
    }
    .add-plus-sm { width: 32px; height: 32px; min-height: 32px; }
    /* render a crisp centred SVG plus regardless of icon font */
    .add-plus-btn > i { display: none; }
    .add-plus-btn::before {
        content: "";
        width: 18px; height: 18px;
        background: #fff;
        -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 2.5a.75.75 0 0 1 .75.75v4h4a.75.75 0 0 1 0 1.5h-4v4a.75.75 0 0 1-1.5 0v-4h-4a.75.75 0 0 1 0-1.5h4v-4A.75.75 0 0 1 8 2.5z'/></svg>") center/contain no-repeat;
                mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 2.5a.75.75 0 0 1 .75.75v4h4a.75.75 0 0 1 0 1.5h-4v4a.75.75 0 0 1-1.5 0v-4h-4a.75.75 0 0 1 0-1.5h4v-4A.75.75 0 0 1 8 2.5z'/></svg>") center/contain no-repeat;
    }
}

/* ── Generic list-card (matches the polished card look) ─ */
.list-card {
    display: block;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: .85rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, border-color .15s;
}
.list-card:hover { box-shadow: var(--shadow-md); border-color: #bfdbfe; color: inherit; }
.list-card + .list-card { margin-top: .6rem; }

/* ── Copy-to-clipboard icon button ─────────────────────── */
.copy-btn {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; padding: 0; border-radius: 8px;
    border: 1px solid var(--clr-border, #e2e8f0); background: #fff;
    color: #64748b; font-size: .82rem; cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.copy-btn:hover  { background: #e8f1fd; color: #1e6fdb; border-color: #bfdbfe; }
.copy-btn:active { transform: scale(.94); }
.copy-btn.copied { background: #dcfce7; color: #16a34a; border-color: #86efac; }
@media (max-width: 767.98px) { .copy-btn { width: 38px; height: 38px; font-size: .95rem; } }

/* ── Back-as-icon button (details headers) ─────────────── */
.back-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; padding: 0; flex-shrink: 0;
}
.back-icon-btn > i { font-size: 1rem; line-height: 1; }

/* ── Phone helpers ─────────────────────────────────────── */
@media (max-width: 767.98px) {
    /* Tighter horizontal padding so cards get more room. */
    .content.px-4 { padding-left: .85rem !important; padding-right: .85rem !important; }
    /* Make an action button stretch on phones. */
    .btn-block-mobile { width: 100%; }
    /* Hide on phones / show only on phones. */
    .only-desktop { display: none !important; }
}
@media (min-width: 768px) {
    .only-mobile { display: none !important; }
}

/* ═══════════════════════════════════════════════════════
   MOBILE NAVIGATION CHROME ( < md )
   Bottom tab bar (primary) + overflow drawer (secondary) +
   slim top app bar. Visibility is gated with .d-md-none on the
   markup, so these only ever render below 768px.
   ═══════════════════════════════════════════════════════ */

/* Body scroll lock while the drawer is open. */
.mnav-noscroll { overflow: hidden !important; }

/* ── Top app bar (docked) ──────────────────────────────── */
.mnav-topbar {
    position: sticky; top: 0; z-index: 1035;
    display: flex; align-items: center; gap: .25rem;
    height: 52px; padding: 0 .35rem;
    background: var(--clr-surface, #fff);
    border-bottom: 1px solid var(--clr-border, #dce6f5);
}

/* Page-level sticky toolbars must sit BELOW the docked top app bar so the
   menu button stays reachable while scrolling. The top bar is 52px tall. */
@media (max-width: 767.98px) {
    .obj-topbar, .inv-topbar, .sub-topbar, .proto-topbar,
    .sched-mobile-head, .sec-tabs-strip, .copy-mode-banner {
        top: 52px !important;
    }
}
.mnav-topbar-btn {
    width: 44px; height: 44px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: none; border: 0; border-radius: 8px;
    color: var(--clr-text, #1a2640); font-size: 1.45rem;
}
.mnav-topbar-btn:active { background: var(--clr-primary-light, #e8f1fd); }
.mnav-topbar-title {
    flex: 1; min-width: 0;
    font-weight: 700; font-size: 1.02rem; color: var(--clr-text, #1a2640);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mnav-topbar-action { width: 44px; flex-shrink: 0; }

/* ── Bottom tab bar ────────────────────────────────────── */
.mnav-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
    display: flex; align-items: stretch;
    background: var(--clr-surface, #fff);
    border-top: 1px solid var(--clr-border, #dce6f5);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 12px rgba(30,70,150,.06);
}
.mnav-tab {
    flex: 1 1 0; min-width: 0; min-height: 56px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 6px 2px;
    background: none; border: 0; cursor: pointer; text-decoration: none;
    color: var(--clr-text-subtle, #8ca0bc); font-size: 11px; font-weight: 600;
}
.mnav-tab i { font-size: 1.3rem; line-height: 1; }
.mnav-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mnav-tab.active { color: var(--clr-primary, #1e6fdb); }
.mnav-tab:active { background: var(--clr-primary-light, #e8f1fd); }

/* ── Overflow drawer ───────────────────────────────────── */
.mnav-drawer-root { position: fixed; inset: 0; z-index: 1100; pointer-events: none; }
.mnav-drawer-root.open { pointer-events: auto; }

.mnav-scrim {
    position: absolute; inset: 0;
    background: rgba(20,50,120,.42);
    opacity: 0; transition: opacity .22s ease;
}
.mnav-drawer-root.open .mnav-scrim { opacity: 1; }

.mnav-drawer {
    position: absolute; top: 0; left: 0; bottom: 0;
    width: 268px; max-width: 82vw;
    display: flex; flex-direction: column;
    background: var(--clr-surface, #fff);
    box-shadow: 4px 0 24px rgba(0,0,0,.18);
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
    padding-bottom: env(safe-area-inset-bottom);
}
.mnav-drawer-root.open .mnav-drawer { transform: translateX(0); }

.mnav-drawer-head {
    position: relative;
    padding: 1.1rem 1rem 1rem;
    background: var(--clr-primary, #1e6fdb); color: #fff;
}
.mnav-drawer-co { font-weight: 700; font-size: 1rem; padding-right: 2.2rem; }
.mnav-drawer-email { font-size: .78rem; opacity: .85; margin-top: 2px; word-break: break-all; }
.mnav-drawer-close {
    position: absolute; top: .6rem; right: .6rem;
    width: 36px; height: 36px; border: 0; border-radius: 8px;
    background: rgba(255,255,255,.16); color: #fff; font-size: 1rem;
}

.mnav-drawer-nav { flex: 1; overflow-y: auto; padding: .5rem; }
.mnav-drawer-item {
    display: flex; align-items: center; gap: .75rem; width: 100%;
    padding: .7rem .75rem; border-radius: 8px;
    background: none; border: 0; text-align: left; cursor: pointer; text-decoration: none;
    color: var(--clr-text, #1a2640); font-size: .9rem; font-weight: 500;
}
.mnav-drawer-item i { font-size: 1.05rem; width: 1.3rem; text-align: center; color: var(--clr-text-muted, #4b5e7a); }
.mnav-drawer-item:active { background: var(--clr-primary-light, #e8f1fd); }
.mnav-drawer-item.active { background: var(--clr-primary-light, #e8f1fd); color: var(--clr-primary, #1e6fdb); }
.mnav-drawer-item.active i { color: var(--clr-primary, #1e6fdb); }
.mnav-drawer-logout, .mnav-drawer-logout i { color: var(--clr-danger, #dc2626); }
.mnav-drawer-sep { height: 1px; background: var(--clr-border-light, #eef3fb); margin: .4rem .5rem; }

/* Horizontal scroll affordance for tables kept as tables. */
.table-responsive { -webkit-overflow-scrolling: touch; }

/* ── Blazor error ──────────────────────────────────── */
.blazor-error-boundary {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--clr-danger);
    padding: 1rem 1rem 1rem 3.7rem;
    border-radius: var(--radius-md);
}
.blazor-error-boundary::after { content: "An error has occurred." }

.darker-border-checkbox.form-check-input { border-color: var(--clr-border); }

.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; }

/* ── Object / entity status badges ────────────────────── */
.obj-status-предстоящ { background-color:#dbeafe; color:#1e40af; border:1px solid #93c5fd; border-radius:var(--radius-sm); padding:2px 8px; font-size:.72rem; font-weight:600; white-space:nowrap; display:inline-block; }
.obj-status-активен   { background-color:#dcfce7; color:#166534; border:1px solid #86efac; border-radius:var(--radius-sm); padding:2px 8px; font-size:.72rem; font-weight:600; white-space:nowrap; display:inline-block; }
.obj-status-отказан   { background-color:#fee2e2; color:#b91c1c; border:1px solid #fca5a5; border-radius:var(--radius-sm); padding:2px 8px; font-size:.72rem; font-weight:600; white-space:nowrap; display:inline-block; }
.obj-status-завършен  { background-color:#f1f5f9; color:#475569; border:1px solid #cbd5e1; border-radius:var(--radius-sm); padding:2px 8px; font-size:.72rem; font-weight:600; white-space:nowrap; display:inline-block; }

/* Elegant tappable status pill (used on Обекти cards + details). Pairs with an
   .obj-status-<status> colour class. */
.obj-status-chip {
    display: inline-flex !important; align-items: center; gap: .4rem;
    padding: .38rem .8rem !important; border-radius: 999px !important;
    font-size: .74rem; font-weight: 700; cursor: pointer; line-height: 1.1;
    box-shadow: 0 1px 2px rgba(15,23,42,.06);
}
.obj-status-chip > i { font-size: .58rem; opacity: .65; }

.btn-icon-xs {
    background: none; border: none; padding: 1px 4px;
    border-radius: var(--radius-sm); cursor: pointer;
    color: var(--clr-text-muted); font-size: .75rem; line-height: 1;
}
.btn-icon-xs:hover { background: var(--clr-primary-light); color: var(--clr-primary); }
.btn-icon-xs.text-danger:hover { background: #fef2f2; color: var(--clr-danger); }

.btn-edit-soft {
    background-color: #E6F1FB;
    border-color: #B5D4F4;
    color: #0C447C;
}
.btn-edit-soft:hover, .btn-edit-soft:focus { background-color: #B5D4F4; border-color: #B5D4F4; color: #0C447C; }
.btn-edit-soft:active { background-color: #85B7EB; border-color: #85B7EB; color: #0C447C; }
.btn-edit-soft i { color: #0C447C; }
