:root{
    --of-font: "Inter", "Inter Variable", "InterVariable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --of-primary: #16794f;
    --of-primary-rgb: 22,121,79;
    --of-secondary: #172033;
    --of-primary-text: #16794f;
    --of-primary-text-hover: #0f6842;
    --of-primary-hover: color-mix(in srgb, var(--of-primary) 84%, #000);
    --of-primary-soft: color-mix(in srgb, var(--of-primary) 10%, #fff);
    --of-accent: #94c973;
    --of-bg: #f6f7fb;
    --of-surface: #ffffff;
    --of-surface-2: #fafbfc;
    --of-surface-3: #f2f4f7;
    --of-sidebar: #ffffff;

    /* RC54.117 — persistent dark primary navigation */
    --of-nav-bg: #151d28;
    --of-nav-surface: #1c2532;
    --of-nav-surface-2: #222c3a;
    --of-nav-text: #e7ebf2;
    --of-nav-heading: #f3f6fb;
    --of-nav-muted: #99a5b6;
    --of-nav-border: #2b3543;
    --of-nav-border-strong: #394557;
    --of-nav-primary-text: color-mix(in srgb, var(--of-primary) 58%, #fff);
    --of-nav-primary-text-hover: color-mix(in srgb, var(--of-primary) 72%, #fff);
    --of-nav-primary-soft: color-mix(in srgb, var(--of-primary) 22%, var(--of-nav-bg));

    --of-text: #212529;
    --of-heading: #172033;
    --of-muted: #6f7786;
    --of-border: #e6e8ee;
    --of-border-strong: #d7dbe3;
    --of-success: #198754;
    --of-warning: #d99000;
    --of-danger: #dc3545;
    --of-info: #0d6efd;
    --of-success-text: #137744;
    --of-warning-text: #916500;
    --of-danger-text: #bb263b;
    --of-info-text: #0a58ca;
    --of-info-accent: #0dcaf0;
    --of-info-accent-text: #087990;

    /* RC54.108 — shared semantic design tokens */
    --of-inverse-text: #ffffff;
    --of-inverse-rgb: 255,255,255;
    --of-black-rgb: 0,0,0;
    --of-shadow-ink-rgb: 15,23,42;
    --of-shadow-neutral-rgb: 16,24,40;
    --of-overlay: rgba(9,14,23,.45);
    --of-overlay-strong: rgba(var(--of-shadow-ink-rgb),.48);
    --of-success-soft: color-mix(in srgb, var(--of-success) 12%, var(--of-surface));
    --of-warning-soft: color-mix(in srgb, var(--of-warning) 13%, var(--of-surface));
    --of-danger-soft: color-mix(in srgb, var(--of-danger) 12%, var(--of-surface));
    --of-info-soft: color-mix(in srgb, var(--of-info-accent) 12%, var(--of-surface));
    --of-success-border: color-mix(in srgb, var(--of-success) 24%, var(--of-border));
    --of-warning-border: color-mix(in srgb, var(--of-warning) 24%, var(--of-border));
    --of-danger-border: color-mix(in srgb, var(--of-danger) 24%, var(--of-border));
    --of-info-border: color-mix(in srgb, var(--of-info-accent) 24%, var(--of-border));
    --of-print-surface: #ffffff;
    --of-print-text: #000000;
    --of-print-muted: #555555;
    --of-print-border: #d8dce2;
    --of-success-highlight: #59c987;
    --of-warning-ring: #f0ba7a;
    --of-warning-emphasis: #e7a255;
    --of-radius-sm: 8px;
    --of-radius: 10px;
    --of-radius-lg: 14px;
    --of-shadow-sm: 0 1px 2px rgba(16,24,40,.035);
    --of-shadow: 0 8px 24px rgba(16,24,40,.055);
    --of-shadow-lg: 0 22px 55px rgba(16,24,40,.10);
    --of-sidebar-width: 256px;
    --of-topbar-height: 66px;

    /* RC54 Phase 1 — application typography & density foundation */
    --of-type-body: 14px;
    --of-type-control: 13px;
    --of-type-label: 13px;
    --of-type-support: 12px;
    --of-type-micro: 11px;
    --of-type-table: 13px;
    --of-type-table-head: 11.5px;
    --of-leading-body: 1.5;
    --of-leading-compact: 1.35;
    --of-density-table-y: .62rem;
    --of-density-table-x: .68rem;

    /* RC54.1 Phase 2 — touch & accessibility foundation */
    --of-touch-target: 44px;
    --of-focus-ring-color: color-mix(in srgb, var(--of-primary) 38%, transparent);
    --of-focus-ring: 0 0 0 .2rem var(--of-focus-ring-color);
}

[data-bs-theme="dark"]{
    --of-bg: #111722;
    --of-surface: #171f2b;
    --of-surface-2: #1c2532;
    --of-surface-3: #222c3a;
    --of-sidebar: #151d28;
    --of-text: #e7ebf2;
    --of-heading: #f3f6fb;
    --of-muted: #99a5b6;
    --of-border: #2b3543;
    --of-border-strong: #394557;
    --of-primary-soft: color-mix(in srgb, var(--of-primary) 22%, #171f2b);
    --of-primary-text: #69d89d;
    --of-primary-text-hover: #8ee0b3;
    --of-success-text: #69d89d;
    --of-warning-text: #efc56b;
    --of-danger-text: #ff8190;
    --of-info-text: #86b7fe;
    --of-success-highlight: #23885a;
    --of-shadow-sm: 0 1px 2px rgba(0,0,0,.18);
    --of-shadow: 0 10px 28px rgba(0,0,0,.16);
    --of-shadow-lg: 0 24px 60px rgba(0,0,0,.28);
}

*{ box-sizing: border-box; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--of-primary) 28%, transparent) transparent; }
html, body{ min-height:100%; }
body{ margin:0; background:var(--of-bg); color:var(--of-text); font-family:var(--of-font); font-size:var(--of-type-body); line-height:var(--of-leading-body); -webkit-font-smoothing:antialiased; transition:background-color .16s ease,color .16s ease; }
a{ color:var(--of-primary-text); }
a:hover{ color:var(--of-primary-text-hover); }
h1, h2, h3, h4, h5, h6{ color:var(--of-heading); }
.text-secondary, .text-body-secondary{ color:var(--of-muted)!important; }

.skip-link{ position:fixed; top:8px; left:8px; z-index:2000; padding:8px 12px; border-radius:8px; color:var(--of-inverse-text); background:var(--of-primary); transform:translateY(-150%); transition:.15s; }
.skip-link:focus{ transform:translateY(0); }

.btn{ border-radius:var(--of-radius-sm); font-size:13px; font-weight:600; min-height:36px; }
.btn-sm{ min-height:31px; padding:.33rem .68rem; font-size:12.5px; }
.btn-primary{ --bs-btn-bg:var(--of-primary); --bs-btn-border-color:var(--of-primary); --bs-btn-hover-bg:var(--of-primary-hover); --bs-btn-hover-border-color:var(--of-primary-hover); --bs-btn-active-bg:var(--of-primary-hover); --bs-btn-active-border-color:var(--of-primary-hover); }
.btn-outline-primary{ --bs-btn-color:var(--of-primary-text); --bs-btn-border-color:color-mix(in srgb,var(--of-primary) 55%,var(--of-border)); --bs-btn-hover-bg:var(--of-primary); --bs-btn-hover-border-color:var(--of-primary); }
.btn-secondary{ --bs-btn-bg:var(--of-secondary); --bs-btn-border-color:var(--of-secondary); --bs-btn-hover-bg:color-mix(in srgb,var(--of-secondary) 84%,#000); --bs-btn-hover-border-color:color-mix(in srgb,var(--of-secondary) 84%,#000); --bs-btn-active-bg:color-mix(in srgb,var(--of-secondary) 78%,#000); --bs-btn-active-border-color:color-mix(in srgb,var(--of-secondary) 78%,#000); }
.btn-outline-secondary{ --bs-btn-color:var(--of-secondary); --bs-btn-border-color:color-mix(in srgb,var(--of-secondary) 45%,var(--of-border)); --bs-btn-hover-color:var(--of-inverse-text); --bs-btn-hover-bg:var(--of-secondary); --bs-btn-hover-border-color:var(--of-secondary); --bs-btn-active-color:var(--of-inverse-text); --bs-btn-active-bg:var(--of-secondary); --bs-btn-active-border-color:var(--of-secondary); }
[data-bs-theme="dark"] .btn-outline-secondary{ --bs-btn-color:color-mix(in srgb,var(--of-secondary) 64%,#fff); --bs-btn-border-color:color-mix(in srgb,var(--of-secondary) 56%,var(--of-border)); --bs-btn-hover-color:var(--of-inverse-text); }
.btn-light{ --bs-btn-bg:var(--of-surface); --bs-btn-border-color:var(--of-border); --bs-btn-color:var(--of-text); --bs-btn-hover-bg:var(--of-surface-2); --bs-btn-hover-border-color:var(--of-border-strong); --bs-btn-hover-color:var(--of-text); box-shadow:var(--of-shadow-sm); }
.btn-icon{ width:38px; height:38px; min-height:38px; padding:0; display:inline-grid; place-items:center; border:1px solid var(--of-border); color:var(--of-muted); background:var(--of-surface); border-radius:var(--of-radius-sm); box-shadow:var(--of-shadow-sm); }
.btn-icon:hover, .btn-icon:focus{ color:var(--of-primary-text); background:var(--of-primary-soft); border-color:color-mix(in srgb,var(--of-primary) 24%,var(--of-border)); }

.form-label{ margin-bottom:.4rem; color:var(--of-heading); font-size:var(--of-type-label); font-weight:600; }
.form-control, .form-select{ min-height:40px; padding:.55rem .75rem; color:var(--of-text); background-color:var(--of-surface); border-color:var(--of-border-strong); border-radius:var(--of-radius-sm); font-size:var(--of-type-control); }
textarea.form-control{ min-height:auto; }
.form-control:focus, .form-select:focus{ color:var(--of-text); background-color:var(--of-surface); border-color:color-mix(in srgb,var(--of-primary) 54%,var(--of-border)); box-shadow:0 0 0 .2rem color-mix(in srgb,var(--of-primary) 12%,transparent); }
.form-control::placeholder{ color:color-mix(in srgb,var(--of-muted) 72%,transparent); }
.form-control-color{ padding:.25rem; }
.form-check-input{ border-color:var(--of-border-strong); background-color:var(--of-surface); }
.form-check-input:checked{ background-color:var(--of-primary); border-color:var(--of-primary); }
.form-check-input:focus{ border-color:var(--of-primary); box-shadow:0 0 0 .2rem color-mix(in srgb,var(--of-primary) 12%,transparent); }

/* RC54.1 Phase 2 — global keyboard focus and touch accessibility */
.btn:focus-visible, .btn-icon:focus-visible, .sidebar-link:focus-visible, .sidebar-sublink:focus-visible, .dropdown-item:focus-visible, .nav-link:focus-visible, .page-link:focus-visible, .list-group-item-action:focus-visible, [data-command-item]:focus-visible, .product-rich-toolbar .btn:focus-visible, .sales-rich-toolbar .btn:focus-visible{
    outline:3px solid var(--of-focus-ring-color);
    outline-offset:2px;
    box-shadow:none;
}

[role="toolbar"] .btn{ touch-action:manipulation; }
.remote-select-results [role="option"]:focus-visible{
    position:relative;
    z-index:1;
    outline:3px solid var(--of-focus-ring-color);
    outline-offset:-3px;
}

@media (pointer: coarse) {
    .app-shell .btn, .auth-body .btn{
        min-height:var(--of-touch-target);
        touch-action:manipulation;
    }
    .app-shell .btn-sm, .auth-body .btn-sm{
        min-height:var(--of-touch-target);
        padding-top:.45rem;
        padding-bottom:.45rem;
    }
    .app-shell .btn-icon, .auth-body .btn-icon{
        width:var(--of-touch-target);
        height:var(--of-touch-target);
        min-height:var(--of-touch-target);
    }
    .app-shell .form-control, .app-shell .form-select, .auth-body .form-control, .auth-body .form-select, .app-shell .input-group-text{
        min-height:var(--of-touch-target);
    }
    .app-shell .sidebar-link, .app-shell .sidebar-sublink, .app-shell .dropdown-item, .app-shell .nav-link, .app-shell .page-link, .auth-body .dropdown-item{
        min-height:var(--of-touch-target);
        display:flex;
        align-items:center;
        touch-action:manipulation;
    }
    .app-shell .form-check-input, .auth-body .form-check-input{
        width:1.25rem;
        height:1.25rem;
    }
    .app-shell button, .app-shell a, .app-shell input, .app-shell select, .auth-body button, .auth-body a, .auth-body input, .auth-body select{
        touch-action:manipulation;
    }
}

.dropdown-menu{ --bs-dropdown-bg:var(--of-surface); --bs-dropdown-color:var(--of-text); --bs-dropdown-link-color:var(--of-text); --bs-dropdown-link-hover-color:var(--of-heading); --bs-dropdown-link-hover-bg:var(--of-surface-2); --bs-dropdown-border-color:var(--of-border); padding:7px; border-radius:12px; box-shadow:var(--of-shadow-lg); }
.dropdown-item{ border-radius:8px; font-size:13px; }
.dropdown-divider{ border-top-color:var(--of-border); }
.theme-menu{ min-width:180px; }
.theme-option{ display:flex; align-items:center; gap:10px; padding:8px 10px; }
.theme-option .theme-check{ opacity:0; color:var(--of-primary-text); }
.theme-option.active{ color:var(--of-primary-text); background:var(--of-primary-soft); }
.theme-option.active .theme-check{ opacity:1; }

.app-shell{ min-height:100vh; display:flex; }
.app-sidebar{ width:var(--of-sidebar-width); flex:0 0 var(--of-sidebar-width); height:100vh; position:fixed; inset:0 auto 0 0; z-index:1040; color:var(--of-text); background:var(--of-sidebar); border-right:1px solid var(--of-border); transition:transform .2s ease,background-color .16s ease; }
.sidebar-inner{ display:flex; flex-direction:column; height:100%; padding:14px; }
.sidebar-brand-row{ min-height:48px; display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.sidebar-brand{ min-width:0; flex:1; display:flex; align-items:center; gap:10px; color:var(--of-text); text-decoration:none; }
.brand-mark{ width:38px; height:38px; flex:0 0 auto; display:grid; place-items:center; color:var(--of-inverse-text); background:var(--of-primary); border-radius:11px; box-shadow:0 8px 18px color-mix(in srgb,var(--of-primary) 24%,transparent); }
.brand-copy{ min-width:0; display:flex; flex-direction:column; line-height:1.2; }
.brand-copy strong{ overflow:hidden; font-size:15px; font-weight:600; letter-spacing:-.01em; color:var(--of-heading); white-space:nowrap; text-overflow:ellipsis; }
.brand-copy small{ color:var(--of-muted); font-size:11.5px; margin-top:2px; }
.sidebar-close{ border:0; box-shadow:none; }
.sidebar-nav{ flex:1; min-height:0; overflow-y:auto; padding:4px 0 12px; }
.nav-section-label{ padding:16px 10px 6px; color:var(--of-muted); font-size:11.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.sidebar-link{ display:flex; align-items:center; gap:10px; min-height:40px; margin:2px 0; padding:7px 9px; border-radius:9px; color:color-mix(in srgb,var(--of-text) 72%,var(--of-muted)); text-decoration:none; font-weight:500; transition:.14s ease; }
.sidebar-link-label{ min-width:0; flex:1; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.sidebar-link-icon{ width:27px; height:27px; display:grid; place-items:center; border-radius:8px; color:var(--of-muted); transition:.14s; }
.sidebar-link:hover{ color:var(--of-heading); background:var(--of-surface-2); }
.sidebar-link:hover .sidebar-link-icon{ color:var(--of-primary-text); }
.sidebar-link.active{ color:var(--of-primary-text); background:var(--of-primary-soft); font-weight:600; }
.sidebar-link.active .sidebar-link-icon{ color:var(--of-inverse-text); background:var(--of-primary); box-shadow:0 5px 12px color-mix(in srgb,var(--of-primary) 18%,transparent); }
.sidebar-footer{ display:flex; align-items:center; gap:8px; padding:10px; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface-2); }
.sidebar-footer strong, .sidebar-footer small{ display:block; }
.sidebar-footer strong{ font-size:12px; color:var(--of-heading); }
.sidebar-footer small{ font-size:11.5px; color:var(--of-muted); }
.sidebar-status-dot{ width:8px; height:8px; border-radius:50%; background:var(--of-success); box-shadow:0 0 0 4px color-mix(in srgb,var(--of-success) 14%,transparent); }
.badge-soft{ padding:4px 6px; border-radius:999px; color:var(--of-muted); background:var(--of-surface-3); font-size:11.5px; font-weight:600; }
.sidebar-backdrop{ display:none; }

.app-workspace{ margin-left:var(--of-sidebar-width); min-width:0; min-height:100vh; display:flex; flex:1; flex-direction:column; }
.app-topbar{ height:var(--of-topbar-height); display:flex; align-items:center; gap:12px; padding:0 22px; background:color-mix(in srgb,var(--of-surface) 94%,transparent); -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); border-bottom:1px solid var(--of-border); position:sticky; top:0; z-index:1020; }
.topbar-context{ min-width:0; line-height:1.25; }
.topbar-context small{ display:block; color:var(--of-muted); font-size:11.5px; }
.topbar-context strong{ display:block; overflow:hidden; color:var(--of-heading); font-size:13px; font-weight:600; white-space:nowrap; text-overflow:ellipsis; }
.topbar-actions{ display:flex; align-items:center; gap:7px; }
.user-menu{ min-height:42px; display:flex; align-items:center; gap:8px; padding:3px 7px 3px 4px; border:1px solid transparent; color:var(--of-text); background:transparent; }
.user-menu:hover, .user-menu.show{ color:var(--of-text); background:var(--of-surface-2); border-color:var(--of-border); }
.user-avatar{ width:34px; height:34px; border-radius:9px; display:inline-grid; place-items:center; color:var(--of-primary-text); background:var(--of-primary-soft); font-size:12px; font-weight:700; }
.user-copy{ max-width:145px; text-align:left; line-height:1.2; }
.user-copy strong, .user-copy small{ display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.user-copy strong{ color:var(--of-heading); font-size:12px; font-weight:600; }
.user-copy small{ color:var(--of-muted); font-size:11.5px; margin-top:2px; }
.app-content{ flex:1; }
.app-footer{ display:flex; justify-content:space-between; gap:16px; padding:15px 22px; color:var(--of-muted); border-top:1px solid var(--of-border); background:var(--of-surface); font-size:11.5px; }

.metric-card{ background:var(--of-surface); border:1px solid var(--of-border); border-radius:var(--of-radius-lg); box-shadow:var(--of-shadow-sm); }

.metric-card{ min-height:82px; display:flex; align-items:center; gap:12px; padding:15px; }
.metric-card small{ display:block; color:var(--of-muted); font-size:var(--of-type-support); }
.metric-card strong{ display:block; margin-top:1px; color:var(--of-heading); font-size:16px; font-weight:600; }

.settings-section{ padding:17px 0; border-top:1px solid var(--of-border); }
.settings-section:first-of-type{ padding-top:0; border-top:0; }
.settings-section h3{ margin:0 0 4px; color:var(--of-heading); font-size:12px; font-weight:600; }

.eyebrow{ display:block; color:var(--of-muted); font-size:11.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }




.table-responsive{ border-radius:10px; }
.table{ --bs-table-color:var(--of-text); --bs-table-bg:transparent; --bs-table-border-color:var(--of-border); margin-bottom:0; font-size:var(--of-type-table); line-height:var(--of-leading-compact); }
.table>:not(caption)>*>*{ padding:var(--of-density-table-y) var(--of-density-table-x); vertical-align:middle; border-bottom-color:var(--of-border); }
.table thead th{ color:var(--of-muted); background:var(--of-surface-2); font-size:var(--of-type-table-head); font-weight:700; letter-spacing:.045em; text-transform:uppercase; white-space:nowrap; }
.table tbody tr{ transition:background-color .12s; }
.table tbody tr:hover{ background:var(--of-surface-2); }
code{ color:color-mix(in srgb,var(--of-primary) 85%,var(--of-heading)); background:var(--of-primary-soft); border-radius:6px; padding:2px 5px; font-size:11.5px; }
.pagination{ --bs-pagination-bg:var(--of-surface); --bs-pagination-border-color:var(--of-border); --bs-pagination-color:var(--of-text); --bs-pagination-hover-bg:var(--of-surface-2); --bs-pagination-hover-color:var(--of-primary-text); --bs-pagination-active-bg:var(--of-primary); --bs-pagination-active-border-color:var(--of-primary); margin-bottom:0; }

.app-alert{ display:flex; align-items:flex-start; gap:10px; border-width:1px; }
.app-alert>i{ margin-top:2px; }
[data-bs-theme="dark"] .alert-success{ --bs-alert-bg:var(--of-success-soft); --bs-alert-border-color:var(--of-success-border); --bs-alert-color:var(--of-success-text); }
[data-bs-theme="dark"] .alert-danger{ --bs-alert-bg:var(--of-danger-soft); --bs-alert-border-color:var(--of-danger-border); --bs-alert-color:var(--of-danger-text); }
.auth-shell{ min-height:100vh; display:grid; place-items:center; padding:24px; }
.auth-card{ width:min(420px,100%); padding:28px; border:1px solid var(--of-border); border-radius:18px; background:var(--of-surface); box-shadow:var(--of-shadow-lg); }

.auth-card h1{ color:var(--of-heading); font-size:22px; font-weight:600; letter-spacing:-.025em; }
@media (max-width:991.98px) {
    .app-sidebar{ transform:translateX(-100%); box-shadow:none; }
    .app-sidebar.is-open{ transform:translateX(0); box-shadow:18px 0 60px rgba(var(--of-black-rgb),.22); }
    .sidebar-backdrop{ display:block; position:fixed; inset:0; z-index:1035; background:var(--of-overlay); opacity:0; visibility:hidden; transition:.2s; }
    .app-sidebar.is-open + .sidebar-backdrop{ opacity:1; visibility:visible; }
    .app-workspace{ margin-left:0; }
    .app-topbar{ padding:0 15px; }
    .app-footer{ padding:14px 15px; }
    body.sidebar-open{ overflow:hidden; }
}

@media (max-width:575.98px) {

    .auth-card{ padding:22px; border-radius:16px; }

    .app-footer{ flex-direction:column; gap:4px; }

    }

@media (prefers-reduced-motion:reduce) { *, *::before, *::after{ scroll-behavior:auto!important; transition:none!important; animation-duration:.01ms!important; animation-iteration-count:1!important; } }

/* RC54 Phase 1 readable-density guard: keep support copy legible without expanding control heights. */
body:not(.pos-body) .form-text, body:not(.pos-body) .invalid-feedback{ font-size:var(--of-type-support); line-height:1.45; }
body:not(.pos-body) .badge:not(.fs-6):not(.fs-5), body:not(.pos-body) .badge-soft{ line-height:1.3; }
.input-group-text{ min-width:40px; justify-content:center; color:var(--of-muted); background:var(--of-surface-2); border-color:var(--of-border-strong); }
.input-group>.form-control{ border-left-color:var(--of-border); }
.badge.text-bg-light{ color:var(--of-muted)!important; background:var(--of-surface-3)!important; border:1px solid var(--of-border); }
.sticky-xl-top{ z-index:10; }
.card, .modal-content, .offcanvas, .toast, .list-group-item{ color:var(--of-text); background:var(--of-surface); border-color:var(--of-border); }
.card{ border-radius:var(--of-radius-lg); box-shadow:var(--of-shadow-sm); }
.modal-content, .offcanvas{ --bs-modal-bg:var(--of-surface); --bs-offcanvas-bg-color:var(--of-surface); }
.modal-header, .modal-footer, .offcanvas-header{ border-color:var(--of-border); }
.list-group{ --bs-list-group-color:var(--of-text); --bs-list-group-bg:var(--of-surface); --bs-list-group-border-color:var(--of-border); --bs-list-group-action-hover-bg:var(--of-surface-2); }
.nav-tabs{ --bs-nav-tabs-border-color:var(--of-border); --bs-nav-tabs-link-hover-border-color:var(--of-border) var(--of-border) transparent; --bs-nav-tabs-link-active-color:var(--of-primary-text); --bs-nav-tabs-link-active-bg:var(--of-surface); --bs-nav-tabs-link-active-border-color:var(--of-border) var(--of-border) var(--of-surface); }
.border, .border-top, .border-bottom, .border-start{ border-color:var(--of-border)!important; }



/* Forms, functional topbar, dashboard, settings and auth */




.password-field-wrap{ position:relative; }

.password-field-wrap .form-control{ padding-right:44px; }
.password-toggle{ position:absolute; z-index:6; right:8px; top:50%; transform:translateY(-50%); width:30px; height:30px; display:grid; place-items:center; padding:0; border:0; border-radius:7px; color:var(--of-muted); background:transparent; }
.password-toggle:hover{ color:var(--of-primary-text); background:var(--of-primary-soft); }


.topbar-search{ min-width:290px; max-width:390px; height:38px; margin-left:auto; align-items:center; gap:9px; padding:0 9px 0 12px; border:1px solid var(--of-border); border-radius:10px; color:var(--of-muted); background:var(--of-surface-2); box-shadow:var(--of-shadow-sm); font-size:12px; text-align:left; transition:.14s ease; }
.topbar-search:hover{ color:var(--of-heading); border-color:var(--of-border-strong); background:var(--of-surface); }
.topbar-search span{ flex:1; }
kbd{ min-width:20px; padding:2px 5px; color:var(--of-muted); background:var(--of-surface-3); border:1px solid var(--of-border); border-radius:5px; box-shadow:none; font-family:var(--of-font); font-size:11.5px; font-weight:600; text-align:center; }
.topbar-action-btn{ position:relative; }
.topbar-action-btn.active, .topbar-feature-btn.active{ color:var(--of-primary-text); border-color:color-mix(in srgb,var(--of-primary) 30%,var(--of-border)); background:var(--of-primary-soft); }
.topbar-feature-btn{ height:38px; min-height:38px; display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:0 11px; border:1px solid var(--of-border); border-radius:var(--of-radius-sm); color:var(--of-heading); background:var(--of-surface); box-shadow:var(--of-shadow-sm); font-size:12px; font-weight:700; white-space:nowrap; }
.topbar-feature-btn:hover, .topbar-feature-btn:focus{ color:var(--of-primary-text); border-color:color-mix(in srgb,var(--of-primary) 24%,var(--of-border)); background:var(--of-primary-soft); }
.topbar-feature-btn i{ font-size:14px; }
.topbar-date{ height:38px; align-items:center; justify-content:center; min-width:112px; padding:0 12px; border:1px solid var(--of-border); border-radius:var(--of-radius-sm); color:var(--of-heading); background:var(--of-surface); box-shadow:var(--of-shadow-sm); font-size:12px; font-weight:700; font-variant-numeric:tabular-nums; letter-spacing:.01em; white-space:nowrap; }
.topbar-calculator-modal .modal-content{ overflow:hidden; border:1px solid var(--of-border); border-radius:14px; box-shadow:var(--of-shadow-lg); }
.topbar-calculator-modal .modal-header{ align-items:flex-start; padding:14px 15px 12px; border-color:var(--of-border); }
.topbar-calculator-modal .modal-header small{ display:block; margin-top:2px; font-size:11.5px; }
.topbar-calculator-modal .modal-body{ padding:14px; background:var(--of-surface-2); }
.topbar-calculator-display{ padding:10px; margin-bottom:10px; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface); }
.topbar-calculator-history{ min-height:18px; overflow:hidden; color:var(--of-muted); font-size:11.5px; text-align:right; white-space:nowrap; text-overflow:ellipsis; }
.topbar-calculator-value{ height:50px; padding:0; border:0; color:var(--of-heading); background:transparent!important; box-shadow:none!important; font-size:26px; font-weight:700; line-height:50px; text-align:right; font-variant-numeric:tabular-nums; }
.topbar-calculator-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.calculator-key{ min-height:43px; border:1px solid var(--of-border); border-radius:9px; color:var(--of-heading); background:var(--of-surface); box-shadow:var(--of-shadow-sm); font-size:13px; font-weight:650; }
.calculator-key:hover, .calculator-key:focus{ color:var(--of-primary-text); border-color:color-mix(in srgb,var(--of-primary) 26%,var(--of-border)); background:var(--of-primary-soft); }
.calculator-key-muted{ color:var(--of-muted); background:var(--of-surface-3); }
.calculator-key-operator{ color:var(--of-primary-text); background:var(--of-primary-soft); }
.calculator-key-equals{ color:var(--of-inverse-text); border-color:var(--of-primary); background:var(--of-primary); }
.calculator-key-equals:hover, .calculator-key-equals:focus{ color:var(--of-inverse-text); border-color:var(--of-primary-hover); background:var(--of-primary-hover); }
.calculator-key-zero{ grid-column:span 2; }

.notification-count{ position:absolute; top:-4px; right:-4px; min-width:17px; height:17px; display:grid; place-items:center; padding:0 4px; border:2px solid var(--of-surface); border-radius:999px; color:var(--of-inverse-text); background:var(--of-danger); font-size:11.5px; font-weight:700; line-height:1; }

.quick-action-menu{ width:240px; padding:7px; }
.quick-action-menu .dropdown-item{ display:flex; align-items:center; gap:10px; padding:9px 10px; }
.quick-action-menu .dropdown-item i{ width:27px; height:27px; display:grid; place-items:center; border-radius:8px; color:var(--of-primary-text); background:var(--of-primary-soft); }

.command-palette .modal-dialog{ max-width:620px; }
.command-palette .modal-content{ overflow:hidden; border:1px solid var(--of-border-strong); border-radius:16px; box-shadow:var(--of-shadow-lg); }


.dashboard-kpi-card strong{ overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:14px; }
.dashboard-kpi-card em{ display:block; margin-top:2px; color:var(--of-muted); font-size:11.5px; font-style:normal; }


.settings-nav{ display:grid; gap:3px; }





.branding-preview{ padding:16px; border-radius:14px; color:var(--of-inverse-text); background:linear-gradient(135deg,var(--preview-secondary),color-mix(in srgb,var(--preview-primary) 55%,var(--preview-secondary))); box-shadow:var(--of-shadow); }

.auth-body{ min-height:100vh; background:var(--of-bg); }
.auth-theme-control{ position:fixed; top:18px; right:18px; z-index:20; }
.auth-shell-split{ min-height:100vh; display:grid; grid-template-columns:minmax(420px, 1.05fr) minmax(460px,.95fr); }
.auth-showcase{ position:relative; min-height:100vh; padding:34px 42px; flex-direction:column; overflow:hidden; color:var(--of-inverse-text); background:radial-gradient(circle at 18% 20%,color-mix(in srgb,var(--of-primary) 42%,transparent),transparent 35%),linear-gradient(145deg,var(--of-secondary),color-mix(in srgb,var(--of-secondary) 82%,rgb(var(--of-black-rgb)))); }
.auth-showcase::after{ content:""; position:absolute; width:420px; height:420px; right:-150px; bottom:-170px; border:1px solid rgba(var(--of-inverse-rgb),.08); border-radius:50%; box-shadow:0 0 0 55px rgba(var(--of-inverse-rgb),.025),0 0 0 110px rgba(var(--of-inverse-rgb),.018); }
.auth-showcase-brand{ position:relative; z-index:2; display:flex; align-items:center; gap:11px; }
.auth-showcase-brand strong, .auth-showcase-brand small{ display:block; color:var(--of-inverse-text); }
.auth-showcase-brand strong{ font-size:14px; }
.auth-showcase-brand small{ margin-top:1px; opacity:.62; font-size:11.5px; }
.auth-brand-mark{ box-shadow:none; }
.auth-showcase-copy{ position:relative; z-index:2; max-width:610px; margin:auto 0; }
.auth-showcase-copy .eyebrow{ color:color-mix(in srgb,var(--of-accent) 78%,var(--of-inverse-text)); }
.auth-showcase-copy h1{ max-width:590px; margin:10px 0 12px; color:var(--of-inverse-text); font-size:36px; line-height:1.14; letter-spacing:-.045em; }
.auth-showcase-copy>p{ max-width:540px; color:rgba(var(--of-inverse-rgb),.64); font-size:12px; line-height:1.7; }
.auth-feature-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-top:24px; }
.auth-feature-grid>div{ display:flex; align-items:flex-start; gap:9px; padding:11px; border:1px solid rgba(var(--of-inverse-rgb),.09); border-radius:11px; background:rgba(var(--of-inverse-rgb),.035); backdrop-filter:blur(8px); }
.auth-feature-grid>div>i{ width:30px; height:30px; display:grid; place-items:center; border-radius:8px; color:var(--of-inverse-text); background:color-mix(in srgb,var(--of-primary) 75%,transparent); }
.auth-feature-grid strong, .auth-feature-grid small{ display:block; }
.auth-feature-grid strong{ color:var(--of-inverse-text); font-size:12px; }
.auth-feature-grid small{ margin-top:2px; color:rgba(var(--of-inverse-rgb),.57); font-size:11.5px; line-height:1.45; }
.auth-showcase-footer{ position:relative; z-index:2; display:flex; justify-content:space-between; color:rgba(var(--of-inverse-rgb),.45); font-size:11.5px; }
.auth-panel{ min-height:100vh; display:flex; flex-direction:column; justify-content:center; padding:64px clamp(28px,7vw,88px); background:var(--of-bg); }
.auth-card-clean{ width:100%; max-width:480px; margin:0 auto; padding:0; border:0; background:transparent; box-shadow:none; }
.auth-heading{ margin-bottom:25px; }
.auth-heading h1{ margin:5px 0 6px; font-size:25px; font-weight:600; letter-spacing:-.035em; }
.auth-heading p{ max-width:430px; margin:0; color:var(--of-muted); font-size:11.5px; line-height:1.6; }
.auth-step-icon{ width:42px; height:42px; display:grid; place-items:center; margin-bottom:16px; border-radius:12px; color:var(--of-primary-text); background:var(--of-primary-soft); font-size:17px; }
.auth-form .form-control{ min-height:44px; }

.auth-submit{ min-height:44px; }
.auth-inline-link, .auth-back-link{ color:var(--of-primary-text); font-size:11.5px; font-weight:600; text-decoration:none; }
.auth-back-link{ display:inline-flex; align-items:center; gap:6px; margin-top:20px; }
.auth-remember{ color:var(--of-muted); font-size:11.5px; }
.auth-security-note{ display:flex; align-items:flex-start; gap:8px; margin-top:18px; padding:10px; border:1px solid var(--of-border); border-radius:9px; color:var(--of-muted); background:var(--of-surface-2); font-size:11.5px; line-height:1.5; }
.auth-security-note i{ color:var(--of-success); margin-top:1px; }
.auth-mobile-brand{ align-items:center; gap:9px; margin-bottom:30px; }
.auth-mobile-brand strong, .auth-mobile-brand small{ display:block; }
.auth-mobile-brand strong{ color:var(--of-heading); font-size:13px; }
.auth-mobile-brand small{ color:var(--of-muted); font-size:11.5px; }





@media (max-width:1199.98px) {
    .topbar-search{ min-width:220px; max-width:260px; }

}
@media (max-width:991.98px) {
    .auth-shell-split{ display:block; }
    .auth-panel{ min-height:100vh; padding:70px 22px 36px; }
    .auth-mobile-brand{ display:flex!important; }

    .settings-nav{ grid-template-columns:repeat(2,minmax(0,1fr)); }

}
@media (max-width:767.98px) {
    .topbar-actions{ gap:4px; }

    .command-palette .modal-dialog{ margin:10px; }

    .settings-nav{ grid-template-columns:1fr; }

    }
@media (max-width:575.98px) {
    .auth-panel{ padding-left:16px; padding-right:16px; }
    .auth-heading h1{ font-size:22px; }

}



/* Modern date controls and location context */

.location-switcher{ min-height:36px; display:flex; align-items:center; gap:7px; max-width:210px; padding:6px 10px; border:1px solid var(--of-border); border-radius:10px; color:var(--of-text); background:var(--of-surface); font-size:11.5px; font-weight:600; }
.location-switcher span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.invoice-sheet{ min-height:720px; }


@media(max-width:767.98px){}

/* Local Ofsuite SVG icon system. No icon webfont or CDN dependency. */
.bi{ display:inline-flex; align-items:center; justify-content:center; line-height:1; vertical-align:-.125em; }


/* Seller compatibility layer — OFSuite UI/UX port */
.page-title{margin:0 0 3px;color:var(--of-heading);font-size:1.375rem;font-weight:650;letter-spacing:-.025em;}
.main-content{min-width:0;min-height:100vh;}
.app-content{padding:20px 22px 28px;}
.card-header{padding:.8rem 1rem;background:var(--of-surface)!important;border-bottom-color:var(--of-border);font-size:12px;}
.card-footer{padding:.75rem 1rem;background:var(--of-surface)!important;border-top-color:var(--of-border);}
.card-body{padding:1rem;}
.card .h2, .card .h3, .card .h4, .card .h5{color:var(--of-heading);font-weight:600;}
.metric-card{padding:0;display:block;min-height:0;}
.metric-card>.card-body{display:flex;align-items:center;gap:12px;min-height:88px;padding:15px;}
.metric-card .metric-icon{width:40px;height:40px;flex:0 0 40px;border-radius:10px;display:grid;place-items:center;color:var(--of-primary-text);background:var(--of-primary-soft);font-size:16px;}
.metric-card .h4{font-size:17px;}
.table a.fw-semibold{color:var(--of-heading);}
.table td .badge{font-size:11.5px;font-weight:700;padding:.35rem .5rem;border-radius:999px;}
.badge.text-bg-success, .badge.bg-success{background:var(--of-success-soft)!important;color:var(--of-success-text)!important;border:1px solid var(--of-success-border);}
.badge.text-bg-danger, .badge.bg-danger{background:var(--of-danger-soft)!important;color:var(--of-danger-text)!important;border:1px solid var(--of-danger-border);}
.badge.text-bg-warning, .badge.bg-warning{background:var(--of-warning-soft)!important;color:var(--of-warning-text)!important;border:1px solid var(--of-warning-border);}
.badge.text-bg-secondary, .badge.bg-secondary{background:var(--of-surface-3)!important;color:var(--of-muted)!important;border:1px solid var(--of-border);}
.input-group>.input-group-text{min-height:40px;}
.input-group>.form-control, .input-group>.form-select{min-height:40px;}
.form-text, .invalid-feedback{font-size:11.5px;}
.alert{border-radius:10px;font-size:12px;}
.pagination{margin-bottom:0;gap:3px;}
.page-link{border-radius:7px!important;color:var(--of-text);background:var(--of-surface);border-color:var(--of-border);font-size:11.5px;}
.active>.page-link, .page-link.active{background:var(--of-primary);border-color:var(--of-primary);}
.nav-tabs{border-bottom-color:var(--of-border);}
.nav-tabs .nav-link{color:var(--of-muted);border-radius:8px 8px 0 0;font-size:12px;font-weight:600;}
.nav-tabs .nav-link.active{color:var(--of-primary-text);background:var(--of-surface);border-color:var(--of-border) var(--of-border) var(--of-surface);}
.nav-pills .nav-link{border-radius:8px;color:var(--of-muted);font-size:12px;font-weight:600;}
.nav-pills .nav-link.active{background:var(--of-primary);}
.topbar-business-menu{width:280px;}
.topbar-business-menu .dropdown-item{display:flex;align-items:center;gap:9px;padding:9px 10px;}
.business-dot{width:8px;height:8px;border-radius:50%;background:var(--of-primary);box-shadow:0 0 0 4px var(--of-primary-soft);}
.command-search-wrap{display:flex;align-items:center;gap:9px;padding:13px;border-bottom:1px solid var(--of-border);}
.command-search-wrap i{color:var(--of-muted);}
.command-search-wrap input{border:0;box-shadow:none!important;background:transparent!important;padding:0;min-height:34px;font-size:13px;}
.command-list{max-height:420px;overflow:auto;padding:8px;}
.command-group-label{padding:10px 8px 5px;color:var(--of-muted);font-size:11.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;}
.command-item{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:9px;color:var(--of-text);text-decoration:none;}
.command-item:hover, .command-item:focus{color:var(--of-heading);background:var(--of-surface-2);}
.command-item>i{width:28px;height:28px;display:grid;place-items:center;border-radius:8px;color:var(--of-primary-text);background:var(--of-primary-soft);}
.command-item span{font-size:12px;font-weight:600;}
.command-empty{display:none;padding:28px;text-align:center;color:var(--of-muted);font-size:12px;}
.sidebar-nav::-webkit-scrollbar, .command-list::-webkit-scrollbar{width:6px;}
.sidebar-nav::-webkit-scrollbar-thumb, .command-list::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--of-primary) 22%,transparent);border-radius:999px;}



.invoice-sheet{max-width:1100px;margin-inline:auto;}
.auth-dev-seed{margin-top:22px;padding:9px 11px;border:1px dashed var(--of-border-strong);border-radius:9px;color:var(--of-muted);background:var(--of-surface-2);font-size:11.5px;text-align:center;}
@media(max-width:991.98px){.app-content{padding:18px 15px 26px}.topbar-context{display:none}}
@media(max-width:575.98px){.app-content{padding:14px 12px 22px}.page-title{font-size:18px}.card-body{padding:.9rem}.card-header, .card-footer{padding:.7rem .85rem}.table>:not(caption)>*>*{padding:.62rem .55rem}.topbar-actions .user-copy{display:none}}

/* RC54.2 Phase 3 — application shell, navigation, topbar and theme hardening */
.sidebar-link.active{ box-shadow:inset 3px 0 0 var(--of-primary); }
.topbar-compact-menu{ width:300px; padding:7px; }
.topbar-compact-menu .dropdown-item{ display:flex; align-items:center; gap:10px; min-height:40px; padding:8px 10px; }
.topbar-compact-menu .dropdown-item>i:first-child{ width:26px; height:26px; flex:0 0 26px; display:grid; place-items:center; border-radius:8px; color:var(--of-primary-text); background:var(--of-primary-soft); }
.topbar-compact-menu form{ margin:0; }
.topbar-compact-menu .dropdown-header{ color:var(--of-muted); font-weight:700; letter-spacing:.04em; text-transform:uppercase; }

@media(max-width:1399.98px){
    .topbar-search{width:44px;min-width:44px;max-width:44px;height:44px;min-height:44px;flex:0 0 44px;justify-content:center;margin-left:0;padding:0;}
    .topbar-search span, .topbar-search kbd{display:none;}
    .location-switcher{max-width:150px;}
    .user-copy{display:none!important;}
}
@media(max-width:991.98px){
    .app-sidebar{width:min(88vw,300px);flex-basis:auto;}
    .sidebar-link{min-height:44px;}
    .sidebar-sublink{display:flex;align-items:center;min-height:40px;}
    .app-topbar{gap:8px;}
    .topbar-actions{min-width:0;gap:5px;}
    .topbar-secondary-action{display:none!important;}
    .topbar-business-switch .location-switcher{width:44px;min-width:44px;max-width:44px;padding:0;justify-content:center;}
    .topbar-business-switch .location-switcher span, .topbar-business-switch .location-switcher::after{display:none;}
    .topbar-compact-menu{width:min(320px,calc(100vw - 20px));max-height:calc(100vh - 80px);overflow:auto;}
}
@media(max-width:575.98px){
    .topbar-quick-create, .topbar-feature-btn{display:none!important;}
    .user-menu{min-height:44px;padding:0 2px;border-color:transparent;}
    .topbar-search{width:44px;min-width:44px;max-width:44px;}
}
@media(pointer:coarse){
    .topbar-search{min-width:var(--of-touch-target);min-height:var(--of-touch-target);touch-action:manipulation;}
}
@media(max-width:575.98px){.app-topbar{gap:7px;padding-left:10px;padding-right:10px}.topbar-actions{gap:4px}.topbar-feature-btn, .topbar-action-btn{flex:0 0 auto}}
@media print{.app-sidebar, .app-topbar, .app-footer, .sidebar-backdrop, .d-print-none, .alert{display:none!important}.app-workspace{margin-left:0!important}body{background:var(--of-print-surface)!important}.invoice-sheet{border:0;box-shadow:none!important;max-width:none}.invoice-sheet .card-body{padding:0!important}}
.auth-shell.auth-shell-split{padding:0;place-items:stretch;}
.min-w-0{min-width:0!important;}
.btn-outline-secondary{--bs-btn-color:var(--of-muted);--bs-btn-border-color:var(--of-border-strong);--bs-btn-hover-color:var(--of-heading);--bs-btn-hover-bg:var(--of-surface-2);--bs-btn-hover-border-color:var(--of-border-strong);--bs-btn-active-bg:var(--of-surface-3);--bs-btn-active-border-color:var(--of-border-strong);}

/* RC14 accounts + report navigation */
.sidebar-submenu-group{display:block;margin-bottom:2px}.sidebar-submenu-toggle{width:100%;text-align:left}.sidebar-submenu-toggle .sidebar-submenu-chevron{margin-left:auto;font-size:.75rem;transition:transform .18s ease}.sidebar-submenu-group.open .sidebar-submenu-chevron, .sidebar-submenu-toggle[aria-expanded="true"] .sidebar-submenu-chevron{transform:rotate(180deg)}.sidebar-submenu{position:relative;margin:3px 0 7px 30px;padding:2px 0 2px 18px;border-left:1px solid var(--of-border)}.sidebar-submenu::before{content:"";position:absolute;top:0;left:-1px;width:1px;height:18px;background:color-mix(in srgb,var(--of-primary) 48%,var(--of-border))}.sidebar-sublink{display:block;padding:7px 9px;border-radius:7px;color:var(--of-muted);font-size:.79rem;font-weight:500;text-decoration:none;line-height:1.25;transition:.12s ease}.sidebar-sublink:hover{color:var(--of-heading);background:var(--of-surface-2)}.sidebar-sublink.active{color:var(--of-primary-text);background:var(--of-primary-soft);font-weight:650}.sidebar-submenu-scroll{max-height:330px;overflow:auto;padding-right:4px}.sidebar-submenu-scroll::-webkit-scrollbar{width:4px}.sidebar-submenu-scroll::-webkit-scrollbar-thumb{background:var(--of-border-strong);border-radius:999px}
.report-filter-card{box-shadow:none}.report-metric-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.report-table-card{min-width:0}.report-table-scroll{max-height:calc(100vh - 315px)}.advanced-report-table{font-size:.8rem;white-space:nowrap}.advanced-report-table thead{position:sticky;top:0;z-index:4}.advanced-report-table thead th{background:var(--of-surface-2);box-shadow:inset 0 -1px var(--of-border)}.empty-state-inline{display:flex;flex-direction:column;align-items:center;gap:5px;color:var(--of-muted)}.empty-state-inline i{font-size:1.65rem}.empty-state-inline strong{color:var(--of-heading)}.empty-state-inline span{font-size:.78rem}
@media(max-width:1100px){.report-table-scroll{max-height:none}}@media(max-width:640px){.advanced-report-table{font-size:.76rem}}
@media print{.report-table-scroll{max-height:none;overflow:visible}.advanced-report-table{white-space:normal}.card{box-shadow:none!important}.app-sidebar, .app-topbar, .app-footer{display:none!important}.app-content{padding:0!important}}

/* RC14 nested account/report navigation */
.sidebar-submenu-toggle{border:0;background:transparent;box-shadow:none}
.sidebar-submenu-toggle:focus-visible{outline:2px solid var(--bs-primary);outline-offset:2px}

/* RC15 product workspace */
.metric-icon{width:42px;height:42px;flex:0 0 42px;border-radius:12px;display:grid;place-items:center;background:var(--of-primary-soft);color:var(--of-primary-text);font-size:18px}

.upload-dropzone{padding:22px;border:1px dashed var(--bs-border-color);border-radius:14px;background:var(--bs-tertiary-bg);text-align:center}
.upload-dropzone>i{color:var(--of-primary-text);display:block;margin-bottom:8px}
.sidebar-submenu-scroll{max-height:360px;overflow:auto;scrollbar-width:thin}
@media (max-width:767.98px){.upload-dropzone{padding:16px}}

/* RC22 product create/edit workspace */
.product-form-card{border-radius:16px;overflow:hidden}.product-form-card .form-label{margin-bottom:.45rem}.product-location-picker{min-height:42px;border:1px solid var(--bs-border-color);border-radius:.5rem;padding:.35rem;display:flex;gap:.35rem;flex-wrap:wrap;background:var(--bs-body-bg)}.product-location-chip{display:inline-flex;align-items:center;gap:.35rem;background:color-mix(in srgb,var(--of-primary) 9%,var(--of-surface));border:1px solid color-mix(in srgb,var(--of-primary) 16%,var(--of-border));border-radius:.4rem;padding:.28rem .55rem;font-size:.86rem;cursor:pointer}.product-location-chip input{margin:0}.product-rich-editor{border:1px solid var(--bs-border-color);border-radius:.5rem;overflow:hidden;background:var(--bs-body-bg)}.product-rich-toolbar{padding:.45rem;border-bottom:1px solid var(--bs-border-color);background:var(--bs-tertiary-bg)}.product-rich-canvas{min-height:210px;padding:.85rem;outline:0}.product-rich-status{border-top:1px solid var(--bs-border-color);padding:.25rem .6rem;text-align:right;font-size:.75rem;color:var(--bs-secondary-color);text-transform:uppercase}.product-image-upload{border:1px solid var(--bs-border-color);border-radius:.5rem;overflow:hidden}.product-image-preview{height:220px;background:var(--bs-tertiary-bg);display:flex;align-items:center;justify-content:center;color:var(--bs-secondary-color);font-size:3rem}.product-image-preview img{width:100%;height:100%;object-fit:cover}.product-image-upload .form-control{border:0;border-top:1px solid var(--bs-border-color);border-radius:0}.product-pricing-table .table-success th{background:color-mix(in srgb,var(--of-success) 75%,var(--of-surface));color:var(--of-inverse-text);border-color:color-mix(in srgb,var(--of-inverse-text) 20%,transparent)}.product-pricing-table td{min-width:150px}.product-form-actions{position:sticky;bottom:0;z-index:20;background:color-mix(in srgb,var(--bs-body-bg) 94%,transparent);backdrop-filter:blur(10px);padding:1rem;border-top:1px solid var(--bs-border-color);margin-inline:-.25rem}.product-form-actions .btn{min-width:130px}@media(max-width:767.98px){.product-form-actions{position:static}.product-form-actions .btn{width:100%}.product-image-preview{height:180px}.product-pricing-table td{min-width:170px}}

/* RC24 Profit / Loss workspace */
.pl-page{min-width:0}.pl-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.pl-kpi-card{border:1px solid var(--of-border);border-radius:12px;background:var(--of-surface);padding:14px 15px;box-shadow:var(--of-shadow-sm);display:flex;flex-direction:column;gap:3px}.pl-kpi-card>span{font-size:.76rem;color:var(--of-muted);font-weight:650}.pl-kpi-card>strong{font-size:1.35rem;line-height:1.15;color:var(--of-heading)}.pl-kpi-card>small{font-size:.75rem;color:var(--of-muted)}.pl-kpi-card.is-positive{border-color:color-mix(in srgb,var(--of-success) 22%,var(--of-border));background:color-mix(in srgb,var(--of-success) 5%,var(--of-surface))}.pl-kpi-card.is-positive>strong{color:var(--of-success-text)}.pl-kpi-card.is-negative{border-color:color-mix(in srgb,var(--of-danger) 22%,var(--of-border));background:color-mix(in srgb,var(--of-danger) 5%,var(--of-surface))}.pl-kpi-card.is-negative>strong{color:var(--of-danger-text)}.pl-statement-card{overflow:hidden}.pl-card-heading{display:flex;align-items:center;gap:8px;font-size:.86rem;font-weight:800;letter-spacing:.02em;text-transform:uppercase;background:var(--of-surface-2)}.pl-statement-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:11px 14px;border-bottom:1px solid var(--of-border)}.pl-statement-row:last-child{border-bottom:0}.pl-statement-row>div:first-child{display:flex;flex-direction:column;gap:2px;min-width:0}.pl-statement-row strong{font-size:.82rem;color:var(--of-heading)}.pl-statement-row small{display:block;font-size:.75rem;color:var(--of-muted);font-weight:500}.pl-statement-row.is-info-row{background:var(--of-surface-2)}.pl-statement-row.accent-warning{background:color-mix(in srgb,var(--of-warning) 12%,var(--of-surface))}.pl-statement-row.accent-success{background:color-mix(in srgb,var(--of-success) 10%,var(--of-surface))}.pl-statement-row.accent-danger{background:color-mix(in srgb,var(--of-danger) 7%,var(--of-surface))}.pl-summary-card{overflow:hidden}.pl-formula-row{padding:12px 0;border-bottom:1px solid var(--of-border)}.pl-formula-row>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px}.pl-formula-row .pl-formula-label{font-size:.82rem;color:var(--of-muted);font-weight:750;text-transform:uppercase;letter-spacing:.03em}.pl-formula-row strong{font-size:1.5rem;color:var(--of-heading)}.pl-formula-row strong em{font-size:.82rem;font-style:normal;color:var(--of-muted);font-weight:650}.pl-formula-row small{flex-basis:100%;font-size:.76rem;color:var(--of-muted)}.pl-formula-row.positive strong{color:var(--of-success-text)}.pl-formula-row.negative strong{color:var(--of-danger-text)}.pl-tax-block{border-top:1px solid var(--of-border);padding-top:14px}.pl-tax-title{display:flex;align-items:center;gap:7px;font-weight:750;color:var(--of-heading);font-size:.86rem}.pl-tax-title span{font-size:.75rem;color:var(--of-muted);font-weight:500}.pl-tax-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}.pl-tax-grid>div{border:1px solid var(--of-border);border-radius:9px;padding:10px 12px;background:var(--of-surface-2);display:flex;justify-content:space-between;gap:12px;align-items:center}.pl-tax-grid span{font-size:.76rem;color:var(--of-muted)}.pl-tax-grid strong{font-size:.84rem}.pl-analysis-card{overflow:hidden}.pl-analysis-tabs{display:flex;flex-wrap:wrap;gap:0;border-bottom:1px solid var(--of-border);background:var(--of-surface)}.pl-analysis-tab{border:0;border-bottom:2px solid transparent;background:transparent;padding:12px 14px;color:var(--of-muted);font-size:.77rem;font-weight:650;display:inline-flex;align-items:center;gap:6px;cursor:pointer}.pl-analysis-tab:hover{background:var(--of-surface-2);color:var(--of-heading)}.pl-analysis-tab.active{color:var(--of-primary-text);border-bottom-color:var(--of-primary);background:color-mix(in srgb,var(--of-primary) 5%,transparent)}.pl-table-toolbar{display:grid;grid-template-columns:auto 1fr minmax(200px,270px);align-items:center;gap:12px;padding:10px 12px;border-bottom:1px solid var(--of-border);background:var(--of-surface-2)}.pl-table-toolbar>div:nth-child(2){justify-self:center}.pl-table-search{justify-self:end}.pl-tab-pane{display:none}.pl-tab-pane.active{display:block}.pl-analysis-table{font-size:.8rem}.pl-analysis-table thead th{background:var(--of-surface-2);font-weight:750;white-space:nowrap}.pl-analysis-table tfoot th{background:color-mix(in srgb,var(--of-primary) 4%,var(--of-surface-2));font-weight:800}.pl-table-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-top:1px solid var(--of-border);font-size:.76rem;color:var(--of-muted)}.pl-analysis-note{padding:10px 12px;border-top:1px solid var(--of-border);background:var(--of-surface-2);font-size:.75rem;color:var(--of-muted)}
@media(max-width:1050px){.pl-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pl-table-toolbar{grid-template-columns:1fr auto}.pl-table-search{grid-column:1/-1;width:100%;max-width:none}.pl-table-toolbar>div:nth-child(2){justify-self:end}}
@media(max-width:640px){.pl-kpi-grid, .pl-tax-grid{grid-template-columns:1fr}.pl-statement-row{grid-template-columns:1fr auto;padding:10px 11px}.pl-analysis-tabs{overflow-x:auto;flex-wrap:nowrap}.pl-analysis-tab{flex:0 0 auto;white-space:nowrap}.pl-table-toolbar{grid-template-columns:1fr}.pl-table-toolbar>div:nth-child(2), .pl-table-search{justify-self:stretch}.pl-table-toolbar>div:nth-child(2){justify-content:flex-start!important}.pl-formula-row strong{font-size:1.2rem}}
@media print{.pl-page .pl-kpi-grid{grid-template-columns:repeat(4,1fr)}.pl-page .pl-analysis-tabs{display:none!important}.pl-page .pl-tab-pane{display:none!important}.pl-page .pl-tab-pane.active{display:block!important}.pl-page .pl-statement-card, .pl-page .pl-summary-card, .pl-page .pl-analysis-card, .pl-page .pl-kpi-card{break-inside:avoid;box-shadow:none!important}.pl-page .pl-analysis-table{font-size:9pt}.pl-page .card{border-color:var(--of-print-border)!important}}

/* RC26 All Sales action modals */
.sales-action-modal .modal-content{border:0;border-radius:14px;overflow:hidden;box-shadow:0 24px 70px rgba(var(--of-shadow-ink-rgb),.28)}
.sales-action-modal .modal-header{padding:14px 18px;border-bottom:1px solid var(--bs-border-color);background:var(--bs-body-bg)}
.sales-action-modal .modal-title{font-weight:750;color:var(--of-heading)}
.sales-action-modal .modal-footer{padding:12px 18px;border-top:1px solid var(--bs-border-color);background:var(--bs-body-bg)}
.sales-confirm-dialog{max-width:480px}
.sales-detail-sheet{padding:22px 18px 18px;background:var(--bs-body-bg)}
.sales-detail-meta{font-size:.82rem}.sales-preline{white-space:pre-line}
.sales-kv>div{display:flex;gap:5px;line-height:1.55}.sales-kv dt{font-weight:750}.sales-kv dd{margin:0}
.sales-section-title{font-weight:750;color:var(--of-heading);margin:22px 0 8px}
.sales-reference-table{font-size:.78rem;border:1px solid var(--bs-border-color)}
.sales-reference-table thead th{background:var(--of-success-highlight);color:var(--of-inverse-text);border-color:rgba(var(--of-inverse-rgb),.25);font-weight:750;white-space:nowrap}
[data-bs-theme="dark"] .sales-reference-table thead th{background:var(--of-success-highlight)}
.sales-reference-table tbody td{background:var(--bs-tertiary-bg);border-color:var(--bs-border-color)}
.sales-total-panel{border:1px solid var(--bs-border-color);background:var(--bs-tertiary-bg)}
.sales-total-panel>div{display:flex;justify-content:space-between;gap:16px;padding:8px 10px;border-bottom:1px solid var(--bs-border-color);font-size:.78rem}.sales-total-panel>div:last-child{border-bottom:0}.sales-total-panel strong{color:var(--of-heading)}.sales-total-panel span{margin-left:auto;white-space:nowrap}.sales-total-panel small{margin-right:60px;font-weight:700}
.sales-note-box{min-height:38px;border:1px solid var(--bs-border-color);background:var(--bs-tertiary-bg);padding:9px 10px;font-size:.78rem}
.sales-activity-table{font-size:.76rem}.sales-activity-table thead th{font-weight:750;border-top:1px solid var(--bs-border-color);white-space:nowrap}
.sales-upload-zone{min-height:150px;border:2px dashed var(--bs-border-color);background:var(--bs-tertiary-bg);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:20px;cursor:pointer;text-align:center;transition:border-color .15s ease,background .15s ease}.sales-upload-zone:hover{border-color:var(--of-primary);background:color-mix(in srgb,var(--of-primary) 5%,var(--bs-tertiary-bg))}.sales-upload-zone>i{color:var(--of-primary-text)}.sales-upload-zone small{color:var(--bs-secondary-color)}
.sales-confirm-icon{width:84px;height:84px;border:4px solid var(--of-warning-ring);border-radius:50%;display:grid;place-items:center;color:var(--of-warning-emphasis);font-size:48px;line-height:1}
.sales-payment-table-wrap{border:1px solid var(--bs-border-color);border-radius:8px;overflow:auto}.sales-payment-table{font-size:.78rem;min-width:780px}.sales-payment-table thead th{background:var(--bs-tertiary-bg);font-weight:750;white-space:nowrap}.sales-payment-table td{vertical-align:middle}
.sales-placeholder-panel{padding:12px;border:1px solid var(--bs-border-color);border-radius:10px;background:var(--bs-tertiary-bg);max-height:150px;overflow:auto}.sales-placeholder-chip{display:inline-flex;padding:3px 6px;border-radius:5px;border:1px solid var(--bs-border-color);background:var(--bs-body-bg);font-size:.75rem;color:var(--bs-secondary-color)}
.sales-notification-modal-body{background:var(--bs-tertiary-bg)}.sales-notification-section{padding:18px;border:1px solid var(--bs-border-color);border-radius:10px;background:var(--bs-body-bg);box-shadow:var(--of-shadow-sm)}
.sales-notification-toggle{width:100%;border:0;background:transparent;padding:0;display:flex;align-items:center;justify-content:space-between;color:var(--of-primary-text);font-weight:700;text-align:left}.sales-notification-toggle[aria-expanded="true"] i{transform:rotate(180deg)}.sales-notification-toggle i{transition:transform .15s ease}
.sales-rich-editor{border:1px solid var(--bs-border-color);border-radius:7px;overflow:hidden;background:var(--bs-body-bg)}.sales-rich-toolbar{display:flex;align-items:center;gap:2px;padding:5px;border-bottom:1px solid var(--bs-border-color);background:var(--bs-tertiary-bg)}.sales-rich-toolbar .btn{border:0;min-width:32px}.sales-editor-divider{width:1px;height:22px;background:var(--bs-border-color);margin:0 4px}.sales-rich-canvas{min-height:210px;max-height:360px;overflow:auto;padding:12px;outline:0;line-height:1.55}.sales-rich-canvas:focus{box-shadow:inset 0 0 0 1px var(--of-primary)}.sales-fields-disabled{opacity:.55;pointer-events:none}
@media(max-width:767.98px){.sales-detail-sheet{padding:16px 12px}.sales-action-modal .modal-dialog{margin:.5rem}.sales-action-modal .modal-footer{flex-wrap:wrap}.sales-action-modal .modal-footer .btn{flex:1 1 auto}.sales-total-panel small{margin-right:12px}}

/* RC38 Stock Adjustments reference-aligned workspace */
.stock-adjustment-page .page-title{font-size:22px;font-weight:750;letter-spacing:-.025em}
.stock-adjustment-list-card, .stock-adjustment-form-card, .stock-adjustment-products-card, .stock-adjustment-final-card{border-radius:14px;overflow:visible}
.stock-adjustment-list-card>.card-header{min-height:74px}
.stock-adjustment-add-btn{min-height:44px;display:inline-flex;align-items:center;justify-content:center;font-weight:700}
.stock-adjustment-toolbar{display:grid;grid-template-columns:auto minmax(420px,1fr) minmax(210px,260px);gap:18px;align-items:center;padding:8px 0 14px}
.stock-adjustment-page-size-form .form-select{width:76px;min-height:38px}
.stock-adjustment-export-actions{display:flex;flex-wrap:wrap;gap:7px;justify-content:center}
.stock-adjustment-export-actions .btn{font-weight:600}
.stock-adjustment-search-form{justify-self:end;width:100%;max-width:260px}
.stock-adjustment-table-wrap{margin:0 24px;border:1px solid var(--of-border);border-radius:0;overflow:auto}
.stock-adjustment-table{min-width:1120px;font-size:.79rem}
.stock-adjustment-table thead th{background:var(--of-surface);font-weight:750;vertical-align:bottom;padding:12px 10px;white-space:nowrap}
.stock-adjustment-table tbody td{padding:10px;background:var(--of-surface-2);vertical-align:middle}
.stock-adjustment-table tbody tr:nth-child(even) td{background:color-mix(in srgb,var(--of-surface-2) 92%,var(--of-surface))}
.stock-adjustment-actions-cell{min-width:112px}
.stock-adjustment-entry-info{font-size:.8rem;color:var(--of-text)}
.stock-adjustment-columns-menu{min-width:190px;max-height:320px;overflow:auto}
.stock-adjustment-create-page .stock-adjustment-form-card .form-control, .stock-adjustment-create-page .stock-adjustment-form-card .form-select{min-height:42px}
.stock-adjustment-product-search-wrap{position:relative;max-width:800px}
.stock-adjustment-product-search-wrap .input-group-lg>.form-control, .stock-adjustment-product-search-wrap .input-group-lg>.input-group-text{min-height:46px;font-size:.9rem}
.stock-adjustment-search-results{position:absolute;z-index:30;left:0;right:0;top:49px;max-height:310px;overflow:auto;border:1px solid var(--of-border);border-radius:9px;background:var(--of-surface)}
.stock-adjustment-search-result{width:100%;border:0;border-bottom:1px solid var(--of-border);background:transparent;padding:10px 12px;display:flex;justify-content:space-between;gap:14px;text-align:left;color:var(--of-text)}
.stock-adjustment-search-result:last-child{border-bottom:0}
.stock-adjustment-search-result:hover, .stock-adjustment-search-result:focus{background:var(--of-primary-soft);outline:0}
.stock-adjustment-search-result span{display:flex;flex-direction:column;min-width:0}
.stock-adjustment-search-result strong{font-size:.8rem;color:var(--of-heading)}
.stock-adjustment-search-result small{font-size:.75rem;color:var(--of-muted)}
.stock-adjustment-search-empty{padding:18px;text-align:center;color:var(--of-muted);font-size:.77rem}
.stock-adjustment-entry-table{min-width:940px}
.stock-adjustment-entry-table thead th{background:var(--of-surface);text-align:center;font-weight:750;padding:10px}
.stock-adjustment-entry-table tbody td{background:var(--of-surface);padding:10px}
.stock-adjustment-entry-table tfoot td, .stock-adjustment-entry-table tfoot th{background:var(--of-surface);padding:10px}
.stock-adjustment-product-name{font-weight:750;color:var(--of-heading);font-size:.82rem}
.stock-adjustment-product-meta{margin-top:2px;color:var(--of-muted);font-size:.75rem}
.stock-adjustment-line-options{display:grid;grid-template-columns:minmax(110px,.75fr) minmax(150px,1.25fr);gap:7px;max-width:440px}
.stock-adjustment-line-options .form-select{min-height:32px;font-size:.75rem;padding-top:.25rem;padding-bottom:.25rem}
.stock-adjustment-entry-table .quantity-input, .stock-adjustment-entry-table .unit-cost-input{min-height:38px}
.stock-adjustment-entry-table .input-group-text{min-height:38px}
.stock-adjustment-empty-state{min-height:70px;display:flex;align-items:center;justify-content:center;gap:8px;color:var(--of-muted);border:1px solid var(--of-border);border-top:0;font-size:.78rem}
.stock-adjustment-empty-state i{font-size:1rem}
.stock-adjustment-final-card textarea{resize:vertical;min-height:82px}
.stock-adjustment-create-page #saveStockAdjustment{min-width:110px;min-height:48px;border-radius:8px;font-weight:700}
@media(max-width:1199.98px){.stock-adjustment-toolbar{grid-template-columns:1fr 1fr}.stock-adjustment-export-actions{grid-column:1/-1;grid-row:2;justify-content:flex-start}.stock-adjustment-search-form{justify-self:end}}
@media(max-width:767.98px){.stock-adjustment-list-card>.card-header{min-height:auto}.stock-adjustment-toolbar{grid-template-columns:1fr}.stock-adjustment-export-actions{grid-column:auto;grid-row:auto;justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px}.stock-adjustment-export-actions>*{flex:0 0 auto}.stock-adjustment-search-form{justify-self:stretch;max-width:none}.stock-adjustment-table-wrap{margin:0 12px}.stock-adjustment-line-options{grid-template-columns:1fr}.stock-adjustment-create-page .card-body{padding:1rem!important}}

/* RC39 Stock Transfer reference workspace */
.stock-transfer-page .page-title{font-size:22px;font-weight:750;letter-spacing:-.025em}
.stock-transfer-list-card, .stock-transfer-form-card, .stock-transfer-products-card, .stock-transfer-final-card{border-radius:14px;overflow:visible}
.stock-transfer-list-card>.card-header{min-height:74px}
.stock-transfer-toolbar{display:grid;grid-template-columns:auto minmax(0,1fr);gap:18px;align-items:center;padding:8px 0 14px}
.stock-transfer-page-size-form .form-select{width:76px;min-height:38px}
.stock-transfer-export-actions{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}
.stock-transfer-export-actions .btn{font-weight:600}
.stock-transfer-table-wrap{margin:0 24px;border:1px solid var(--of-border);border-radius:0;overflow:auto}
.stock-transfer-table{min-width:1180px;font-size:.79rem}
.stock-transfer-table thead th{background:var(--of-surface);font-weight:750;vertical-align:bottom;padding:12px 10px;white-space:nowrap}
.stock-transfer-table tbody td{padding:10px;background:var(--of-surface-2);vertical-align:middle}
.stock-transfer-table tbody tr:nth-child(even) td{background:color-mix(in srgb,var(--of-surface-2) 92%,var(--of-surface))}
.stock-transfer-actions-cell{min-width:86px}
.stock-transfer-entry-info{font-size:.8rem;color:var(--of-text)}
.stock-transfer-columns-menu{min-width:190px;max-height:320px;overflow:auto}
.stock-transfer-create-page .stock-transfer-form-card .form-control, .stock-transfer-create-page .stock-transfer-form-card .form-select{min-height:42px}
.stock-transfer-product-search-wrap{position:relative;max-width:800px}
.stock-transfer-product-search-wrap .input-group-lg>.form-control, .stock-transfer-product-search-wrap .input-group-lg>.input-group-text{min-height:46px;font-size:.9rem}
.stock-transfer-search-results{position:absolute;z-index:30;left:0;right:0;top:49px;max-height:310px;overflow:auto;border:1px solid var(--of-border);border-radius:9px;background:var(--of-surface)}
.stock-transfer-search-result{width:100%;border:0;border-bottom:1px solid var(--of-border);background:transparent;padding:10px 12px;display:flex;justify-content:space-between;gap:14px;text-align:left;color:var(--of-text)}
.stock-transfer-search-result:last-child{border-bottom:0}
.stock-transfer-search-result:hover, .stock-transfer-search-result:focus{background:var(--of-primary-soft);outline:0}
.stock-transfer-search-result span{display:flex;flex-direction:column;min-width:0}
.stock-transfer-search-result strong{font-size:.8rem;color:var(--of-heading)}
.stock-transfer-search-result small{font-size:.75rem;color:var(--of-muted)}
.stock-transfer-search-empty{padding:18px;text-align:center;color:var(--of-muted);font-size:.77rem}
.stock-transfer-entry-table{min-width:940px}
.stock-transfer-entry-table thead th{background:var(--of-surface);text-align:center;font-weight:750;padding:10px}
.stock-transfer-entry-table tbody td{background:var(--of-surface);padding:10px}
.stock-transfer-entry-table tfoot td, .stock-transfer-entry-table tfoot th{background:var(--of-surface);padding:10px}
.stock-transfer-product-name{font-weight:750;color:var(--of-heading);font-size:.82rem}
.stock-transfer-product-meta{margin-top:2px;color:var(--of-muted);font-size:.75rem}
.stock-transfer-line-options{display:grid;grid-template-columns:minmax(110px,.75fr) minmax(150px,1.25fr);gap:7px;max-width:440px}
.stock-transfer-line-options .form-select{min-height:32px;font-size:.75rem;padding-top:.25rem;padding-bottom:.25rem}
.stock-transfer-entry-table .quantity-input, .stock-transfer-entry-table .unit-cost-input{min-height:38px}
.stock-transfer-entry-table .input-group-text{min-height:38px}
.stock-transfer-empty-state{min-height:70px;display:flex;align-items:center;justify-content:center;gap:8px;color:var(--of-muted);border:1px solid var(--of-border);border-top:0;font-size:.78rem}
.stock-transfer-empty-state i{font-size:1rem}
.stock-transfer-final-card textarea{resize:vertical;min-height:82px}
.stock-transfer-grand-total{font-size:1rem;white-space:nowrap;padding:.5rem 0}
.stock-transfer-create-page #saveStockTransfer{min-width:110px;min-height:48px;border-radius:8px;font-weight:700}
@media(max-width:1199.98px){.stock-transfer-toolbar{grid-template-columns:1fr}.stock-transfer-export-actions{grid-column:auto;grid-row:auto;justify-content:flex-start}.stock-transfer-grand-total{justify-self:start}}
@media(max-width:767.98px){.stock-transfer-list-card>.card-header{min-height:auto}.stock-transfer-toolbar{grid-template-columns:1fr}.stock-transfer-export-actions{grid-column:auto;grid-row:auto;justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px}.stock-transfer-export-actions>*{flex:0 0 auto}.stock-transfer-table-wrap{margin:0 12px}.stock-transfer-line-options{grid-template-columns:1fr}.stock-transfer-create-page .card-body{padding:1rem!important}}

/* RC40 Expenses reference workspace */
.expense-page .page-title{font-size:22px;font-weight:750;letter-spacing:-.025em}
.expense-filter-card, .expense-list-card, .expense-form-card, .expense-category-card{border-radius:14px;overflow:visible}
.expense-filter-card>.card-header{cursor:pointer}

.expense-list-card>.card-header, .expense-category-card>.card-header{min-height:72px}
.expense-toolbar{display:grid;grid-template-columns:auto minmax(440px,1fr) minmax(210px,260px);gap:18px;align-items:center;padding:8px 0 14px}
.expense-page-size-form .form-select{width:76px;min-height:38px}
.expense-export-actions{display:flex;flex-wrap:wrap;gap:7px;justify-content:center}
.expense-export-actions .btn{font-weight:600}
.expense-search-form{justify-self:end;width:100%;max-width:260px}
.expense-table-wrap{margin:0 24px;border:1px solid var(--of-border);overflow:auto}
.expense-table{min-width:1900px;font-size:.76rem}
.expense-category-table{min-width:900px;font-size:.8rem}
.expense-table thead th, .expense-category-table thead th{background:var(--of-surface);font-weight:750;padding:11px 9px;white-space:nowrap;vertical-align:bottom}
.expense-table tbody td, .expense-category-table tbody td{background:var(--of-surface-2);padding:9px;vertical-align:middle}
.expense-table tfoot th{background:color-mix(in srgb,var(--of-primary) 4%,var(--of-surface-2));padding:10px}


.expense-note-cell{max-width:220px;white-space:normal}
.expense-columns-menu{min-width:190px;max-height:360px;overflow:auto}
.expense-create-page .form-control, .expense-create-page .form-select{min-height:42px}
.expense-form-card textarea.form-control{min-height:82px;resize:vertical}
.expense-form-card .form-text{font-size:.75rem}
.expense-payment-due{border-top:1px solid var(--of-border);padding-top:12px}
.expense-category-page .modal-content{border-radius:14px}
@media(max-width:1199.98px){.expense-toolbar{grid-template-columns:1fr 1fr}.expense-export-actions{grid-column:1/-1;grid-row:2;justify-content:flex-start}.expense-search-form{justify-self:end}}
@media(max-width:767.98px){.expense-list-card>.card-header, .expense-category-card>.card-header{min-height:auto}.expense-toolbar{grid-template-columns:1fr}.expense-export-actions{grid-column:auto;grid-row:auto;justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px}.expense-export-actions>*{flex:0 0 auto}.expense-search-form{justify-self:stretch;max-width:none}.expense-table-wrap{margin:0 12px}.expense-create-page .card-body{padding:1rem!important}}
@media print{.expense-category-page .app-sidebar, .expense-category-page .app-topbar, .expense-category-page .btn, .expense-category-page .expense-toolbar, .expense-category-page .card-header{display:none!important}.expense-category-page .expense-table-wrap{margin:0;border:0}.expense-category-page .card{border:0;box-shadow:none}}

.remote-select{position:relative}.remote-select-results{position:absolute;z-index:1080;top:calc(100% + .25rem);left:0;right:0;max-height:260px;overflow:auto;background:var(--bs-body-bg)}.remote-select-results[hidden]{display:none!important}.remote-select-multiple .remote-selected{min-height:1.7rem}.remote-select-multiple .badge{font-weight:500}.remote-select-multiple .btn-close{font-size:.55rem;vertical-align:middle}

/* RC51 — topbar Today's Profit modal */
.today-profit-modal .modal-dialog{ max-width: 930px; }
.today-profit-modal .modal-content{ overflow:hidden; border:1px solid var(--of-border); border-radius:16px; box-shadow:var(--of-shadow-lg); }
.today-profit-modal .modal-header{ align-items:flex-start; padding:16px 18px 14px; border-color:var(--of-border); }
.today-profit-modal .modal-header small{ display:block; margin-top:2px; }
.today-profit-modal .modal-body{ padding:16px; background:var(--of-surface-2); }
.today-profit-modal .modal-footer{ padding:12px 16px; border-color:var(--of-border); background:var(--of-surface); }
.today-profit-loading{ min-height:240px; display:flex; align-items:center; justify-content:center; gap:10px; color:var(--of-muted); font-weight:600; }
.today-profit-meta{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.today-profit-meta > div{ display:flex; flex-wrap:wrap; gap:6px; }
.today-profit-panel{ overflow:hidden; border:1px solid var(--of-border); border-radius:12px; background:var(--of-surface); }
.today-profit-row{ display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:16px; min-height:54px; padding:9px 12px; border-bottom:1px solid var(--of-border); }
.today-profit-row:last-child{ border-bottom:0; }
.today-profit-row:nth-child(odd){ background:color-mix(in srgb,var(--of-surface-2) 70%,transparent); }
.today-profit-row strong{ display:block; color:var(--of-heading); font-size:12px; font-weight:700; }
.today-profit-row small{ display:block; margin-top:1px; color:var(--of-muted); font-size:11.5px; }
.today-profit-row > span{ color:var(--of-heading); font-size:12px; font-weight:650; font-variant-numeric:tabular-nums; white-space:nowrap; }
.today-profit-summary{ overflow:hidden; border:1px solid var(--of-border); border-radius:12px; background:var(--of-surface); }
.today-profit-summary-item{ padding:13px 15px; border-bottom:1px solid var(--of-border); }
.today-profit-summary-item:last-child{ border-bottom:0; }
.today-profit-summary-item > div{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; }
.today-profit-summary-item span{ color:var(--of-heading); font-size:15px; font-weight:750; }
.today-profit-summary-item strong{ color:var(--of-heading); font-size:18px; font-weight:800; font-variant-numeric:tabular-nums; }
.today-profit-summary-item small{ display:block; margin-top:3px; color:var(--of-muted); font-size:11.5px; }
.today-profit-net{ background:color-mix(in srgb,var(--of-primary-soft) 52%,var(--of-surface)); }
.today-profit-footnote{ display:flex; flex-wrap:wrap; gap:14px; padding:10px 2px 0; color:var(--of-muted); font-size:11.5px; }
@media (max-width: 767.98px) {
    .today-profit-modal .modal-dialog{ margin:.5rem; }
    .today-profit-modal .modal-body{ padding:12px; }
    .today-profit-meta{ align-items:flex-start; flex-direction:column; }
    .today-profit-row{ min-height:50px; padding:8px 10px; gap:10px; }
    .today-profit-summary-item > div{ align-items:flex-start; flex-direction:column; gap:2px; }
    .today-profit-modal .modal-footer{ flex-wrap:wrap; }
}

/* RC54.10 Phase 11 — app.css consolidation & UI architecture cleanup */
/*
 * Architecture note: active application component rules live below the shared shell/theme foundation.
 * Retired Alpha/legacy workspace selectors were removed only when no runtime Blade/PHP/JS reference remained.
 * Bootstrap/Laravel pagination runtime-generated selectors are intentionally retained.
 */

/* RC54.3 Phase 4 — dashboard deep redesign */
.dashboard-page{
    --dashboard-success: var(--of-success);
    --dashboard-warning: var(--of-warning);
    --dashboard-danger: var(--of-danger);
    --dashboard-info: var(--of-info);
    display:grid;
    gap:16px;
}
.dashboard-page .dashboard-hero{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:24px;
    padding:22px 24px;
    border:1px solid var(--of-border);
    border-radius:16px;
    background:
        radial-gradient(circle at 92% 12%, color-mix(in srgb,var(--of-primary) 13%,transparent), transparent 28%),
        linear-gradient(135deg,var(--of-surface),color-mix(in srgb,var(--of-primary) 5%,var(--of-surface)));
    box-shadow:var(--of-shadow-sm);
    overflow:hidden;
}
.dashboard-hero-copy{ min-width:0; }
.dashboard-eyebrow, .dashboard-section-kicker{
    display:block;
    color:var(--of-primary-text);
    font-size:var(--of-type-support);
    font-weight:750;
    letter-spacing:.08em;
    line-height:var(--of-leading-compact);
    text-transform:uppercase;
}
.dashboard-page .dashboard-hero h1{
    margin:4px 0 6px;
    color:var(--of-heading);
    font-size:1.55rem;
    font-weight:700;
    letter-spacing:-.035em;
    line-height:1.16;
}
.dashboard-page .dashboard-hero p{
    max-width:720px;
    margin:0;
    color:var(--of-muted);
    font-size:var(--of-type-control);
}
.dashboard-hero-badges{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin-top:13px;
}
.dashboard-soft-badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    min-height:30px;
    padding:5px 9px;
    border:1px solid var(--of-border);
    border-radius:999px;
    color:var(--of-muted);
    background:color-mix(in srgb,var(--of-surface) 88%,transparent);
    font-size:var(--of-type-support);
    font-weight:650;
}
.dashboard-soft-badge i{ color:var(--of-primary-text); }
.dashboard-hero-side{ display:grid; justify-items:end; gap:12px; }
.dashboard-entity-summary{
    display:grid;
    grid-template-columns:repeat(3,minmax(92px,1fr));
    gap:8px;
}
.dashboard-entity-summary>div{
    min-width:96px;
    padding:9px 11px;
    border:1px solid var(--of-border);
    border-radius:11px;
    background:color-mix(in srgb,var(--of-surface) 92%,transparent);
    text-align:left;
}
.dashboard-entity-summary span, .dashboard-entity-summary strong{ display:block; }
.dashboard-entity-summary span{ color:var(--of-muted); font-size:var(--of-type-support); }
.dashboard-entity-summary strong{ margin-top:1px; color:var(--of-heading); font-size:.95rem; font-weight:750; }
.dashboard-hero-actions{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }

.dashboard-section{ display:grid; gap:10px; }
.dashboard-section-heading{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:16px;
    padding:0 2px;
}
.dashboard-section-heading h2, .dashboard-card-heading h2{
    margin:2px 0 0;
    color:var(--of-heading);
    font-size:1rem;
    font-weight:750;
    letter-spacing:-.015em;
}
.dashboard-section-heading>p, .dashboard-card-heading p{
    margin:0;
    color:var(--of-muted);
    font-size:var(--of-type-support);
}
.dashboard-kpi-card{
    --dash-tone:var(--of-primary);
    position:relative;
    display:flex;
    flex-direction:column;
    min-height:172px;
    padding:16px;
    border:1px solid var(--of-border);
    border-radius:14px;
    background:var(--of-surface);
    box-shadow:var(--of-shadow-sm);
    overflow:hidden;
    transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.dashboard-kpi-card::before{
    content:"";
    position:absolute;
    inset:0 auto 0 0;
    width:3px;
    background:var(--dash-tone);
}
.dashboard-kpi-card[data-tone="success"]{ --dash-tone:var(--dashboard-success); }
.dashboard-kpi-card[data-tone="warning"]{ --dash-tone:var(--dashboard-warning); }
.dashboard-kpi-card[data-tone="danger"]{ --dash-tone:var(--dashboard-danger); }
.dashboard-kpi-card[data-tone="info"]{ --dash-tone:var(--dashboard-info); }
.dashboard-kpi-card:hover{ border-color:color-mix(in srgb,var(--dash-tone) 24%,var(--of-border)); box-shadow:var(--of-shadow); transform:translateY(-1px); }
.dashboard-kpi-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.dashboard-kpi-icon{
    width:40px;
    height:40px;
    flex:0 0 40px;
    display:grid;
    place-items:center;
    border-radius:11px;
    color:var(--dash-tone,var(--of-primary));
    background:color-mix(in srgb,var(--dash-tone,var(--of-primary)) 10%,var(--of-surface));
    font-size:1rem;
}
.dashboard-kpi-state{
    width:9px;
    height:9px;
    flex:0 0 9px;
    border-radius:50%;
    background:var(--dash-tone);
    box-shadow:0 0 0 4px color-mix(in srgb,var(--dash-tone) 11%,transparent);
}
.dashboard-kpi-label{ margin-top:15px; color:var(--of-muted); font-size:var(--of-type-control); font-weight:650; }
.dashboard-kpi-value{
    display:block;
    margin-top:2px;
    color:var(--of-heading);
    font-size:1.28rem;
    font-weight:750;
    letter-spacing:-.025em;
    overflow-wrap:anywhere;
}
.dashboard-kpi-footer{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:10px;
    margin-top:auto;
    padding-top:12px;
    color:var(--of-muted);
    font-size:var(--of-type-support);
    line-height:1.35;
}
.dashboard-kpi-footer>span{ min-width:0; }
.dashboard-kpi-footer>a{
    display:inline-flex;
    align-items:center;
    gap:4px;
    flex:0 0 auto;
    color:var(--dash-tone);
    text-decoration:none;
    font-weight:750;
    white-space:nowrap;
}
.dashboard-kpi-footer>a:hover{ text-decoration:underline; }
.dashboard-kpi-footer>a:focus-visible, .dashboard-action:focus-visible, .dashboard-trend-data>summary:focus-visible, .dashboard-trend-scroll:focus-visible{
    outline:3px solid var(--of-focus-ring-color);
    outline-offset:3px;
}


.dashboard-card-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:14px 16px;
}
.dashboard-card-heading>div{ min-width:0; }
.dashboard-card-heading p{ margin-top:2px; }
.dashboard-trend-card, .dashboard-recent-sales, .dashboard-top-products, .dashboard-actions-card{ overflow:hidden; }
.dashboard-trend-summary{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
    margin-bottom:12px;
}
.dashboard-trend-summary>div{
    min-width:0;
    padding:9px 10px;
    border:1px solid var(--of-border);
    border-radius:10px;
    background:var(--of-surface-2);
}
.dashboard-trend-summary span, .dashboard-trend-summary strong{ display:block; }
.dashboard-trend-summary span{ color:var(--of-muted); font-size:var(--of-type-support); }
.dashboard-trend-summary strong{ margin-top:2px; color:var(--of-heading); font-size:var(--of-type-control); font-weight:750; overflow-wrap:anywhere; }
.dashboard-trend-scroll{
    width:100%;
    overflow-x:auto;
    padding:4px 0 0;
    border-radius:10px;
}
.dashboard-trend-svg{
    display:block;
    width:100%;
    min-width:650px;
    height:auto;
    max-height:280px;
}
.dashboard-trend-grid{ stroke:var(--of-border); stroke-width:1; stroke-dasharray:4 5; }
.dashboard-trend-axis{ fill:var(--of-muted); font-size:var(--of-type-support); font-family:var(--of-font); }
.dashboard-trend-date{ font-weight:650; }
.dashboard-trend-bar{ fill:var(--of-primary); transition:opacity .15s ease; }
.dashboard-trend-point:nth-of-type(even) .dashboard-trend-bar{ fill:color-mix(in srgb,var(--of-primary) 78%,var(--of-accent)); }
.dashboard-trend-point:hover .dashboard-trend-bar{ opacity:.78; }
.dashboard-trend-data{ border-top:1px solid var(--of-border); padding-top:8px; }
.dashboard-trend-data>summary{
    width:max-content;
    cursor:pointer;
    color:var(--of-primary-text);
    font-size:var(--of-type-support);
    font-weight:700;
}
.dashboard-trend-data[open]>summary{ margin-bottom:4px; }

.dashboard-empty-state{
    min-height:270px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:28px;
    text-align:center;
}
.dashboard-empty-state-compact{ min-height:220px; }
.dashboard-empty-state>span{
    width:48px;
    height:48px;
    display:grid;
    place-items:center;
    border-radius:14px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:1.15rem;
}
.dashboard-empty-state h3{ margin:4px 0 0; color:var(--of-heading); font-size:.95rem; font-weight:750; }
.dashboard-empty-state p{ max-width:360px; margin:0 0 4px; color:var(--of-muted); font-size:var(--of-type-support); }

.dashboard-product-list{ display:grid; }
.dashboard-product-item{
    display:grid;
    grid-template-columns:28px minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    min-height:78px;
    padding:11px 14px;
    border-top:1px solid var(--of-border);
}
.dashboard-product-item:first-child{ border-top:0; }
.dashboard-product-rank{
    width:28px;
    height:28px;
    display:grid;
    place-items:center;
    border-radius:9px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:var(--of-type-support);
    font-weight:800;
}
.dashboard-product-copy{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.dashboard-product-copy strong{ min-width:0; overflow:hidden; color:var(--of-heading); font-size:var(--of-type-control); font-weight:700; white-space:nowrap; text-overflow:ellipsis; }
.dashboard-product-copy span{ flex:0 0 auto; color:var(--of-muted); font-size:var(--of-type-support); }
.dashboard-product-revenue{ color:var(--of-heading); font-size:var(--of-type-control); font-weight:750; white-space:nowrap; }
.dashboard-product-progress{
    width:100%;
    height:6px;
    margin-top:6px;
    display:block;
    border:0;
    border-radius:999px;
    overflow:hidden;
    background:var(--of-surface-3);
}
.dashboard-product-progress::-webkit-progress-bar{ background:var(--of-surface-3); border-radius:999px; }
.dashboard-product-progress::-webkit-progress-value{ background:linear-gradient(90deg,var(--of-primary),var(--of-accent)); border-radius:999px; }
.dashboard-product-progress::-moz-progress-bar{ background:linear-gradient(90deg,var(--of-primary),var(--of-accent)); border-radius:999px; }

.dashboard-action-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    padding:14px;
}
.dashboard-action{
    display:grid;
    grid-template-columns:40px minmax(0,1fr) auto;
    align-items:center;
    gap:11px;
    min-height:72px;
    padding:11px 12px;
    border:1px solid var(--of-border);
    border-radius:11px;
    color:var(--of-text);
    background:var(--of-surface-2);
    text-decoration:none;
    transition:border-color .15s ease,background .15s ease,transform .15s ease;
}
.dashboard-action:hover{ color:var(--of-text); border-color:color-mix(in srgb,var(--of-primary) 24%,var(--of-border)); background:var(--of-primary-soft); transform:translateY(-1px); }
.dashboard-action>span{
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    border-radius:10px;
    color:var(--of-primary-text);
    background:var(--of-surface);
    box-shadow:var(--of-shadow-sm);
}
.dashboard-action strong, .dashboard-action small{ display:block; }
.dashboard-action strong{ color:var(--of-heading); font-size:var(--of-type-control); font-weight:700; }
.dashboard-action small{ margin-top:1px; color:var(--of-muted); font-size:var(--of-type-support); }
.dashboard-action>i{ color:var(--of-muted); }

[data-bs-theme="dark"] .dashboard-page .dashboard-hero{
    background:
        radial-gradient(circle at 92% 12%, color-mix(in srgb,var(--of-primary) 18%,transparent), transparent 30%),
        linear-gradient(135deg,var(--of-surface),color-mix(in srgb,var(--of-primary) 6%,var(--of-surface)));
}
[data-bs-theme="dark"] .dashboard-soft-badge, [data-bs-theme="dark"] .dashboard-entity-summary>div{ background:color-mix(in srgb,var(--of-surface) 94%,transparent); }
[data-bs-theme="dark"] .dashboard-kpi-icon{ background:color-mix(in srgb,var(--dash-tone,var(--of-primary)) 18%,var(--of-surface)); }

@media(max-width:1199.98px) {
    .dashboard-page .dashboard-hero{ grid-template-columns:1fr; align-items:start; }
    .dashboard-hero-side{ width:100%; justify-items:stretch; }
    .dashboard-entity-summary{ width:100%; }
    .dashboard-hero-actions{ justify-content:flex-start; }
    .dashboard-action-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:767.98px) {
    .dashboard-page{ gap:14px; }
    .dashboard-page .dashboard-hero{ padding:18px; gap:18px; }
    .dashboard-page .dashboard-hero h1{ font-size:1.35rem; }
    .dashboard-section-heading{ align-items:flex-start; flex-direction:column; gap:3px; }
    .dashboard-trend-summary{ grid-template-columns:repeat(2,minmax(0,1fr)); }
    .dashboard-card-heading{ align-items:flex-start; flex-wrap:wrap; }
    .dashboard-action-grid{ grid-template-columns:1fr; padding:11px; }
    .dashboard-recent-sales .table-responsive{ overflow:visible; }
    .dashboard-recent-sales table, .dashboard-recent-sales tbody, .dashboard-recent-sales tr, .dashboard-recent-sales td{ display:block; width:100%; }
    .dashboard-recent-sales thead{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
    .dashboard-recent-sales tbody{ display:grid; gap:9px; padding:11px; }
    .dashboard-recent-sales tbody tr{ padding:10px 11px; border:1px solid var(--of-border); border-radius:11px; background:var(--of-surface-2); }
    .dashboard-recent-sales tbody td{
        display:grid;
        grid-template-columns:88px minmax(0,1fr);
        gap:10px;
        padding:5px 0!important;
        border:0;
        text-align:left;
        white-space:normal;
    }
    .dashboard-recent-sales tbody td::before{ content:attr(data-label); color:var(--of-muted); font-size:var(--of-type-support); font-weight:650; }
    .dashboard-recent-sales tbody td:last-child{ color:var(--of-heading); }
}
@media(max-width:575.98px) {
    .dashboard-page .dashboard-hero{ padding:15px; }
    .dashboard-entity-summary{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
    .dashboard-entity-summary>div{ min-width:0; padding:8px; }
    .dashboard-hero-actions{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
    .dashboard-hero-actions .btn-primary{ grid-column:1/-1; }
    .dashboard-kpi-card{ min-height:158px; padding:14px; }
    .dashboard-kpi-value{ font-size:1.16rem; }
    .dashboard-trend-summary{ gap:6px; }
    .dashboard-trend-summary>div{ padding:8px; }
    .dashboard-product-item{ grid-template-columns:28px minmax(0,1fr); }
    .dashboard-product-revenue{ grid-column:2; justify-self:start; }
    .dashboard-action{ min-height:68px; }
}
@media (prefers-reduced-motion: reduce) {
    .dashboard-kpi-card, .dashboard-action, .dashboard-trend-bar{ transition:none!important; }
    .dashboard-kpi-card:hover, .dashboard-action:hover{ transform:none; }
}

/* RC54.4 Phase 5 — Sales & Contacts UX */
.page-workspace-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
}
.page-workspace-header>div:first-child{ min-width:0; }
.page-eyebrow{
    font-size:var(--of-type-support);
    letter-spacing:.08em;
    line-height:var(--of-leading-compact);
}
.sales-filter-card, .sales-results-card, .contact-ledger-card{ box-shadow:var(--of-shadow-sm); }
.sales-advanced-filter-panel{ border-color:var(--of-border)!important; }
.sales-subscription-check{ min-height:40px; display:flex; align-items:center; gap:7px; }
.sales-filter-chips{ display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.sales-filter-chip{
    display:inline-flex;
    align-items:center;
    gap:7px;
    min-height:30px;
    max-width:100%;
    padding:4px 9px;
    border:1px solid color-mix(in srgb,var(--of-primary) 20%,var(--of-border));
    border-radius:999px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:var(--of-type-support);
    font-weight:650;
    line-height:1.3;
    text-decoration:none;
}
.sales-filter-chip>span{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sales-filter-chip:hover{ color:var(--of-primary-hover); border-color:color-mix(in srgb,var(--of-primary) 42%,var(--of-border)); }
.sales-filter-chip:focus-visible{ outline:3px solid var(--of-focus-ring-color); outline-offset:2px; }
.sales-summary-card{ overflow:hidden; }
.sales-summary-icon{
    width:40px;
    height:40px;
    flex:0 0 40px;
    display:grid;
    place-items:center;
    border-radius:11px;
    color:var(--of-muted);
    background:var(--of-surface-3);
}



.sales-summary-value{ color:var(--of-heading); font-size:1.08rem; font-weight:750; line-height:1.25; }
.sales-note-truncate, .sales-shipping-truncate{ display:inline-block; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:bottom; }
.sales-shipping-truncate{ max-width:220px; }
.sales-table thead th{ white-space:nowrap; }
.sales-columns-menu{ max-height:360px; overflow:auto; min-width:220px; }
.sales-mobile-list, .contact-mobile-list, .contact-ledger-mobile{ background:var(--of-surface); }
.sales-mobile-record, .contact-mobile-record, .contact-ledger-record{ padding:15px 16px; border-bottom:1px solid var(--of-border); }
.sales-mobile-record:last-child, .contact-mobile-record:last-child, .contact-ledger-record:last-child{ border-bottom:0; }
.sales-mobile-invoice, .contact-mobile-name{ color:var(--of-heading); font-size:.96rem; font-weight:750; text-decoration:none; }
.sales-mobile-invoice:hover, .contact-mobile-name:hover{ color:var(--of-primary-text); }
.sales-mobile-customer{ margin-top:2px; color:var(--of-text); font-size:var(--of-type-control); }
.sales-mobile-finance-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
}
.sales-mobile-finance-grid>div{
    min-width:0;
    padding:8px 9px;
    border:1px solid var(--of-border);
    border-radius:9px;
    background:var(--of-surface-2);
}
.sales-mobile-finance-grid span, .sales-mobile-finance-grid strong{ display:block; }
.sales-mobile-finance-grid span{ color:var(--of-muted); font-size:var(--of-type-support); }
.sales-mobile-finance-grid strong{ margin-top:2px; color:var(--of-heading); font-size:var(--of-type-control); overflow-wrap:anywhere; }
.sales-mobile-meta{
    display:flex;
    flex-wrap:wrap;
    gap:6px 12px;
    color:var(--of-muted);
    font-size:var(--of-type-support);
}
.sales-mobile-meta span{ min-width:0; overflow-wrap:anywhere; }
.contact-avatar{
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    border:1px solid var(--of-border);
    border-radius:50%;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
}
.contact-profile-details{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0;
    border:1px solid var(--of-border);
    border-radius:11px;
    overflow:hidden;
}
.contact-profile-details>div{ min-width:0; padding:12px 14px; background:var(--of-surface); border-bottom:1px solid var(--of-border); }
.contact-profile-details>div:nth-child(odd){ border-right:1px solid var(--of-border); }
.contact-profile-details>div:nth-last-child(-n/**/+2){ border-bottom:0; }
.contact-profile-details dt{ margin:0; color:var(--of-muted); font-size:var(--of-type-support); font-weight:650; }
.contact-profile-details dd{ margin:3px 0 0; color:var(--of-heading); font-size:var(--of-type-control); font-weight:650; overflow-wrap:anywhere; }
.contact-ledger-record strong{ white-space:nowrap; }

[data-bs-theme="dark"] .sales-filter-chip{ background:color-mix(in srgb,var(--of-primary) 17%,var(--of-surface)); }



@media (max-width:1199.98px) {
    }
@media (max-width:991.98px) {
    .page-workspace-header{ align-items:stretch; }
    .sales-results-card>.card-header{ padding:12px 14px; }
}
@media (max-width:767.98px) {
    .page-workspace-header{ flex-direction:column; }
    .page-workspace-header>.d-flex{ width:100%; }
    .page-workspace-header>.d-flex>.btn{ flex:1 1 auto; }
    .sales-summary-grid{ --bs-gutter-x:.65rem; --bs-gutter-y:.65rem; }
    .sales-summary-grid .card-body{ padding:12px; }
    .sales-summary-icon{ width:36px; height:36px; flex-basis:36px; }
    .sales-mobile-finance-grid{ grid-template-columns:repeat(3,minmax(78px,1fr)); overflow-x:auto; }
        .contact-profile-details{ grid-template-columns:1fr; }
    .contact-profile-details>div, .contact-profile-details>div:nth-child(odd){ border-right:0; border-bottom:1px solid var(--of-border); }
    .contact-profile-details>div:last-child{ border-bottom:0; }
}
@media (max-width:430px) {
    .sales-mobile-record, .contact-mobile-record, .contact-ledger-record{ padding:13px 12px; }
    .sales-mobile-finance-grid{ gap:6px; }
    .sales-mobile-finance-grid>div{ padding:7px 8px; }
}

/* RC54.5 Phase 6 — Products & Inventory UX */
.product-summary-card, .product-filter-card, .product-results-card, .inventory-summary-card, .inventory-filter-card, .inventory-history-card, .inventory-opening-card{ box-shadow:var(--of-shadow-sm); }
.product-summary-card{ overflow:hidden; }
.product-summary-icon{
    width:42px;
    height:42px;
    flex:0 0 42px;
    display:grid;
    place-items:center;
    border-radius:12px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:1.05rem;
}



.product-summary-label, .product-result-caption, .inventory-result-caption, .inventory-row-meta, .product-variation-count, .product-brand-line, .product-subcategory-line, .product-filter-count{ font-size:var(--of-type-support); }
.product-summary-value{ margin-top:2px; color:var(--of-heading); font-size:1.25rem; font-weight:780; letter-spacing:-.025em; line-height:1.2; }
.product-advanced-filter-panel{ border-color:var(--of-border)!important; background:var(--of-surface-2); }
.product-filter-chips{ display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.product-filter-chip{
    display:inline-flex;
    align-items:center;
    gap:6px;
    min-height:30px;
    max-width:100%;
    padding:4px 9px;
    border:1px solid color-mix(in srgb,var(--of-primary) 20%,var(--of-border));
    border-radius:999px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:var(--of-type-support);
    font-weight:650;
    line-height:1.25;
    text-decoration:none;
}
.product-filter-chip>span{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.product-filter-chip:hover{ color:var(--of-primary-hover); border-color:color-mix(in srgb,var(--of-primary) 42%,var(--of-border)); }
.product-filter-chip:focus-visible{ outline:3px solid var(--of-focus-ring-color); outline-offset:2px; }
.product-select-column{ width:44px; }
.product-list-thumb{
    width:48px;
    height:48px;
    flex:0 0 48px;
    display:grid;
    place-items:center;
    overflow:hidden;
    border:1px solid var(--of-border);
    border-radius:10px;
    color:var(--of-muted);
    background:var(--of-surface-3);
}
.product-list-thumb img{ width:100%; height:100%; object-fit:cover; }
.product-table-identity{ min-width:230px; }
.product-name-link, .product-mobile-name{ color:var(--of-heading); font-weight:750; }
.product-name-link:hover, .product-mobile-name:hover{ color:var(--of-primary-text); }
.product-location-summary{ display:inline-block; max-width:210px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:bottom; }
.product-mobile-list, .inventory-mobile-list{ background:var(--of-surface); }
.product-mobile-record, .inventory-mobile-record{ padding:15px 16px; border-bottom:1px solid var(--of-border); }
.product-mobile-record:last-child, .inventory-mobile-record:last-child{ border-bottom:0; }
.product-list-thumb-mobile{ width:52px; height:52px; flex-basis:52px; }
.product-mobile-select{ padding-top:3px; }
.product-mobile-name{ display:block; font-size:.96rem; text-decoration:none; overflow-wrap:anywhere; }
.product-mobile-sku, .inventory-mobile-subtitle{ margin-top:2px; color:var(--of-muted); font-size:var(--of-type-support); overflow-wrap:anywhere; }
.product-mobile-metrics, .inventory-mobile-metrics{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.product-mobile-metrics>div, .inventory-mobile-metrics>div{ min-width:0; padding:9px 10px; border:1px solid var(--of-border); border-radius:9px; background:var(--of-surface-2); }
.product-mobile-metrics span, .product-mobile-metrics strong, .inventory-mobile-metrics span, .inventory-mobile-metrics strong{ display:block; }
.product-mobile-metrics span, .inventory-mobile-metrics span{ color:var(--of-muted); font-size:var(--of-type-support); }
.product-mobile-metrics strong, .inventory-mobile-metrics strong{ margin-top:2px; color:var(--of-heading); font-size:var(--of-type-control); overflow-wrap:anywhere; }
.product-mobile-meta, .inventory-mobile-meta{ display:flex; flex-wrap:wrap; gap:6px 12px; color:var(--of-muted); font-size:var(--of-type-support); }
.product-mobile-meta span, .inventory-mobile-meta span{ display:inline-flex; align-items:flex-start; gap:5px; min-width:0; overflow-wrap:anywhere; }

.product-form-nav{
    position:sticky;
    top:72px;
    z-index:18;
    display:flex;
    gap:7px;
    padding:8px;
    border:1px solid var(--of-border);
    border-radius:12px;
    background:color-mix(in srgb,var(--of-surface) 94%,transparent);
    backdrop-filter:blur(12px);
    box-shadow:var(--of-shadow-sm);
    overflow-x:auto;
}
.product-form-nav a{
    min-height:38px;
    flex:1 0 auto;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:6px 10px;
    border-radius:9px;
    color:var(--of-text);
    font-size:var(--of-type-support);
    font-weight:700;
    text-decoration:none;
    white-space:nowrap;
}
.product-form-nav a:hover{ color:var(--of-primary-text); background:var(--of-primary-soft); }
.product-form-nav a:focus-visible{ outline:3px solid var(--of-focus-ring-color); outline-offset:1px; }
.product-form-nav a span, .product-section-number, .inventory-step-number{
    width:25px;
    height:25px;
    flex:0 0 25px;
    display:grid;
    place-items:center;
    border-radius:8px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:var(--of-type-support);
    font-weight:800;
}
.product-form-card{ scroll-margin-top:132px; }
.product-form-section-header, .inventory-form-heading{ min-height:66px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 16px; }
.product-form-section-header strong, .inventory-form-heading strong{ color:var(--of-heading); font-size:.95rem; }
.product-form-section-header .text-secondary, .inventory-form-heading .text-secondary{ margin-top:2px; font-size:var(--of-type-support); }
.product-form-save-hint{ max-width:540px; display:flex; align-items:flex-start; gap:8px; color:var(--of-muted); font-size:var(--of-type-support); }
.product-form-save-hint i{ color:var(--of-success); font-size:1rem; }
.product-form-action-buttons{ margin-left:auto; }
.product-detail-list dt{ font-weight:700; color:var(--of-heading); }
.product-detail-list dd{ margin-bottom:.35rem; overflow-wrap:anywhere; }
.product-view-image{ min-height:240px; }
.product-view-image img{ object-fit:contain; background:var(--of-surface-3); }
.product-detail-table th{ white-space:nowrap; font-weight:700; }
.product-variation-image{ width:42px; height:42px; object-fit:cover; }
#productViewModal .modal-dialog{ max-width:min(98vw,1720px); }
#productViewModal .modal-body{ min-height:280px; }

.inventory-summary-card{ overflow:hidden; }
.inventory-summary-card .card-body{ padding:14px 16px; }
.inventory-summary-label{ color:var(--of-muted); font-size:var(--of-type-support); font-weight:650; }
.inventory-summary-value{ margin-top:4px; color:var(--of-heading); font-size:1.22rem; font-weight:780; letter-spacing:-.02em; }
.inventory-summary-meta{ margin-top:2px; color:var(--of-muted); font-size:var(--of-type-support); }
.inventory-summary-positive{ border-top:3px solid color-mix(in srgb,var(--of-success) 62%,var(--of-border)); }
.inventory-summary-negative{ border-top:3px solid color-mix(in srgb,var(--of-danger) 62%,var(--of-border)); }
.inventory-filter-feedback{ font-size:var(--of-type-support); }
.inventory-history-table td, .inventory-history-table th, .inventory-opening-table td, .inventory-opening-table th{ white-space:nowrap; }
.inventory-history-table td:nth-child(2), .inventory-history-table th:nth-child(2){ min-width:220px; white-space:normal; }
.inventory-mobile-title{ color:var(--of-heading); font-size:.95rem; font-weight:750; overflow-wrap:anywhere; }
.inventory-mobile-quantity{ margin-top:10px; font-size:1.12rem; font-weight:800; letter-spacing:-.02em; }
.inventory-opening-table .badge{ min-width:34px; }
.stock-adjustment-mobile-list, .stock-transfer-mobile-list{ margin:0 12px 12px; border:1px solid var(--of-border); border-radius:11px; overflow:hidden; }

.inventory-lot-record, .inventory-rack-record{ padding:14px 15px; border-bottom:1px solid var(--of-border); }
.inventory-lot-record:last-child, .inventory-rack-record:last-child{ border-bottom:0; }
.inventory-lot-balance{ display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.inventory-lot-balance span{ padding:4px 7px; border:1px solid var(--of-border); border-radius:999px; background:var(--of-surface-2); color:var(--of-text); font-size:var(--of-type-support); }
.inventory-rack-position{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin-top:10px; }
.inventory-rack-position>div{ padding:7px 8px; border:1px solid var(--of-border); border-radius:8px; background:var(--of-surface-2); }
.inventory-rack-position span, .inventory-rack-position strong{ display:block; }
.inventory-rack-position span{ color:var(--of-muted); font-size:var(--of-type-support); }
.inventory-rack-position strong{ margin-top:1px; color:var(--of-heading); font-size:var(--of-type-control); }

.product-price-table td[data-label]::before{ display:none; }
.product-price-instructions{ display:grid; gap:6px; margin:0; padding-left:1.1rem; color:var(--of-muted); }
.product-price-savebar{ position:sticky; bottom:0; z-index:16; }

[data-bs-theme="dark"] .product-filter-chip{ background:color-mix(in srgb,var(--of-primary) 17%,var(--of-surface)); }



@media(max-width:1199.98px) {
    .product-form-nav{ top:68px; }
}
@media(max-width:991.98px) {
    .product-summary-grid, .inventory-summary-grid{ --bs-gutter-x:.7rem; --bs-gutter-y:.7rem; }
    .product-form-nav a{ flex:0 0 auto; }
    .product-form-actions{ position:static; margin-inline:0; padding:12px 0 0; }
    .product-form-save-hint{ max-width:100%; }
    .product-form-action-buttons{ width:100%; }
    .product-form-action-buttons .btn{ flex:1 1 180px; }
    .inventory-form-actions{ position:static; }
}
@media(max-width:767.98px) {
    .product-summary-card .card-body, .inventory-summary-card .card-body{ padding:12px; }
    .product-summary-icon{ width:36px; height:36px; flex-basis:36px; border-radius:10px; }
    .product-summary-value, .inventory-summary-value{ font-size:1.08rem; }
    .product-form-nav{ position:static; margin-inline:-2px; }
    .product-form-section-header, .inventory-form-heading{ min-height:auto; align-items:flex-start; }
    .product-form-card .card-body{ padding:1rem!important; }
    .product-mobile-record, .inventory-mobile-record{ padding:13px 12px; }
    .product-view-image{ min-height:180px; }
    .inventory-opening-form .card-body{ padding:1rem; }
    .inventory-guidance{ padding:11px 12px; }
}
@media(max-width:575.98px) {
    .product-mobile-metrics, .inventory-mobile-metrics{ grid-template-columns:1fr 1fr; gap:6px; }
    .product-form-action-buttons{ display:grid!important; grid-template-columns:1fr; }
    .product-form-action-buttons .btn{ width:100%; }
    .inventory-form-actions>div:last-child{ width:100%; display:grid!important; grid-template-columns:1fr; }
    .inventory-form-actions .btn{ width:100%; }
}
@media(max-width:430px) {
    .product-summary-grid .col-6, .inventory-summary-grid .col-6{ width:100%; }
    .product-mobile-metrics, .inventory-mobile-metrics{ grid-template-columns:1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .product-form-nav a, .product-filter-chip{ transition:none!important; }
}
@media(max-width:767.98px) {
    .product-price-table-wrap{ overflow:visible; }
    .product-price-table, .product-price-table tbody, .product-price-table tr, .product-price-table td{ display:block; width:100%; }
    .product-price-table thead{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
    .product-price-table tbody{ display:grid; gap:10px; padding:10px; }
    .product-price-table tbody tr{ padding:10px 12px; border:1px solid var(--of-border); border-radius:11px; background:var(--of-surface-2); }
    .product-price-table tbody td{ display:grid; grid-template-columns:105px minmax(0,1fr); align-items:center; gap:10px; padding:7px 0!important; border:0; white-space:normal; }
    .product-price-table tbody td[data-label]::before{ display:block; content:attr(data-label); color:var(--of-muted); font-size:var(--of-type-support); font-weight:650; }
    .product-price-table tbody td[colspan]{ display:block; text-align:center; }
    .product-price-table tbody td[colspan]::before{ display:none; }
    .product-price-table .input-group{ min-width:0; }
    .product-price-savebar{ position:static; }
    .product-price-savebar .btn{ width:100%; }
}

/* RC54.6 Phase 7 — Purchases, Expenses & Finance UX */
.purchase-module-nav, .purchase-filter-card, .purchase-results-card, .purchase-payment-card, .finance-summary-card, .finance-ledger-card{ box-shadow:var(--of-shadow-sm); }
.purchase-module-nav{ background:var(--of-surface-2); }
.purchase-module-nav .card-body{ scrollbar-width:thin; }
.purchase-module-link{
    min-height:40px;
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:7px 12px;
    border:1px solid transparent;
    border-radius:9px;
    color:var(--of-muted);
    background:transparent;
    font-size:var(--of-type-control);
    font-weight:650;
    line-height:1.2;
    text-decoration:none;
    white-space:nowrap;
}
.purchase-module-link:hover{ color:var(--of-heading); background:var(--of-surface); }
.purchase-module-link.active{ color:var(--of-primary-text); border-color:color-mix(in srgb,var(--of-primary) 20%,var(--of-border)); background:var(--of-primary-soft); }
.purchase-module-link:focus-visible{ outline:3px solid var(--of-focus-ring-color); outline-offset:2px; }
.purchase-more-filter-toggle, .expense-more-filter-toggle{ font-weight:700; }
.purchase-advanced-filter-panel, .expense-advanced-filter-panel{ border-color:var(--of-border)!important; }
.purchase-filter-feedback, .expense-filter-chips{ display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.purchase-filter-chip, .expense-filter-chip{
    min-height:30px;
    max-width:100%;
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:4px 9px;
    border:1px solid color-mix(in srgb,var(--of-primary) 20%,var(--of-border));
    border-radius:999px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:var(--of-type-support);
    font-weight:650;
    line-height:1.3;
    text-decoration:none;
}
.purchase-filter-chip span, .expense-filter-chip span{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.purchase-filter-chip:hover, .expense-filter-chip:hover{ color:var(--of-primary-hover); border-color:color-mix(in srgb,var(--of-primary) 42%,var(--of-border)); }
.purchase-summary-card, .finance-summary-card{ overflow:hidden; }
.purchase-summary-card .card-body, .finance-summary-card .card-body{ min-height:112px; display:flex; flex-direction:column; justify-content:center; padding:14px 16px; }
.purchase-summary-card span, .finance-summary-card span{ color:var(--of-muted); font-size:var(--of-type-support); font-weight:650; }
.purchase-summary-card strong, .finance-summary-card strong{ margin-top:4px; color:var(--of-heading); font-size:1.18rem; font-weight:780; letter-spacing:-.02em; line-height:1.25; overflow-wrap:anywhere; }
.purchase-summary-card small, .finance-summary-card small{ margin-top:3px; color:var(--of-muted); font-size:var(--of-type-support); }
.purchase-summary-success, .finance-summary-success{ border-top:3px solid color-mix(in srgb,var(--of-success) 65%,var(--of-border)); }
.purchase-summary-warning, .finance-summary-warning{ border-top:3px solid color-mix(in srgb,var(--of-warning) 68%,var(--of-border)); }
.finance-summary-danger{ border-top:3px solid color-mix(in srgb,var(--of-danger) 68%,var(--of-border)); }
.purchase-table th{ white-space:nowrap; }
.purchase-mobile-list, .expense-mobile-list, .finance-mobile-list{ background:var(--of-surface); }
.purchase-mobile-record, .expense-mobile-record, .finance-mobile-record, .finance-account-record{ padding:15px 16px; border-bottom:1px solid var(--of-border); }
.purchase-mobile-record:last-child, .expense-mobile-record:last-child, .finance-mobile-record:last-child, .finance-account-record:last-child{ border-bottom:0; }
.purchase-mobile-reference, .expense-mobile-reference, .finance-mobile-title{ color:var(--of-heading); font-size:.96rem; font-weight:760; line-height:1.25; text-decoration:none; overflow-wrap:anywhere; }
a.purchase-mobile-reference:hover{ color:var(--of-primary-text); }
.purchase-mobile-supplier, .expense-mobile-title{ margin-top:2px; color:var(--of-text); font-size:var(--of-type-control); }
.purchase-mobile-meta, .expense-mobile-meta, .finance-mobile-meta{ display:flex; flex-wrap:wrap; gap:6px 12px; color:var(--of-muted); font-size:var(--of-type-support); }
.purchase-mobile-finance-grid, .expense-mobile-finance-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.purchase-mobile-finance-grid>div, .expense-mobile-finance-grid>div{ min-width:0; padding:8px 9px; border:1px solid var(--of-border); border-radius:9px; background:var(--of-surface-2); }
.purchase-mobile-finance-grid span, .purchase-mobile-finance-grid strong, .expense-mobile-finance-grid span, .expense-mobile-finance-grid strong{ display:block; }
.purchase-mobile-finance-grid span, .expense-mobile-finance-grid span{ color:var(--of-muted); font-size:var(--of-type-support); }
.purchase-mobile-finance-grid strong, .expense-mobile-finance-grid strong{ margin-top:2px; color:var(--of-heading); font-size:var(--of-type-control); overflow-wrap:anywhere; }
.purchase-mobile-wide-metric{ grid-column:span 2; }
.purchase-payment-icon{ width:38px; height:38px; flex:0 0 38px; display:grid; place-items:center; border-radius:10px; color:var(--of-primary-text); background:var(--of-primary-soft); }
.purchase-detail-balance{ min-width:180px; display:flex; flex-direction:column; align-items:flex-end; gap:4px; }
.purchase-detail-balance>span:first-child{ color:var(--of-muted); font-size:var(--of-type-support); }
.purchase-detail-balance strong{ color:var(--of-heading); font-size:1.45rem; font-weight:800; letter-spacing:-.03em; }
.purchase-entry-table{ min-width:980px; }
.purchase-entry-product-column{ min-width:250px; }
.expense-list-card>.card-header{ min-height:auto; }
.expense-table-wrap{ margin:0; border-inline:0; border-bottom:0; }
.expense-filter-chips{ font-size:var(--of-type-support); }
.expense-mobile-title{ font-weight:650; }
.finance-mobile-amount{ flex:0 0 auto; color:var(--of-heading); font-size:1rem; font-weight:800; white-space:nowrap; }
.finance-payment-form-card{ position:sticky; top:82px; box-shadow:var(--of-shadow-sm); }
.finance-note-cell{ max-width:260px; white-space:normal; }

.pl-page-size{ width:82px; }
.pl-analysis-tab[aria-selected="true"]{ font-weight:750; }

[data-bs-theme="dark"] .purchase-filter-chip, [data-bs-theme="dark"] .expense-filter-chip{ background:color-mix(in srgb,var(--of-primary) 17%,var(--of-surface)); }

@media(max-width:1199.98px) {
    .finance-payment-form-card{ position:static; }
    }
@media(max-width:991.98px) {
    .purchase-results-card>.card-header, .finance-ledger-card>.card-header{ padding:12px 14px; }
    .purchase-detail-balance{ align-items:flex-start; min-width:0; }
}
@media(max-width:767.98px) {
    .purchase-module-nav .card-body{ flex-wrap:nowrap; overflow-x:auto; }
    .purchase-summary-grid, .finance-summary-grid{ --bs-gutter-x:.65rem; --bs-gutter-y:.65rem; }
    .purchase-summary-card .card-body, .finance-summary-card .card-body{ min-height:100px; padding:12px; }
    .purchase-summary-card strong, .finance-summary-card strong{ font-size:1.08rem; }
    .purchase-detail-actions .btn{ flex:1 1 180px; }
    
}
@media(max-width:575.98px) {
    .purchase-mobile-finance-grid, .expense-mobile-finance-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
    .purchase-mobile-wide-metric{ grid-column:span 1; }
            .purchase-payment-card .card-footer .btn, .finance-payment-form-card .btn-primary{ width:100%; }
}
@media(max-width:430px) {
    .purchase-summary-grid .col-6, .finance-summary-grid .col-6{ width:100%; }
    .purchase-mobile-finance-grid, .expense-mobile-finance-grid{ grid-template-columns:1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .purchase-filter-chip, .expense-filter-chip, .purchase-module-link{ transition:none!important; }
}

/* RC54.7 Phase 8 — Settings, Users, Roles & Administration UX */
.admin-workspace-nav{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
    padding:8px;
    border:1px solid var(--of-border);
    border-radius:13px;
    background:var(--of-surface);
    box-shadow:var(--of-shadow-sm);
}
.admin-workspace-heading{ flex:0 0 auto; display:flex; flex-direction:column; padding:2px 8px 2px 6px; border-right:1px solid var(--of-border); }
.admin-workspace-kicker{ color:var(--of-heading); font-size:var(--of-type-support); font-weight:800; letter-spacing:.02em; }
.admin-workspace-context{ color:var(--of-muted); font-size:var(--of-type-support); }
.admin-workspace-links{ min-width:0; display:flex; gap:5px; overflow-x:auto; scrollbar-width:thin; }
.admin-workspace-link{ min-height:38px; flex:0 0 auto; display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid transparent; border-radius:9px; color:var(--of-muted); font-size:var(--of-type-control); font-weight:650; line-height:1.2; text-decoration:none; white-space:nowrap; }
.admin-workspace-link:hover{ color:var(--of-heading); background:var(--of-surface-2); }
.admin-workspace-link.active{ color:var(--of-primary-text); border-color:color-mix(in srgb,var(--of-primary) 20%,var(--of-border)); background:var(--of-primary-soft); }
.admin-workspace-link:focus-visible{ outline:3px solid var(--of-focus-ring-color); outline-offset:2px; }
.admin-summary-card, .admin-filter-card, .admin-results-card, .admin-form-card, .admin-choice-card, .admin-role-card{ box-shadow:var(--of-shadow-sm); }
.admin-summary-card{ overflow:hidden; }
.admin-summary-card .card-body{ min-height:105px; padding:14px 16px; }
.admin-summary-icon{ width:40px; height:40px; flex:0 0 40px; display:grid; place-items:center; border-radius:11px; color:var(--of-primary-text); background:var(--of-primary-soft); font-size:1.02rem; }
.admin-summary-label{ color:var(--of-muted); font-size:var(--of-type-support); font-weight:650; }
.admin-summary-value{ margin-top:2px; color:var(--of-heading); font-size:1.2rem; font-weight:800; letter-spacing:-.025em; line-height:1.2; }
.admin-summary-hint{ margin-top:3px; color:var(--of-muted); font-size:var(--of-type-support); line-height:1.35; }
.admin-filter-feedback{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:var(--of-type-support); }
.admin-avatar{ width:40px; height:40px; flex:0 0 40px; display:grid; place-items:center; border-radius:50%; color:var(--of-primary-text); background:var(--of-primary-soft); font-size:var(--of-type-control); font-weight:800; }
.admin-mobile-list{ background:var(--of-surface); }
.admin-mobile-record{ padding:15px 16px; border-bottom:1px solid var(--of-border); }
.admin-mobile-record:last-child{ border-bottom:0; }
.admin-mobile-title{ color:var(--of-heading); font-size:.96rem; font-weight:760; line-height:1.3; overflow-wrap:anywhere; }
.admin-mobile-subtitle{ margin-top:2px; color:var(--of-muted); font-size:var(--of-type-support); overflow-wrap:anywhere; }
.admin-mobile-meta{ display:flex; flex-wrap:wrap; gap:7px 12px; color:var(--of-muted); font-size:var(--of-type-support); }
.admin-mobile-meta span{ min-width:0; display:inline-flex; align-items:flex-start; gap:5px; overflow-wrap:anywhere; }
.admin-mobile-metrics{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.admin-mobile-metrics>div{ min-width:0; padding:8px 9px; border:1px solid var(--of-border); border-radius:9px; background:var(--of-surface-2); }
.admin-mobile-metrics span, .admin-mobile-metrics strong{ display:block; }
.admin-mobile-metrics span{ color:var(--of-muted); font-size:var(--of-type-support); }
.admin-mobile-metrics strong{ margin-top:2px; color:var(--of-heading); font-size:var(--of-type-support); font-weight:700; overflow-wrap:anywhere; }
.admin-empty-state{ min-height:190px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; padding:28px 20px; color:var(--of-muted); text-align:center; }
.admin-empty-state>i{ font-size:1.7rem; }
.admin-empty-state>strong{ color:var(--of-heading); }
.admin-empty-state>span{ max-width:420px; font-size:var(--of-type-support); }
.admin-form-card>.card-header, .admin-choice-card>.card-header{ display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:64px; padding:12px 16px; }
.admin-switch-panel{ padding:11px 12px; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface-2); }
.admin-switch-panel small{ display:block; margin-top:4px; color:var(--of-muted); font-size:var(--of-type-support); line-height:1.35; }
.admin-choice-list{ max-height:330px; display:grid; gap:7px; overflow:auto; scrollbar-width:thin; }
.admin-choice-item{ min-height:44px; display:flex; align-items:flex-start; gap:10px; padding:9px 10px; border:1px solid var(--of-border); border-radius:9px; background:var(--of-surface); cursor:pointer; }
.admin-choice-item:hover{ border-color:color-mix(in srgb,var(--of-primary) 36%,var(--of-border)); background:var(--of-surface-2); }
.admin-choice-item .form-check-input{ flex:0 0 auto; margin-top:3px; }
.admin-choice-item span{ min-width:0; }
.admin-choice-item strong{ display:block; color:var(--of-heading); font-size:var(--of-type-control); font-weight:700; overflow-wrap:anywhere; }
.admin-choice-item small{ display:block; margin-top:2px; color:var(--of-muted); font-size:var(--of-type-support); }
.admin-form-savebar{ position:sticky; bottom:10px; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 12px 10px 15px; border:1px solid var(--of-border); border-radius:12px; background:color-mix(in srgb,var(--of-surface) 95%,transparent); backdrop-filter:blur(12px); box-shadow:0 12px 30px rgba(var(--of-shadow-ink-rgb),.12); }
.admin-form-savebar>div:first-child{ min-width:0; }
.admin-form-savebar strong, .admin-form-savebar small{ display:block; }
.admin-form-savebar small{ margin-top:2px; color:var(--of-muted); font-size:var(--of-type-support); }
.admin-role-card .card-footer{ padding:12px 16px; }
.admin-role-icon{ width:38px; height:38px; display:grid; place-items:center; border-radius:10px; color:var(--of-primary-text); background:var(--of-primary-soft); }
.admin-guidance-panel{ min-height:44px; display:flex; align-items:flex-start; gap:9px; padding:10px 12px; border:1px solid var(--of-border); border-radius:10px; color:var(--of-text); background:var(--of-surface-2); font-size:var(--of-type-support); line-height:1.4; }
.admin-guidance-panel>i{ flex:0 0 auto; color:var(--of-primary-text); font-size:1rem; }
.admin-permission-option{ min-height:40px; display:flex; align-items:flex-start; gap:9px; padding:7px 8px; border-radius:8px; cursor:pointer; }
.admin-permission-option:hover{ background:var(--of-surface-2); }
.admin-permission-option .form-check-input{ flex:0 0 auto; margin-top:2px; }
.admin-permission-option span{ color:var(--of-text); font-size:var(--of-type-support); line-height:1.35; overflow-wrap:anywhere; }
.admin-permission-empty{ min-height:170px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; color:var(--of-muted); text-align:center; }
.admin-inline-editor{ padding:14px; border:1px solid var(--of-border); background:var(--of-surface-2); }
.admin-status-pill{ min-height:42px; display:flex; align-items:center; gap:7px; padding:7px 11px; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface); color:var(--of-muted); font-size:var(--of-type-support); }
.admin-status-pill strong{ color:var(--of-heading); }
.admin-backup-failure{ max-width:280px; white-space:normal; }

@media(max-width:991.98px) {
    .admin-workspace-nav{ align-items:stretch; flex-direction:column; gap:6px; }
    .admin-workspace-heading{ flex-direction:row; align-items:baseline; gap:8px; border-right:0; border-bottom:1px solid var(--of-border); padding:3px 6px 7px; }
    .admin-workspace-links{ padding-bottom:1px; }
    .admin-form-savebar{ position:static; }
}
@media(max-width:767.98px) {
    .admin-summary-grid{ --bs-gutter-x:.65rem; --bs-gutter-y:.65rem; }
    .admin-summary-card .card-body{ min-height:96px; padding:12px; }
    .admin-summary-hint{ display:none; }
    .admin-form-savebar{ align-items:stretch; flex-direction:column; }
    .admin-form-savebar .d-flex{ width:100%; }
    .admin-form-savebar .btn{ flex:1 1 auto; }
    }
@media(max-width:430px) {
    .admin-summary-grid>.col-6{ width:100%; }
    .admin-mobile-record{ padding:13px 12px; }
    .admin-mobile-metrics{ grid-template-columns:1fr; }
    .admin-workspace-heading{ display:none; }
    .admin-workspace-nav{ padding:6px; }
}
@media(pointer:coarse) {
    .admin-workspace-link, .admin-permission-option, .admin-choice-card .btn-sm{ min-height:44px; }
}
@media(prefers-reduced-motion:reduce) {
    .admin-workspace-link, .admin-choice-item{ transition:none!important; }
}

/* RC54.8 Phase 9 — App-wide mobile responsive pass */
body:not(.pos-body) .table-responsive{
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-inline:contain;
    scrollbar-width:thin;
}
body:not(.pos-body) .of-mobile-table-wrap{
    overflow:visible;
    border-radius:0;
}
body:not(.pos-body) .of-mobile-scroll{
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-inline:contain;
    scrollbar-width:thin;
}
body:not(.pos-body) .of-mobile-scroll > *{ flex:0 0 auto; }
body:not(.pos-body) .of-mobile-table td[data-mobile-label]::before{ content:none; }

@media(max-width:1024px) {
    body:not(.pos-body) .app-content{ padding-inline:15px; }
            body:not(.pos-body) .card-header.d-flex, body:not(.pos-body) .card-footer.d-flex{ flex-wrap:wrap; }
    body:not(.pos-body) .dropdown-menu{ max-width:calc(100vw - 30px); }
}

@media(max-width:767.98px) {
    body:not(.pos-body) .app-content{
        padding:14px 12px calc(24px + env(safe-area-inset-bottom));
    }
    body:not(.pos-body) .app-topbar{
        padding-left:max(12px, env(safe-area-inset-left));
        padding-right:max(12px, env(safe-area-inset-right));
    }
    body:not(.pos-body) .app-footer{
        padding-left:max(12px, env(safe-area-inset-left));
        padding-right:max(12px, env(safe-area-inset-right));
        padding-bottom:max(14px, env(safe-area-inset-bottom));
    }
                
    body:not(.pos-body) .nav-tabs, body:not(.pos-body) .nav-pills, body:not(.pos-body) .admin-workspace-links, body:not(.pos-body) .purchase-module-nav{
        flex-wrap:nowrap;
        max-width:100%;
        overflow-x:auto;
        overflow-y:hidden;
        -webkit-overflow-scrolling:touch;
        overscroll-behavior-inline:contain;
        scrollbar-width:thin;
    }
    body:not(.pos-body) .nav-tabs .nav-link, body:not(.pos-body) .nav-pills .nav-link{ white-space:nowrap; }

    body:not(.pos-body) .pagination{
        width:100%;
        max-width:100%;
        justify-content:flex-start;
        flex-wrap:nowrap;
        overflow-x:auto;
        overflow-y:hidden;
        padding-bottom:3px;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:thin;
    }
    body:not(.pos-body) .pagination .page-item{ flex:0 0 auto; }

    body:not(.pos-body) .form-control:not([type="color"]), body:not(.pos-body) .form-select, body:not(.pos-body) textarea.form-control, body:not(.pos-body) input[type="search"]{
        font-size:16px;
    }
    body:not(.pos-body) textarea.form-control{ min-height:110px; }
    body:not(.pos-body) input[type="date"], body:not(.pos-body) input[type="datetime-local"], body:not(.pos-body) input[type="time"]{ min-width:0; width:100%; }

    body:not(.pos-body) .modal-dialog:not(.modal-fullscreen):not(.modal-fullscreen-sm-down):not(.modal-fullscreen-md-down){
        width:calc(100% - 16px);
        max-width:calc(100% - 16px);
        margin:8px auto;
    }
    body:not(.pos-body) .modal-content{ max-height:calc(100dvh - 16px); }
    body:not(.pos-body) .modal-body{ min-height:0; overflow-y:auto; overscroll-behavior:contain; }
    body:not(.pos-body) .modal-footer{ gap:8px; }
    body:not(.pos-body) .offcanvas{ --bs-offcanvas-width:min(92vw,380px); }
    body:not(.pos-body) .offcanvas.offcanvas-bottom{ --bs-offcanvas-height:min(82dvh,660px); }
    body:not(.pos-body) .dropdown-menu{ max-width:calc(100vw - 24px); }
    
    body:not(.pos-body) .btn-group.of-mobile-scroll, body:not(.pos-body) .btn-toolbar.of-mobile-scroll{ flex-wrap:nowrap; }

    /* Generic read-only table cards. JS opts in only simple tables and leaves entry/edit grids untouched. */
    body:not(.pos-body) .of-mobile-table{
        width:100%;
        border-collapse:separate;
        border-spacing:0;
    }
    body:not(.pos-body) .of-mobile-table > thead{
        position:absolute;
        width:1px;
        height:1px;
        padding:0;
        margin:-1px;
        overflow:hidden;
        clip:rect(0,0,0,0);
        white-space:nowrap;
        border:0;
    }
    body:not(.pos-body) .of-mobile-table > tbody{
        display:grid;
        gap:10px;
        width:100%;
    }
    body:not(.pos-body) .of-mobile-table > tbody > tr{
        display:block;
        width:100%;
        padding:4px 12px;
        border:1px solid var(--of-border);
        border-radius:12px;
        background:var(--of-surface);
        box-shadow:var(--of-shadow-sm);
    }
    body:not(.pos-body) .of-mobile-table > tbody > tr:hover{ background:var(--of-surface); }
    body:not(.pos-body) .of-mobile-table > tbody > tr > td{
        min-width:0;
        display:grid;
        grid-template-columns:minmax(96px,36%) minmax(0,1fr);
        align-items:start;
        gap:10px;
        width:100%;
        padding:9px 0;
        border:0;
        border-bottom:1px solid var(--of-border);
        text-align:right;
        white-space:normal;
        overflow-wrap:anywhere;
    }
    body:not(.pos-body) .of-mobile-table > tbody > tr > td:last-child{ border-bottom:0; }
    body:not(.pos-body) .of-mobile-table > tbody > tr > td[data-mobile-label]::before{
        content:attr(data-mobile-label);
        display:block;
        color:var(--of-muted);
        font-size:var(--of-type-support);
        font-weight:700;
        line-height:1.35;
        text-align:left;
        text-transform:none;
        letter-spacing:0;
    }
    body:not(.pos-body) .of-mobile-table > tbody > tr > td > *{ min-width:0; }
    body:not(.pos-body) .of-mobile-table > tbody > tr > td[data-mobile-actions="true"]{
        grid-template-columns:1fr;
        justify-items:stretch;
        padding-top:10px;
    }
    body:not(.pos-body) .of-mobile-table > tbody > tr > td[data-mobile-actions="true"]::before{ display:none; }
    body:not(.pos-body) .of-mobile-table > tbody > tr > td[data-mobile-actions="true"] .btn-group, body:not(.pos-body) .of-mobile-table > tbody > tr > td[data-mobile-actions="true"] > .d-flex, body:not(.pos-body) .of-mobile-table > tbody > tr > td[data-mobile-actions="true"] > form{ width:100%; }
    body:not(.pos-body) .of-mobile-table > tbody > tr > td.of-mobile-table-empty{
        display:block;
        padding:24px 6px;
        text-align:center;
        border-bottom:0;
    }
    body:not(.pos-body) .of-mobile-table > tbody > tr > td.of-mobile-table-empty::before{ display:none; }
}

@media(max-width:575.98px) {
        body:not(.pos-body) .modal-footer{
        display:grid;
        grid-template-columns:1fr;
    }
    body:not(.pos-body) .modal-footer > .btn, body:not(.pos-body) .modal-footer > form, body:not(.pos-body) .modal-footer > form > .btn{ width:100%; margin:0; }
    body:not(.pos-body) .card-header.d-flex > .btn, body:not(.pos-body) .card-header.d-flex > .dropdown{ max-width:100%; }
    body:not(.pos-body) .of-mobile-table > tbody > tr{ padding-inline:10px; border-radius:10px; }
    body:not(.pos-body) .of-mobile-table > tbody > tr > td{ grid-template-columns:minmax(88px,42%) minmax(0,1fr); gap:8px; }
}

@media(max-width:390px) {
    body:not(.pos-body) .app-content{ padding-inline:10px; }
    body:not(.pos-body) .card-body{ padding:.8rem; }
        body:not(.pos-body) .of-mobile-table > tbody > tr > td{ grid-template-columns:1fr; gap:4px; text-align:left; }
}

@media(pointer:coarse) {
    body:not(.pos-body) .pagination .page-link, body:not(.pos-body) .nav-tabs .nav-link, body:not(.pos-body) .nav-pills .nav-link{ min-height:44px; display:flex; align-items:center; }
}

/* RC54.9 Phase 10 — Light/Dark & accessibility regression hardening */
:root, [data-bs-theme="light"], [data-bs-theme="dark"]{
    --bs-body-color:var(--of-text);
    --bs-body-bg:var(--of-bg);
    --bs-emphasis-color:var(--of-heading);
    --bs-secondary-color:var(--of-muted);
    --bs-secondary-bg:var(--of-surface-2);
    --bs-tertiary-bg:var(--of-surface-3);
    --bs-border-color:var(--of-border);
    --bs-link-color:var(--of-primary-text);
    --bs-link-hover-color:var(--of-primary-text-hover);
}
body:not(.pos-body) .text-success{ color:var(--of-success-text)!important; }
body:not(.pos-body) .text-warning{ color:var(--of-warning-text)!important; }
body:not(.pos-body) .text-danger{ color:var(--of-danger-text)!important; }
body:not(.pos-body) .text-info{ color:var(--of-info-text)!important; }
body:not(.pos-body) .app-alert{ align-items:flex-start; }
body:not(.pos-body) .app-alert[role="alert"]{ border-color:color-mix(in srgb,var(--of-danger) 34%,var(--of-border)); }
body:not(.pos-body) .app-alert[role="status"]{ border-color:color-mix(in srgb,var(--of-success) 30%,var(--of-border)); }
body:not(.pos-body) .form-control:focus-visible, body:not(.pos-body) .form-select:focus-visible, body:not(.pos-body) .form-check-input:focus-visible, body:not(.pos-body) summary:focus-visible, .auth-body .form-control:focus-visible, .auth-body .form-select:focus-visible, .auth-body .form-check-input:focus-visible{
    outline:3px solid var(--of-focus-ring-color);
    outline-offset:2px;
}
body:not(.pos-body) [aria-invalid="true"], .auth-body [aria-invalid="true"]{
    border-color:var(--of-danger-text)!important;
    box-shadow:0 0 0 .15rem color-mix(in srgb,var(--of-danger) 16%,transparent)!important;
}
.remote-select[aria-busy="true"] .form-control{ cursor:progress; }
.remote-select-status{ position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.remote-select-results [data-remote-message="error"]{ color:var(--of-danger-text); }
[data-bs-theme="dark"] .btn-close{ filter:var(--bs-btn-close-white-filter); opacity:.78; }
[data-bs-theme="dark"] .btn-close:hover, [data-bs-theme="dark"] .btn-close:focus{ opacity:1; }
@media (prefers-contrast: more) {
    :root{ --of-border:#c9ced8; --of-border-strong:#adb5c2; --of-focus-ring-color:color-mix(in srgb,var(--of-primary-text) 70%,transparent); }
    [data-bs-theme="dark"]{ --of-border:#536176; --of-border-strong:#748198; }
    body:not(.pos-body) .btn, body:not(.pos-body) .form-control, body:not(.pos-body) .form-select, body:not(.pos-body) .card, body:not(.pos-body) .dropdown-menu{ border-width:2px; }
}
@media (forced-colors: active) {
    body:not(.pos-body) :focus-visible, .auth-body :focus-visible{ outline:2px solid Highlight!important; outline-offset:2px!important; }
    body:not(.pos-body) .badge, body:not(.pos-body) .btn, body:not(.pos-body) .card{ forced-color-adjust:auto; }
}

/* RC54.16 — Register Report & Contact Action Workflows */
.contact-actions-dropdown{ display:inline-block; text-align:left; }
.contact-actions-trigger{ min-width:92px; justify-content:center; }
.contact-actions-menu{ min-width:220px; padding:.45rem; border-color:var(--of-border); box-shadow:var(--of-shadow-sm); }
.contact-actions-menu .dropdown-item{ display:flex; align-items:center; gap:10px; min-height:38px; padding:7px 10px; border-radius:7px; color:var(--of-text); font-size:var(--of-type-control); }
.contact-actions-menu .dropdown-item i{ width:18px; color:var(--of-muted); font-size:1rem; text-align:center; }
.contact-actions-menu .dropdown-item:hover, .contact-actions-menu .dropdown-item:focus{ color:var(--of-heading); background:var(--of-surface-2); }
.contact-actions-menu .dropdown-item.text-danger, .contact-actions-menu .dropdown-item.text-danger i{ color:var(--bs-danger)!important; }
.contact-actions-menu form{ margin:0; }
.contact-related-card{ scroll-margin-top:90px; box-shadow:var(--of-shadow-sm); }
.contact-note-panel{ padding:12px 14px; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface-2); overflow-wrap:anywhere; }
.contact-document-list .list-group-item{ background:transparent; border-color:var(--of-border); }
#ledger, #customer-payment, #supplier-payment, #stock-report, #documents-notes{ scroll-margin-top:90px; }

/* RC54.16.2 — Report module table viewport hardening */
body.reports-route{
    overflow-x:hidden;
}
.reports-route .app-workspace, .reports-route .app-content, .reports-route .app-content > *, .reports-route .pl-page{
    min-width:0;
    width:100%;
    max-width:100%;
}
.reports-route .row > [class*="col-"]{
    min-width:0;
}
.reports-route .card, .reports-route .report-table-card, .reports-route .pl-analysis-card{
    min-width:0;
    max-width:100%;
}
.reports-route .table-responsive, .reports-route .report-table-scroll{
    display:block;
    min-width:0;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-inline:contain;
    scrollbar-width:thin;
}
.reports-route .table-responsive > table.table, .reports-route .report-table-scroll > table.table{
    width:max-content;
    min-width:100%;
    max-width:none;
    margin-bottom:0;
}
.reports-route .table-responsive > table.table > thead > tr > th, .reports-route .report-table-scroll > table.table > thead > tr > th{
    white-space:nowrap;
}
.reports-route .table-responsive > table.table > tbody > tr > td, .reports-route .report-table-scroll > table.table > tbody > tr > td{
    vertical-align:middle;
}
.reports-route .card-header.d-flex, .reports-route .card-footer.d-flex{
    min-width:0;
    flex-wrap:wrap;
    gap:.5rem;
}
.reports-route .card-header > *, .reports-route .card-footer > *{
    min-width:0;
}


.reports-route .pagination{
    max-width:100%;
}
@media (max-width:991.98px) {
    .reports-route .table-responsive > table.table, .reports-route .report-table-scroll > table.table{
        font-size:.8rem;
    }
}
@media (max-width:767.98px) {
    .reports-route .table-responsive.of-mobile-table-wrap{
        overflow:visible!important;
    }
    .reports-route .table-responsive > table.table.of-mobile-table{
        width:100%;
        min-width:100%;
        max-width:100%;
    }
    .reports-route .pagination{
        flex-wrap:nowrap;
        overflow-x:auto;
        overflow-y:hidden;
    }
}
@media (max-width:575.98px) {
    .reports-route .table-responsive, .reports-route .report-table-scroll{
        margin-inline:0;
    }
    .reports-route .table-responsive > table.table, .reports-route .report-table-scroll > table.table{
        font-size:.76rem;
    }
    .reports-route .table-responsive > table.table th, .reports-route .table-responsive > table.table td, .reports-route .report-table-scroll > table.table th, .reports-route .report-table-scroll > table.table td{
        padding:.55rem .65rem;
    }
}
@media print {
    body.reports-route{
        overflow:visible!important;
    }
    .reports-route .table-responsive, .reports-route .report-table-scroll{
        overflow:visible!important;
        max-height:none!important;
    }
    .reports-route .table-responsive > table.table, .reports-route .report-table-scroll > table.table{
        width:100%;
        min-width:0;
        max-width:100%;
        font-size:8px;
        white-space:normal;
    }
    .reports-route .table-responsive > table.table > thead > tr > th, .reports-route .report-table-scroll > table.table > thead > tr > th{
        white-space:normal;
    }
}

/* RC54.22.1 — elevated button treatment is POS-only. */
body.pos-body .btn, body.pos-body button.btn{
    box-shadow: 0 5px 12px rgba(var(--of-shadow-ink-rgb), .11), 0 1px 2px rgba(var(--of-shadow-ink-rgb), .08);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}
body.pos-body .btn:hover:not(:disabled), body.pos-body button.btn:hover:not(:disabled){
    transform: translateY(-1px);
    box-shadow: 0 9px 20px rgba(var(--of-shadow-ink-rgb), .14), 0 2px 4px rgba(var(--of-shadow-ink-rgb), .08);
}
body.pos-body .btn:active:not(:disabled), body.pos-body button.btn:active:not(:disabled){
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(var(--of-shadow-ink-rgb), .10);
}
body.pos-body .btn-link{
    box-shadow: none;
}
body:not(.pos-body) .btn, body:not(.pos-body) button.btn{
    box-shadow: none !important;
    transform: none !important;
}
body:not(.pos-body) .btn:hover:not(:disabled), body:not(.pos-body) button.btn:hover:not(:disabled), body:not(.pos-body) .btn:active:not(:disabled), body:not(.pos-body) button.btn:active:not(:disabled){
    box-shadow: none !important;
    transform: none !important;
}

body:not(.pos-body) .form-label.of-icon-label, body:not(.pos-body) label.of-icon-label, .modal .form-label.of-icon-label, .modal label.of-icon-label{
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .55rem;
    color: var(--of-heading, var(--bs-body-color));
    font-size: .93rem;
    font-weight: 650;
    letter-spacing: .002em;
}
.of-form-label-icon{
    width: 1.05rem;
    flex: 0 0 1.05rem;
    color: var(--of-muted, var(--bs-secondary-color));
    font-size: 1rem;
    line-height: 1;
    text-align: center;
}
body:not(.pos-body) .form-control:not([type="color"]), body:not(.pos-body) .form-select, .modal .form-control:not([type="color"]), .modal .form-select{
    min-height: 48px;
    padding: .68rem .9rem;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--of-border-strong, var(--bs-border-color)) 84%, transparent);
    background-color: var(--of-surface, var(--bs-body-bg));
    box-shadow: 0 2px 7px rgba(var(--of-shadow-ink-rgb), .045);
}
body:not(.pos-body) textarea.form-control, .modal textarea.form-control{
    min-height: 112px;
    resize: vertical;
}
body:not(.pos-body) .form-control:focus, body:not(.pos-body) .form-select:focus, .modal .form-control:focus, .modal .form-select:focus{
    border-color: color-mix(in srgb, var(--of-primary, var(--bs-primary)) 58%, var(--of-border, var(--bs-border-color)));
    box-shadow: 0 0 0 .22rem color-mix(in srgb, var(--of-primary, var(--bs-primary)) 11%, transparent), 0 5px 13px rgba(var(--of-shadow-ink-rgb), .07);
}
body:not(.pos-body) .input-group > .input-group-text, .modal .input-group > .input-group-text{
    min-height: 48px;
    border-color: color-mix(in srgb, var(--of-border-strong, var(--bs-border-color)) 84%, transparent);
    background: var(--of-surface-2, var(--bs-tertiary-bg));
}
body:not(.pos-body) .input-group > .input-group-text:first-child, .modal .input-group > .input-group-text:first-child{ border-radius: 14px 0 0 14px; }
body:not(.pos-body) .input-group > .form-control:last-child, body:not(.pos-body) .input-group > .form-select:last-child, .modal .input-group > .form-control:last-child, .modal .input-group > .form-select:last-child{ border-radius: 0 14px 14px 0; }

.quick-contact-modal .modal-content, .sales-quick-payment-modal .modal-content{
    border: 0;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(var(--of-shadow-ink-rgb), .22);
    overflow: hidden;
}
.quick-contact-modal .modal-header, .sales-quick-payment-modal .modal-header{
    padding: 1.15rem 1.25rem;
    border-bottom-color: var(--of-border, var(--bs-border-color));
}
.quick-contact-modal .modal-body, .sales-quick-payment-modal .modal-body{ padding: 1.25rem; }
.quick-contact-modal .modal-footer, .sales-quick-payment-modal .modal-footer{ padding: 1rem 1.25rem; }

.sales-payment-status-trigger{
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}
.sales-payment-status-trigger .badge{
    box-shadow: none;
    transition: opacity .15s ease;
}
.sales-payment-status-trigger:hover .badge, .sales-payment-status-trigger:focus-visible .badge{
    transform: none;
    box-shadow: none;
    opacity: .88;
}

@media (max-width: 767.98px) {  }

[data-customer-debt-banner]{
    display:flex;
    align-items:center;
    gap:.55rem;
    border-radius:999px;
    padding:.42rem .75rem;
    font-size:.78rem;
    font-weight:700;
    border:1px solid color-mix(in srgb,var(--of-danger) 30%, transparent);
    background:color-mix(in srgb,var(--of-danger) 8%, var(--bs-body-bg));
    color:var(--of-danger-text);
}
[data-customer-debt-banner].is-clear{
    border-color:color-mix(in srgb,var(--of-success) 28%,transparent);
    background:color-mix(in srgb,var(--of-success) 8%,var(--bs-body-bg));
    color:var(--of-success-text);
}
[data-bs-theme="dark"] [data-customer-debt-banner]{ color:var(--of-danger-text); }
[data-bs-theme="dark"] [data-customer-debt-banner].is-clear{ color:var(--of-success-text); }

@media (prefers-reduced-motion: reduce) {
    body.pos-body .btn, body.pos-body button.btn, .sales-payment-status-trigger .badge{ transition:none!important; transform:none!important; }
}

/* RC54.22.1 — non-Bootstrap raised buttons are also POS-only. */
body.pos-body button:not(.btn-close):not(.dropdown-item):not(.nav-link):not(.accordion-button):not(.form-check-input){
    box-shadow: 0 7px 16px rgba(var(--of-shadow-ink-rgb), .13), 0 2px 4px rgba(var(--of-shadow-ink-rgb), .08);
}
body.pos-body button:not(.btn-close):not(.dropdown-item):not(.nav-link):not(.accordion-button):not(.form-check-input):hover:not(:disabled){
    box-shadow: 0 11px 24px rgba(var(--of-shadow-ink-rgb), .17), 0 3px 6px rgba(var(--of-shadow-ink-rgb), .09);
}
body:not(.pos-body) button:not(.btn-close):not(.dropdown-item):not(.nav-link):not(.accordion-button):not(.form-check-input){
    box-shadow:none!important;
}

/* RC54.20 — unified modern, responsive table system and reusable settings switches. */
.setting-switch{
    display:flex;
    gap:.85rem;
    align-items:flex-start;
    padding:.95rem;
    border:1px solid var(--of-border, var(--bs-border-color));
    border-radius:14px;
    min-height:100%;
    background:var(--of-surface, var(--bs-body-bg));
    transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.setting-switch:hover{
    border-color:color-mix(in srgb, var(--of-primary, var(--bs-primary)) 38%, var(--of-border, var(--bs-border-color)));
    box-shadow:0 8px 22px rgba(var(--of-shadow-ink-rgb),.07);
    transform:translateY(-1px);
}
.setting-switch .form-check-input{ margin-top:.15rem; flex:0 0 auto; }
.setting-switch strong{ display:block; font-size:.9rem; color:var(--of-heading, var(--bs-heading-color)); }
.setting-switch small{ display:block; margin-top:.18rem; color:var(--of-muted, var(--bs-secondary-color)); line-height:1.4; }

body:not(.pos-body) .of-modern-table-shell{
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overflow-y:visible;
    border:1px solid var(--of-border, var(--bs-border-color));
    border-radius:14px;
    background:var(--of-surface, var(--bs-body-bg));
    box-shadow:0 5px 18px rgba(var(--of-shadow-ink-rgb),.045);
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-inline:contain;
    scrollbar-width:thin;
    scrollbar-color:color-mix(in srgb, var(--of-muted) 38%, transparent) transparent;
}
body:not(.pos-body) .of-modern-table-shell::-webkit-scrollbar{ height:8px; }
body:not(.pos-body) .of-modern-table-shell::-webkit-scrollbar-track{ background:transparent; }
body:not(.pos-body) .of-modern-table-shell::-webkit-scrollbar-thumb{
    background:color-mix(in srgb, var(--of-muted) 32%, transparent);
    border-radius:999px;
}
body:not(.pos-body) .of-modern-table-shell:has(.dropdown-menu.show){
    overflow:visible;
}
body:not(.pos-body) table.of-modern-table{
    width:100%;
    margin:0;
    border-collapse:separate;
    border-spacing:0;
    color:var(--of-text, var(--bs-body-color));
}
body:not(.pos-body) table.of-modern-table > thead > tr > th{
    padding:.78rem .82rem;
    border-top:0;
    border-bottom:1px solid var(--of-border, var(--bs-border-color));
    background:color-mix(in srgb, var(--of-surface-2, var(--bs-tertiary-bg)) 88%, var(--of-surface, var(--bs-body-bg)));
    color:var(--of-muted, var(--bs-secondary-color));
    font-size:.72rem;
    font-weight:800;
    line-height:1.25;
    letter-spacing:.045em;
    text-transform:uppercase;
    white-space:nowrap;
}
body:not(.pos-body) table.of-modern-table > tbody > tr > td, body:not(.pos-body) table.of-modern-table > tbody > tr > th, body:not(.pos-body) table.of-modern-table > tfoot > tr > td, body:not(.pos-body) table.of-modern-table > tfoot > tr > th{
    padding:.78rem .82rem;
    border-bottom:1px solid color-mix(in srgb, var(--of-border, var(--bs-border-color)) 78%, transparent);
    background:transparent;
    vertical-align:middle;
}
body:not(.pos-body) table.of-modern-table > tbody > tr > th.of-table-row-header{
    color:var(--of-heading, var(--bs-heading-color));
    font-weight:750;
}
body:not(.pos-body) table.of-modern-table .of-table-numeric-col{
    text-align:right;
    font-variant-numeric:tabular-nums;
    white-space:nowrap;
}
body:not(.pos-body) table.of-modern-table .of-table-select-col{
    width:1%;
    min-width:48px;
    text-align:center;
    white-space:nowrap;
}
body:not(.pos-body) table.of-modern-table .of-table-actions-col{
    width:1%;
    min-width:76px;
    text-align:right;
    white-space:nowrap;
}
body:not(.pos-body) table.of-modern-table .of-table-empty-state{
    padding:2rem 1rem;
    color:var(--of-muted, var(--bs-secondary-color));
    text-align:center;
    white-space:normal;
}
body:not(.pos-body) table.of-modern-table > tbody > tr:has(> .of-table-empty-state):hover > *{
    background:transparent;
}
body:not(.pos-body) table.of-modern-table > tbody > tr:last-child > td{ border-bottom:0; }
body:not(.pos-body) table.of-modern-table > tbody > tr{
    transition:background-color .14s ease, box-shadow .14s ease;
}
body:not(.pos-body) table.of-modern-table > tbody > tr:hover > td{
    background:color-mix(in srgb, var(--of-primary-soft, rgba(var(--bs-primary-rgb),.08)) 42%, transparent);
}
body:not(.pos-body) table.of-modern-table > tfoot > tr > *{
    background:var(--of-surface-2, var(--bs-tertiary-bg));
    font-weight:800;
}
body:not(.pos-body) table.of-modern-table .btn-sm, body:not(.pos-body) table.of-modern-table .btn-group-sm > .btn{
    min-height:34px;
    border-radius:9px;
}
body:not(.pos-body) table.of-modern-table .dropdown-toggle{ white-space:nowrap; }

@media(min-width:768px) {
    body:not(.pos-body) .of-modern-table-shell > table.of-modern-table > thead > tr > .of-table-select-col, body:not(.pos-body) .of-modern-table-shell > table.of-modern-table > tbody > tr > .of-table-select-col{
        position:sticky;
        left:0;
        z-index:2;
        background:var(--of-surface, var(--bs-body-bg));
        box-shadow:8px 0 12px -14px rgba(var(--of-shadow-ink-rgb),.45);
    }
    body:not(.pos-body) .of-modern-table-shell > table.of-modern-table > thead > tr > .of-table-select-col{ z-index:4; background:var(--of-surface-2, var(--bs-tertiary-bg)); }
    body:not(.pos-body) .of-modern-table-shell > table.of-modern-table > thead > tr > .of-table-actions-col, body:not(.pos-body) .of-modern-table-shell > table.of-modern-table > tbody > tr > .of-table-actions-col{
        position:sticky;
        right:0;
        z-index:2;
        background:var(--of-surface, var(--bs-body-bg));
        box-shadow:-8px 0 12px -14px rgba(var(--of-shadow-ink-rgb),.45);
    }
    body:not(.pos-body) .of-modern-table-shell > table.of-modern-table > thead > tr > .of-table-actions-col{ z-index:4; background:var(--of-surface-2, var(--bs-tertiary-bg)); }
    body:not(.pos-body) .of-modern-table-shell > table.of-modern-table > tbody > tr:hover > .of-table-select-col, body:not(.pos-body) .of-modern-table-shell > table.of-modern-table > tbody > tr:hover > .of-table-actions-col{
        background:color-mix(in srgb, var(--of-primary-soft, rgba(var(--bs-primary-rgb),.08)) 42%, var(--of-surface, var(--bs-body-bg)));
    }
}
body:not(.pos-body) .card > .of-modern-table-shell, body:not(.pos-body) .card-body > .of-modern-table-shell{
    box-shadow:none;
}
body:not(.pos-body) .card > .of-modern-table-shell{
    border-left:0;
    border-right:0;
    border-radius:0;
}
body:not(.pos-body) .card-footer .pagination{ margin-bottom:0; }
body:not(.pos-body) .pagination .page-link{
    min-width:36px;
    min-height:36px;
    display:inline-grid;
    place-items:center;
    border-radius:9px!important;
    margin-inline:2px;
    border-color:var(--of-border, var(--bs-border-color));
    color:var(--of-text, var(--bs-body-color));
    background:var(--of-surface, var(--bs-body-bg));
    box-shadow:0 2px 7px rgba(var(--of-shadow-ink-rgb),.035);
}
body:not(.pos-body) .pagination .active > .page-link{
    color:var(--of-inverse-text);
    background:var(--of-primary, var(--bs-primary));
    border-color:var(--of-primary, var(--bs-primary));
    box-shadow:0 5px 12px color-mix(in srgb, var(--of-primary, var(--bs-primary)) 23%, transparent);
}

@media(max-width:767.98px) {
    body:not(.pos-body) .of-modern-table-shell:not(.of-mobile-table-wrap) > table.of-modern-table{
        min-width:720px;
    }
    
    body:not(.pos-body) .of-mobile-table > tbody > tr{
        border-radius:14px;
        box-shadow:0 5px 16px rgba(var(--of-shadow-ink-rgb),.06);
    }
    body:not(.pos-body) .of-mobile-table > tbody > tr > td{
        padding:10px 0;
    }
    body:not(.pos-body) .of-mobile-table .of-table-select-col, body:not(.pos-body) .of-mobile-table .of-table-actions-col{
        position:static!important;
        min-width:0;
        box-shadow:none!important;
    }
}

@media(prefers-reduced-motion:reduce) {
    .setting-switch, body:not(.pos-body) table.of-modern-table > tbody > tr{ transition:none!important; }
}


/* RC54.20.3 — operational table sorting and row-density controls. */
body:not(.pos-body) .table-sort-link{
    display:inline-flex;
    align-items:center;
    gap:.32rem;
    color:inherit;
    text-decoration:none;
    white-space:nowrap;
    border-radius:7px;
    padding:.12rem .18rem;
    margin:-.12rem -.18rem;
    transition:color .14s ease, background-color .14s ease;
}
body:not(.pos-body) .table-sort-link:hover{
    color:var(--of-primary, var(--bs-primary));
    background:color-mix(in srgb, var(--of-primary, var(--bs-primary)) 7%, transparent);
}
body:not(.pos-body) .table-sort-link.is-active{
    color:var(--of-primary, var(--bs-primary));
}
body:not(.pos-body) .table-sort-link .bi{ font-size:.9rem; }
body:not(.pos-body) .table-page-size-select{
    width:auto;
    min-width:72px;
    border-radius:9px;
}
@media(max-width:575.98px) {
    body:not(.pos-body) .table-page-size-select{ min-width:68px; }
}


/* Seller RC54.20.4 — operational table pass 2 */
.finance-account-table th:last-child, .finance-account-table td:last-child{min-width:260px}.finance-account-table .badge{white-space:nowrap}.inventory-history-table .table-sort-link, .finance-account-table .table-sort-link{display:inline-flex;align-items:center;gap:.35rem;color:inherit;text-decoration:none;font-weight:inherit}.inventory-history-card .card-footer, .finance-ledger-card .card-footer{overflow-x:auto}.admin-role-card{transition:transform .16s ease,box-shadow .16s ease}.admin-role-card:hover{transform:translateY(-1px);box-shadow:0 .65rem 1.4rem rgba(var(--of-shadow-ink-rgb),.08)}
@media(max-width:991.98px){.finance-ledger-card .card-footer .pagination{margin-bottom:0}}


/* RC54.22.3 — global Bootstrap pagination hardening */
nav[role="navigation"][aria-label="Pagination Navigation"] svg{
    width:1rem !important;
    height:1rem !important;
    max-width:1rem !important;
    max-height:1rem !important;
    flex:0 0 1rem;
}
body:not(.pos-body) .pagination .page-link, body:not(.pos-body) .pagination .active > .page-link{
    box-shadow:none;
}

/* RC54.23 — Payment Accounts workspace redesign */
.finance-workspace{ --finance-radius:14px; --finance-soft:color-mix(in srgb,var(--of-primary) 7%,var(--of-surface)); }
.finance-workspace .card, .finance-workspace .finance-kpi-card, .finance-workspace .account-workspace-link{ box-shadow:none!important; }
.finance-hero{ display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:2px 0 0; }
.finance-hero-copy{ min-width:0; max-width:780px; }
.finance-hero-actions{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.finance-hero-actions .btn{ white-space:nowrap; }

.account-workspace-nav{ display:flex; gap:8px; margin-bottom:16px; padding:6px; overflow-x:auto; overscroll-behavior-inline:contain; border:1px solid var(--of-border); border-radius:14px; background:var(--of-surface-2); scrollbar-width:thin; }
.account-workspace-link{ min-width:150px; flex:1 0 150px; display:flex; align-items:center; gap:9px; padding:9px 10px; border:1px solid transparent; border-radius:10px; color:var(--of-muted); text-decoration:none; transition:background-color .15s ease,border-color .15s ease,color .15s ease; }
.account-workspace-link:hover{ color:var(--of-heading); background:var(--of-surface); }
.account-workspace-link.active{ color:var(--of-primary-text); border-color:color-mix(in srgb,var(--of-primary) 24%,var(--of-border)); background:var(--of-primary-soft); }
.account-workspace-icon{ width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border:1px solid var(--of-border); border-radius:9px; background:var(--of-surface); color:var(--of-heading); }
.account-workspace-link.active .account-workspace-icon{ color:var(--of-primary-text); border-color:color-mix(in srgb,var(--of-primary) 26%,var(--of-border)); background:color-mix(in srgb,var(--of-primary) 10%,var(--of-surface)); }
.account-workspace-link strong, .account-workspace-link small{ display:block; line-height:1.2; }
.account-workspace-link strong{ color:inherit; font-size:.83rem; font-weight:750; }
.account-workspace-link small{ margin-top:3px; color:var(--of-muted); font-size:.68rem; }

.finance-kpi-grid{ --bs-gutter-x:.8rem; --bs-gutter-y:.8rem; }
.finance-kpi-card{ min-height:112px; height:100%; display:flex; align-items:center; gap:12px; padding:15px 16px; border:1px solid var(--of-border); border-radius:var(--finance-radius); background:var(--of-surface); }
.finance-kpi-card>div{ min-width:0; }
.finance-kpi-icon{ width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; border:1px solid color-mix(in srgb,var(--of-primary) 18%,var(--of-border)); border-radius:11px; color:var(--of-primary-text); background:var(--of-primary-soft); font-size:1rem; }
.finance-kpi-card>div>span, .finance-kpi-card>div>strong, .finance-kpi-card>div>small{ display:block; }
.finance-kpi-card>div>span{ color:var(--of-muted); font-size:var(--of-type-support); font-weight:650; }
.finance-kpi-card>div>strong{ margin-top:2px; color:var(--of-heading); font-size:1.16rem; font-weight:800; letter-spacing:-.02em; overflow-wrap:anywhere; }
.finance-kpi-card>div>small{ margin-top:2px; color:var(--of-muted); font-size:var(--of-type-support); }
.finance-kpi-card.is-success{ border-color:color-mix(in srgb,var(--of-success) 30%,var(--of-border)); }
.finance-kpi-card.is-success .finance-kpi-icon{ color:var(--of-success); border-color:color-mix(in srgb,var(--of-success) 28%,var(--of-border)); background:color-mix(in srgb,var(--of-success) 9%,var(--of-surface)); }
.finance-kpi-card.is-warning{ border-color:color-mix(in srgb,var(--of-warning) 36%,var(--of-border)); }
.finance-kpi-card.is-warning .finance-kpi-icon{ color:color-mix(in srgb,var(--of-warning) 75%,var(--of-heading)); border-color:color-mix(in srgb,var(--of-warning) 32%,var(--of-border)); background:color-mix(in srgb,var(--of-warning) 10%,var(--of-surface)); }
.finance-kpi-card.is-danger{ border-color:color-mix(in srgb,var(--of-danger) 30%,var(--of-border)); }
.finance-kpi-card.is-danger .finance-kpi-icon{ color:var(--of-danger); border-color:color-mix(in srgb,var(--of-danger) 30%,var(--of-border)); background:color-mix(in srgb,var(--of-danger) 9%,var(--of-surface)); }

.finance-routing-alert{ display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid color-mix(in srgb,var(--of-warning) 36%,var(--of-border)); border-radius:12px; background:color-mix(in srgb,var(--of-warning) 7%,var(--of-surface)); }
.finance-routing-alert-icon{ width:38px; height:38px; flex:0 0 38px; display:grid; place-items:center; border-radius:10px; color:color-mix(in srgb,var(--of-warning) 75%,var(--of-heading)); background:color-mix(in srgb,var(--of-warning) 12%,var(--of-surface)); }
.finance-routing-alert strong{ color:var(--of-heading); }

.finance-filter-panel, .finance-ledger-card{ border:1px solid var(--of-border); border-radius:var(--finance-radius); overflow:hidden; }
.finance-filter-panel .card-body{ padding:14px; }
.finance-filter-panel .form-label{ display:flex; align-items:center; gap:6px; margin-bottom:6px; color:var(--of-muted); font-size:var(--of-type-support); font-weight:700; }
.finance-filter-panel .form-label i{ color:var(--of-primary-text); }
.finance-card-header{ min-height:64px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 16px; border-bottom:1px solid var(--of-border); background:var(--of-surface)!important; }
.finance-card-header strong{ color:var(--of-heading); font-size:.94rem; }

.finance-account-table{ min-width:1120px; }
.finance-account-table th{ white-space:nowrap; }
.finance-account-table td{ vertical-align:middle; }
.finance-account-identity{ min-width:0; display:flex; align-items:center; gap:10px; }
.finance-account-type-icon{ width:36px; height:36px; flex:0 0 36px; display:grid; place-items:center; border:1px solid var(--of-border); border-radius:9px; color:var(--of-primary-text); background:var(--finance-soft); }
.finance-scope-pill, .finance-type-pill, .finance-routing-pill, .finance-reference-pill, .finance-code-pill, .finance-flow-pill, .finance-classification-pill{ display:inline-flex; align-items:center; gap:5px; max-width:100%; border:1px solid var(--of-border); border-radius:999px; padding:4px 8px; line-height:1.2; font-size:var(--of-type-support); font-weight:650; }
.finance-scope-pill, .finance-type-pill, .finance-reference-pill, .finance-code-pill{ color:var(--of-muted); background:var(--of-surface-2); }
.finance-routing-pills{ display:flex; flex-wrap:wrap; gap:5px; max-width:250px; }
.finance-routing-pill{ color:var(--of-success); border-color:color-mix(in srgb,var(--of-success) 24%,var(--of-border)); background:var(--of-success-soft); }
.finance-balance{ color:var(--of-heading); font-variant-numeric:tabular-nums; white-space:nowrap; }
.finance-mobile-actions{ display:flex; flex-wrap:wrap; gap:7px; }
.finance-mobile-note{ padding:8px 10px; border:1px solid var(--of-border); border-radius:8px; background:var(--of-surface-2); color:var(--of-muted); font-size:var(--of-type-support); }

.finance-modal-content{ border:1px solid var(--of-border); border-radius:16px; box-shadow:none; }
.finance-modal-content .modal-header{ align-items:flex-start; padding:16px 18px; }
.finance-modal-content .modal-body{ padding:18px; }
.finance-modal-content .modal-footer{ padding:12px 18px; background:var(--of-surface-2); }
.finance-modal-content .form-label{ display:flex; align-items:center; gap:7px; font-weight:700; }
.finance-modal-content .form-label i{ color:var(--of-primary-text); }
.finance-movement-balance{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface-2); }
.finance-movement-balance span{ color:var(--of-muted); font-size:var(--of-type-support); }
.finance-movement-balance strong{ color:var(--of-heading); font-size:1.1rem; font-variant-numeric:tabular-nums; }
.finance-routing-help{ display:flex; gap:10px; padding:11px 12px; border:1px solid color-mix(in srgb,var(--of-primary) 18%,var(--of-border)); border-radius:10px; background:var(--finance-soft); }
.finance-routing-help>i{ color:var(--of-primary-text); margin-top:1px; }
.finance-routing-grid{ display:grid; gap:8px; }
.finance-routing-row{ display:grid; grid-template-columns:minmax(210px,.8fr) minmax(280px,1.35fr) 110px; gap:12px; align-items:center; padding:11px 12px; border:1px solid var(--of-border); border-radius:10px; }
.finance-routing-method{ display:flex; align-items:center; gap:10px; min-width:0; }
.finance-routing-method-icon{ width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border:1px solid var(--of-border); border-radius:9px; background:var(--of-surface-2); }
.finance-routing-method strong, .finance-routing-method small{ display:block; }
.finance-routing-method small{ margin-top:2px; color:var(--of-muted); font-size:.68rem; }
.finance-routing-state{ text-align:right; }

.finance-filter-context{ min-height:42px; display:flex; align-items:center; gap:8px; padding:7px 10px; border:1px dashed var(--of-border); border-radius:9px; color:var(--of-muted); font-size:var(--of-type-support); }
.finance-period-shortcuts{ display:flex; flex-wrap:wrap; gap:6px; }
.finance-period-chip{ min-height:30px; padding:4px 10px; border:1px solid var(--of-border); border-radius:999px; color:var(--of-muted); background:var(--of-surface); font-size:var(--of-type-support); font-weight:650; }
.finance-period-chip:hover{ color:var(--of-heading); border-color:color-mix(in srgb,var(--of-primary) 30%,var(--of-border)); background:var(--finance-soft); }

.finance-equation-strip{ display:flex; align-items:center; gap:12px; padding:12px 14px; overflow-x:auto; border:1px solid var(--of-border); border-radius:12px; background:var(--of-surface); }
.finance-equation-strip>div{ min-width:160px; }
.finance-equation-strip span, .finance-equation-strip strong{ display:block; }
.finance-equation-strip>div>span{ color:var(--of-muted); font-size:var(--of-type-support); }
.finance-equation-strip strong{ color:var(--of-heading); font-size:1rem; font-variant-numeric:tabular-nums; }
.finance-equation-strip>i{ color:var(--of-muted); }
.finance-balance-status{ margin-left:auto; flex:0 0 auto; display:inline-flex!important; flex-direction:row; align-items:center; gap:6px; padding:6px 9px; border-radius:999px; font-size:var(--of-type-support); font-weight:750; }
.finance-balance-status.is-balanced{ color:var(--of-success); background:color-mix(in srgb,var(--of-success) 9%,var(--of-surface)); }
.finance-balance-status.is-warning{ color:color-mix(in srgb,var(--of-warning) 75%,var(--of-heading)); background:color-mix(in srgb,var(--of-warning) 10%,var(--of-surface)); }
.finance-section-total{ color:var(--of-heading); font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
.finance-derived-row{ background:var(--of-surface-2); }
.finance-report-note{ display:flex; gap:10px; padding:12px 14px; border:1px solid var(--of-border); border-radius:12px; background:var(--of-surface-2); }
.finance-report-note>i{ color:var(--of-primary-text); margin-top:1px; }
.finance-code-pill{ min-width:50px; justify-content:center; color:var(--of-heading); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.finance-flow-pill.is-in{ color:var(--of-success); border-color:color-mix(in srgb,var(--of-success) 24%,var(--of-border)); background:var(--of-success-soft); }
.finance-flow-pill.is-out{ color:var(--of-danger); border-color:color-mix(in srgb,var(--of-danger) 24%,var(--of-border)); background:color-mix(in srgb,var(--of-danger) 7%,var(--of-surface)); }
.finance-classification-pill.is-asset{ color:var(--of-success); border-color:color-mix(in srgb,var(--of-success) 24%,var(--of-border)); background:var(--of-success-soft); }
.finance-classification-pill.is-liability{ color:var(--of-danger); border-color:color-mix(in srgb,var(--of-danger) 24%,var(--of-border)); background:color-mix(in srgb,var(--of-danger) 7%,var(--of-surface)); }
.finance-classification-pill.is-equity{ color:var(--of-primary-text); border-color:color-mix(in srgb,var(--of-primary) 24%,var(--of-border)); background:var(--of-primary-soft); }
.finance-classification-pill.is-income{ color:var(--of-success); }
.finance-classification-pill.is-expense{ color:color-mix(in srgb,var(--of-warning) 78%,var(--of-heading)); }
.finance-classification-table{ min-width:820px; }
.finance-trial-table{ min-width:700px; }
.finance-ledger-table{ min-width:1040px; }

@media(max-width:1199.98px) {
    .finance-hero{ flex-direction:column; }
    .finance-hero-actions{ width:100%; justify-content:flex-start; }
    .finance-routing-row{ grid-template-columns:minmax(180px,.8fr) minmax(240px,1.3fr) 100px; }
}
@media(max-width:767.98px) {
    .finance-hero-actions{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
    .finance-hero-actions .btn:last-child:nth-child(odd){ grid-column:1/-1; }
    .account-workspace-nav{ margin-inline:-2px; }
    .account-workspace-link{ flex-basis:145px; min-width:145px; }
    .finance-kpi-grid{ --bs-gutter-x:.6rem; --bs-gutter-y:.6rem; }
    .finance-kpi-card{ min-height:100px; padding:12px; }
    .finance-kpi-icon{ width:38px; height:38px; flex-basis:38px; }
    .finance-routing-alert{ align-items:flex-start; flex-wrap:wrap; }
    .finance-routing-alert .btn{ width:100%; }
    .finance-card-header{ align-items:flex-start; }
    .finance-routing-row{ grid-template-columns:1fr; }
    .finance-routing-state{ text-align:left; }
    .finance-equation-strip{ align-items:stretch; }
    .finance-balance-status{ margin-left:0; align-self:center; }
    .finance-five-kpis .col-6:last-child{ width:100%; }
}
@media(max-width:575.98px) {
    .finance-hero-actions{ grid-template-columns:1fr; }
    .finance-hero-actions .btn{ width:100%; }
    .finance-kpi-grid .col-6{ width:100%; }
    .finance-kpi-card{ min-height:88px; }
    .finance-mobile-record, .finance-account-record{ padding:13px 14px; }
    .finance-mobile-actions{ display:grid; grid-template-columns:1fr 1fr; }
    .finance-mobile-actions .btn:first-child:last-child{ grid-column:1/-1; }
    .finance-modal-content .modal-body{ padding:14px; }
    .finance-modal-content .modal-footer{ display:grid; grid-template-columns:1fr 1fr; }
    .finance-modal-content .modal-footer .btn{ width:100%; }
}
@media print {
    .finance-workspace .account-workspace-nav, .finance-workspace .finance-filter-panel, .finance-workspace .finance-hero-actions, .finance-workspace .pagination{ display:none!important; }
    .finance-workspace .card, .finance-kpi-card, .finance-equation-strip, .finance-report-note{ border-color:var(--of-print-border)!important; box-shadow:none!important; break-inside:avoid; }
    .finance-workspace .table-responsive{ overflow:visible!important; }
}

/* RC54.24 — Inter local-first typography system */
:root{
    /* No remote font request: prefer Inter installed on the workstation, then system UI fonts. */
    --bs-body-font-family: var(--of-font);
    --bs-font-sans-serif: var(--of-font);
}

html{ font-family:var(--of-font); }
body, button, input, select, textarea, .form-control, .form-select, .input-group-text, .dropdown-menu, .tooltip, .popover{
    font-family:var(--of-font);
}

body{
    font-weight:400;
    font-optical-sizing:auto;
    font-kerning:normal;
    font-feature-settings:"cv02" 1,"cv03" 1,"cv04" 1,"cv11" 1;
    text-rendering:optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6{
    font-family:var(--of-font);
    font-weight:700;
    line-height:1.2;
    letter-spacing:-.02em;
}
h1, .h1{ font-size:1.75rem; }
h2, .h2{ font-size:1.5rem; }
h3, .h3{ font-size:1.25rem; }
h4, .h4{ font-size:1.125rem; }
h5, .h5{ font-size:1rem; }
h6, .h6{ font-size:.875rem; }

.page-title{
    font-size:1.375rem;
    font-weight:700;
    line-height:1.22;
    letter-spacing:-.025em;
}
.form-text, .text-secondary, .text-body-secondary{ line-height:1.45; }

.form-label{
    font-size:var(--of-type-label);
    font-weight:600;
    letter-spacing:-.005em;
}
.form-control, .form-select, .input-group-text{
    font-size:var(--of-type-control);
    font-weight:400;
    line-height:1.4;
}
.form-control::placeholder{ font-weight:400; }

.btn, .dropdown-item, .nav-link, .page-link{
    font-size:13px;
    font-weight:600;
    letter-spacing:-.005em;
}
.btn-sm{ font-size:12.5px; font-weight:600; }

.sidebar-link, .sidebar-sublink{ font-size:13px; font-weight:500; }
.sidebar-link.active, .sidebar-sublink.active{ font-weight:600; }
.nav-section-label, .eyebrow{ font-size:11px; font-weight:700; letter-spacing:.075em; }
.brand-copy strong{ font-size:15px; font-weight:700; }
.topbar-context strong, .user-copy strong{ font-weight:600; }

.card-title, .modal-title, .offcanvas-title{ font-weight:700; letter-spacing:-.012em; }
.metric-card strong, .finance-summary-card strong, .inventory-summary-value, .product-summary-value, .sales-summary-value, .dashboard-kpi-value, .finance-mobile-amount{
    font-variant-numeric:tabular-nums;
}

.table{
    font-size:var(--of-type-table);
    font-weight:400;
    font-variant-numeric:tabular-nums;
}
.table thead th{
    font-size:var(--of-type-table-head);
    font-weight:650;
    letter-spacing:.035em;
}
.table tbody td{ line-height:1.4; }
.table a.fw-semibold{ font-weight:600!important; }
.table td .badge, .badge:not(.fs-6):not(.fs-5), .badge-soft{ font-weight:600; }

/* Inter has a taller x-height; use medium/semibold instead of unnecessary heavy text. */
.finance-mobile-title, .product-mobile-name, .inventory-mobile-title, .contact-mobile-name{ font-weight:650; }
.finance-summary-card strong, .product-summary-value, .inventory-summary-value{ font-weight:700; }

@media (max-width:575.98px) {
    :root{
        --of-type-body:13.5px;
        --of-type-table:12.5px;
        --of-type-table-head:11px;
    }
    .page-title{ font-size:1.18rem; }
}

/* RC54.24.2 — keep table action dropdowns above sticky cells and scroll shells. */
body:not(.pos-body) .of-modern-table-shell.of-table-dropdown-open, body:not(.pos-body) .of-modern-table-shell:has(.dropdown-menu.show){
    position:relative;
    z-index:1050;
    overflow:visible!important;
}
body:not(.pos-body) .card.of-table-dropdown-open{
    overflow:visible!important;
}
body:not(.pos-body) table.of-modern-table .of-table-dropdown-active{
    z-index:1090!important;
    overflow:visible!important;
}
body:not(.pos-body) table.of-modern-table .of-table-dropdown-active:not(.of-table-actions-col):not(.of-table-select-col){
    position:relative;
}
body:not(.pos-body) table.of-modern-table > tbody > tr > .of-table-actions-col:has(.dropdown-menu.show), body:not(.pos-body) table.of-modern-table > tbody > tr > .of-table-select-col:has(.dropdown-menu.show){
    z-index:1090!important;
}
body:not(.pos-body) table.of-modern-table .dropdown-menu.show{
    z-index:1095;
}

/* RC54.25 — Full customer/supplier editor modal and contact profile fields */
.contact-editor-modal .modal-dialog{ max-width:min(1180px,calc(100vw - 32px)); }
.contact-editor-modal .modal-content, .contact-editor-card{ border:1px solid var(--of-border); border-radius:18px; background:var(--of-surface); }
.contact-editor-modal .modal-header{ align-items:flex-start; padding:18px 20px; }
.contact-editor-modal-body{ padding:0; background:var(--of-surface-2); }
.contact-editor-modal-footer{ padding:12px 20px; background:var(--of-surface); border-top:1px solid var(--of-border); }
.contact-editor-fields{ min-width:0; }
.contact-editor-section{ padding:20px; background:var(--of-surface); }
.contact-editor-section + .contact-editor-section, .contact-editor-section-more{ border-top:1px solid var(--of-border); }
.contact-editor-section-heading{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.contact-editor-kicker{ display:block; margin-bottom:2px; color:var(--of-muted); font-size:var(--of-type-support); font-weight:700; letter-spacing:.055em; text-transform:uppercase; }
.contact-editor-fields .form-label{ margin-bottom:6px; color:var(--of-heading); font-size:.83rem; line-height:1.3; }
.contact-editor-fields .form-text{ margin-top:5px; font-size:.75rem; }
.contact-editor-fields .input-group-text{ min-width:45px; justify-content:center; color:var(--of-muted); background:var(--of-surface-2); }
.contact-editor-fields .input-group-text i{ font-size:1rem; }
.contact-editor-fields .form-control, .contact-editor-fields .form-select{ font-size:.88rem; }
.contact-editor-fields .contact-term-unit{ max-width:132px; }
.contact-entity-fieldset{ min-width:0; margin:0; padding:0; border:0; }
.contact-entity-fieldset legend{ float:none; width:auto; }
.contact-entity-options{ display:flex; flex-wrap:wrap; gap:8px; min-height:48px; align-items:center; }
.contact-entity-option{ position:relative; margin:0; cursor:pointer; }
.contact-entity-option .form-check-input{ position:absolute; opacity:0; pointer-events:none; }
.contact-entity-option span{ display:inline-flex; align-items:center; gap:7px; min-height:40px; padding:8px 12px; border:1px solid var(--of-border); border-radius:10px; color:var(--of-text); background:var(--of-surface); font-size:.84rem; font-weight:650; transition:border-color .16s ease,background-color .16s ease,color .16s ease; }
.contact-entity-option .form-check-input:checked + span{ border-color:color-mix(in srgb,var(--of-primary) 55%,var(--of-border)); color:var(--of-primary-text); background:var(--of-primary-soft); }
.contact-entity-option .form-check-input:focus-visible + span{ outline:3px solid var(--of-focus-ring-color); outline-offset:2px; }
.contact-more-toggle{ display:inline-flex; align-items:center; justify-content:center; gap:8px; min-width:168px; }
.contact-more-toggle[aria-expanded="true"] i{ transform:rotate(180deg); }
.contact-more-toggle i{ transition:transform .18s ease; }
.contact-more-information{ border-top:1px solid var(--of-border); }
.contact-editor-page .contact-editor-card{ overflow:hidden; }
.contact-address-summary{ display:flex; align-items:flex-start; gap:10px; padding:12px 14px; border:1px solid var(--of-border); border-radius:11px; background:var(--of-surface-2); }
.contact-address-summary-icon{ width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border-radius:9px; color:var(--of-primary-text); background:var(--of-primary-soft); }

@media (max-width:767.98px) {
    .contact-editor-modal .modal-dialog{ max-width:none; margin:8px; }
    .contact-editor-modal .modal-content{ border-radius:14px; }
    .contact-editor-modal .modal-header{ padding:15px; }
    .contact-editor-section{ padding:15px; }
    .contact-editor-modal-footer{ padding:10px 15px; }
    .contact-editor-modal-footer .btn{ flex:1 1 auto; }
    .contact-entity-options{ align-items:stretch; }
    .contact-entity-option{ flex:1 1 calc(50% - 4px); }
    .contact-entity-option span{ justify-content:center; width:100%; }
    .contact-more-toggle{ width:100%; }
}

/* RC54.26 — Contact identity profiles and modern customer/supplier workspace */
.contact-editor-modal .modal-dialog{ max-width:min(1320px,calc(100vw - 28px)); }
.contact-editor-section-intro{ padding:12px 14px; border:1px solid var(--of-border); border-radius:12px; background:var(--of-surface-2); }
.contact-entity-panel{ min-width:0; }
.contact-entity-panel[hidden]{ display:none!important; }
.contact-editor-address-section{ border-top:1px solid var(--of-border); }
.contact-editor-section-heading .small{ max-width:620px; }
.contact-editor-fields textarea.form-control{ min-height:82px; resize:vertical; }


.contact-profile-page-modern{ min-width:0; }
.contact-profile-breadcrumb{ display:flex; align-items:center; flex-wrap:wrap; gap:7px; color:var(--of-muted); font-size:.82rem; }
.contact-profile-breadcrumb a{ display:inline-flex; align-items:center; gap:7px; font-weight:650; }
.contact-profile-breadcrumb > span > i{ font-size:.72rem; }
.contact-profile-hero{ overflow:visible; border-color:var(--of-border); box-shadow:var(--of-shadow-sm); }
.contact-profile-hero .card-body{ padding:20px; }
.contact-profile-hero-main{ display:flex; align-items:flex-start; justify-content:space-between; gap:22px; }
.contact-profile-identity{ display:flex; align-items:center; gap:15px; min-width:0; }
.contact-profile-avatar{ width:66px; height:66px; flex:0 0 66px; display:grid; place-items:center; border-radius:50%; color:var(--of-primary-text); background:var(--of-primary-soft); border:1px solid color-mix(in srgb,var(--of-primary) 18%,var(--of-border)); font-size:1.32rem; font-weight:750; letter-spacing:-.025em; }
.contact-profile-name{ max-width:720px; color:var(--of-heading); font-size:1.42rem; font-weight:750; line-height:1.2; overflow-wrap:anywhere; }
.contact-profile-subtitle{ color:var(--of-muted); font-size:.84rem; }
.contact-profile-type-badge{ color:var(--of-primary-text); background:var(--of-primary-soft); border:1px solid color-mix(in srgb,var(--of-primary) 18%,var(--of-border)); }
.contact-profile-quick-meta{ display:flex; align-items:center; flex-wrap:wrap; gap:7px 15px; }
.contact-profile-quick-meta a, .contact-profile-quick-meta span{ display:inline-flex; align-items:center; gap:6px; min-width:0; color:var(--of-muted); font-size:.79rem; text-decoration:none; }
.contact-profile-quick-meta a:hover{ color:var(--of-primary-text); }
.contact-profile-actions{ display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; flex:0 0 auto; }
.contact-profile-actions .dropdown{ position:relative; z-index:8; }

.contact-profile-stat-grid > [class*="col-"]{ min-width:0; }
.contact-profile-stat-card{ border-color:var(--of-border); box-shadow:var(--of-shadow-sm); }
.contact-profile-stat-card .card-body{ display:flex; align-items:center; gap:13px; padding:15px 16px; min-width:0; }
.contact-profile-stat-icon{ width:44px; height:44px; flex:0 0 44px; display:grid; place-items:center; border-radius:12px; font-size:1.08rem; }
.contact-profile-stat-icon.is-primary{ color:var(--of-primary-text); background:var(--of-primary-soft); }
.contact-profile-stat-icon.is-success{ color:var(--of-success-text); background:color-mix(in srgb,var(--of-success) 11%,var(--of-surface)); }
.contact-profile-stat-icon.is-danger{ color:var(--of-danger-text); background:color-mix(in srgb,var(--of-danger) 10%,var(--of-surface)); }
.contact-profile-stat-icon.is-purple{ color:color-mix(in srgb,var(--of-info-text) 72%,var(--of-heading)); background:color-mix(in srgb,var(--of-info) 9%,var(--of-surface)); }
.contact-profile-stat-value{ margin-top:1px; color:var(--of-heading); font-size:1.13rem; font-weight:750; line-height:1.25; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.contact-profile-stat-date{ font-size:1rem; }

.contact-profile-tabs{ display:flex; align-items:center; gap:4px; min-width:0; overflow-x:auto; scrollbar-width:thin; border-bottom:1px solid var(--of-border); }
.contact-profile-tabs a{ display:inline-flex; align-items:center; gap:7px; flex:0 0 auto; padding:11px 12px 10px; border-bottom:2px solid transparent; color:var(--of-muted); font-size:.79rem; font-weight:650; text-decoration:none; white-space:nowrap; }
.contact-profile-tabs a:hover, .contact-profile-tabs a.active{ color:var(--of-primary-text); border-bottom-color:var(--of-primary); background:color-mix(in srgb,var(--of-primary) 4%,transparent); }
.contact-profile-section-card{ border-color:var(--of-border); box-shadow:var(--of-shadow-sm); }
.contact-profile-section-card .card-header{ padding:13px 16px; border-bottom-color:var(--of-border); }
.contact-profile-section-card .card-body{ padding:16px; }
.contact-financial-summary-list, .contact-financial-meta-list{ display:grid; gap:9px; }
.contact-financial-summary-list > div, .contact-financial-meta-list > div{ display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.contact-financial-summary-list span, .contact-financial-meta-list span{ color:var(--of-muted); font-size:.78rem; }
.contact-financial-summary-list strong, .contact-financial-meta-list strong{ color:var(--of-heading); font-size:.8rem; font-weight:700; text-align:right; font-variant-numeric:tabular-nums; }
.contact-activity-timeline{ display:grid; gap:0; }
.contact-activity-item{ position:relative; display:grid; grid-template-columns:34px minmax(0,1fr); gap:11px; padding:0 0 16px; }
.contact-activity-item:not(:last-child)::after{ content:""; position:absolute; top:34px; bottom:0; left:16px; width:1px; background:var(--of-border); }
.contact-activity-icon{ position:relative; z-index:1; width:34px; height:34px; display:grid; place-items:center; border-radius:50%; background:var(--of-surface-3); color:var(--of-muted); }
.contact-activity-icon.is-success{ color:var(--of-success-text); background:color-mix(in srgb,var(--of-success) 10%,var(--of-surface)); }
.contact-activity-icon.is-danger{ color:var(--of-danger-text); background:color-mix(in srgb,var(--of-danger) 9%,var(--of-surface)); }
.contact-document-list .list-group-item{ background:transparent; }

@media (min-width:1200px) {
    }
@media (max-width:991.98px) {
    .contact-profile-hero-main{ flex-direction:column; }
    .contact-profile-actions{ width:100%; justify-content:flex-start; }
        }
@media (max-width:767.98px) {
    .contact-profile-hero .card-body{ padding:15px; }
    .contact-profile-identity{ align-items:flex-start; }
    .contact-profile-avatar{ width:52px; height:52px; flex-basis:52px; border-radius:14px; font-size:1.05rem; }
    .contact-profile-name{ font-size:1.16rem; }
    .contact-profile-quick-meta{ display:grid; gap:6px; }
    .contact-profile-actions{ display:grid; grid-template-columns:1fr 1fr; }
    .contact-profile-actions > .btn, .contact-profile-actions > .dropdown, .contact-profile-actions > .dropdown > .btn{ width:100%; }
    .contact-profile-actions > :first-child:last-child{ grid-column:1/-1; }
    .contact-profile-stat-card .card-body{ padding:13px 14px; }
    .contact-profile-tabs{ margin-inline:-2px; }
        .contact-profile-section-card .card-header, .contact-profile-section-card .card-body{ padding-left:14px; padding-right:14px; }
    .contact-editor-section-heading{ align-items:flex-start; flex-direction:column; }
}

/* RC54.27 — Contact modal overflow fix + tabbed customer/supplier details workspace */
.contact-editor-modal .modal-dialog{
    max-height:calc(100dvh - 16px);
    margin-top:8px;
    margin-bottom:8px;
}
.contact-editor-modal .modal-content{
    max-height:calc(100dvh - 16px);
    overflow:hidden;
}
.contact-editor-modal .modal-header, .contact-editor-modal .modal-footer{
    flex:0 0 auto;
}
.contact-editor-modal .modal-body{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
}

.contact-profile-workspace{
    min-width:0;
    overflow:visible;
    border-color:var(--of-border);
    box-shadow:var(--of-shadow-sm);
}
.contact-profile-tabs-wrap{
    padding:0 16px;
    overflow:hidden;
    background:var(--of-surface);
    border-bottom:1px solid var(--of-border);
}
.contact-profile-tabs{
    display:flex;
    flex-wrap:nowrap;
    align-items:stretch;
    gap:2px;
    min-width:0;
    margin:0;
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:thin;
    border:0;
}
.contact-profile-tabs .nav-link{
    display:inline-flex;
    align-items:center;
    gap:7px;
    flex:0 0 auto;
    min-height:46px;
    margin:0;
    padding:10px 12px 9px;
    border:0;
    border-bottom:2px solid transparent;
    border-radius:0;
    color:var(--of-muted);
    background:transparent;
    font-size:.79rem;
    font-weight:650;
    line-height:1.25;
    white-space:nowrap;
}
.contact-profile-tabs .nav-link:hover, .contact-profile-tabs .nav-link:focus-visible{
    color:var(--of-primary-text);
    background:color-mix(in srgb,var(--of-primary) 4%,transparent);
}
.contact-profile-tabs .nav-link.active{
    color:var(--of-primary-text);
    border-bottom-color:var(--of-primary);
    background:color-mix(in srgb,var(--of-primary) 5%,transparent);
}
.contact-profile-workspace-body{
    min-width:0;
    padding:18px;
    background:var(--of-surface-2);
}
.contact-profile-workspace .tab-pane{
    min-width:0;
    outline:0;
}
.contact-profile-workspace .contact-profile-section-card{
    margin:0;
    background:var(--of-surface);
}
.contact-overview-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 24px;
}
.contact-overview-item{
    display:grid;
    grid-template-columns:minmax(110px,.75fr) minmax(0,1.25fr);
    gap:10px;
    align-items:start;
    min-width:0;
    padding:9px 0;
    border-bottom:1px dashed color-mix(in srgb,var(--of-border) 78%,transparent);
}
.contact-overview-item span{
    color:var(--of-muted);
    font-size:.76rem;
    font-weight:550;
}
.contact-overview-item strong{
    min-width:0;
    color:var(--of-heading);
    font-size:.8rem;
    font-weight:650;
    overflow-wrap:anywhere;
}
.contact-profile-details-single{
    grid-template-columns:1fr;
    gap:0;
    border:0;
    border-radius:0;
    overflow:visible;
}
.contact-profile-details-single > div, .contact-profile-details-single > div:nth-child(odd), .contact-profile-details-single > div:nth-last-child(-n/**/+2){
    display:grid;
    grid-template-columns:minmax(125px,.72fr) minmax(0,1.28fr);
    gap:12px;
    align-items:start;
    min-width:0;
    padding:9px 0;
    border-right:0;
    border-bottom:1px dashed color-mix(in srgb,var(--of-border) 78%,transparent);
    background:transparent;
}
.contact-profile-details-single > div:last-child{ border-bottom:0; }
.contact-profile-details-single dt{
    color:var(--of-muted);
    font-size:.76rem;
    font-weight:550;
}
.contact-profile-details-single dd{
    min-width:0;
    margin:0;
    color:var(--of-heading);
    font-size:.8rem;
    font-weight:600;
    overflow-wrap:anywhere;
}
.contact-activity-timeline-wide{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 22px;
}
.contact-activity-timeline-wide .contact-activity-item{
    min-width:0;
}
.contact-empty-state{
    display:flex;
    align-items:flex-start;
    justify-content:center;
    gap:12px;
    min-height:150px;
    padding:28px;
    border:1px dashed var(--of-border);
    border-radius:12px;
    color:var(--of-muted);
    background:var(--of-surface);
}
.contact-empty-state > i{
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    flex:0 0 38px;
    border-radius:10px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
}
.contact-empty-state strong, .contact-empty-state span{ display:block; }
.contact-empty-state strong{ color:var(--of-heading); font-size:.86rem; }
.contact-empty-state span{ margin-top:3px; font-size:.78rem; }
.contact-empty-state.compact{
    min-height:0;
    justify-content:flex-start;
    padding:16px;
}

@media (max-width:991.98px) {
    .contact-activity-timeline-wide{ grid-template-columns:1fr; }
}
@media (max-width:767.98px) {
    .contact-editor-modal .modal-dialog{
        max-height:calc(100dvh - 8px);
        margin:4px;
    }
    .contact-editor-modal .modal-content{
        max-height:calc(100dvh - 8px);
        border-radius:12px;
    }
    .contact-profile-tabs-wrap{ padding:0 8px; }
    .contact-profile-workspace-body{ padding:12px; }
    .contact-profile-tabs{ margin-inline:0; }
    .contact-profile-tabs .nav-link{ min-height:43px; padding:9px 10px 8px; }
    .contact-overview-grid{ grid-template-columns:1fr; }
    .contact-overview-item, .contact-profile-details-single > div, .contact-profile-details-single > div:nth-child(odd), .contact-profile-details-single > div:nth-last-child(-n/**/+2){
        grid-template-columns:1fr;
        gap:2px;
    }
}

/* RC54.30 — Modern Sales Returns / Refunds workspace */
.sales-return-workspace{
    --return-radius:14px;
    --return-soft:color-mix(in srgb,var(--of-primary) 6%,var(--of-surface));
    min-width:0;
}
.return-workspace-header{ gap:18px; }
.return-workspace-kicker{
    display:flex;
    align-items:center;
    gap:7px;
    margin-bottom:5px;
    color:var(--of-primary-text);
    font-size:.69rem;
    font-weight:800;
    letter-spacing:.08em;
}
.return-back-link{
    display:inline-flex;
    align-items:center;
    gap:6px;
    color:var(--of-muted);
    font-size:.76rem;
    font-weight:650;
    text-decoration:none;
}
.return-back-link:hover{ color:var(--of-primary-text); }
.return-sale-chip{
    min-width:190px;
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:2px;
    padding:10px 12px;
    border:1px solid var(--of-border);
    border-radius:12px;
    background:var(--of-surface);
}
.return-sale-chip span, .return-sale-chip small{ color:var(--of-muted); font-size:.71rem; }
.return-sale-chip strong{ color:var(--of-heading); font-size:.86rem; }

.return-kpi-card{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
    padding:14px;
    border:1px solid var(--of-border);
    border-radius:var(--return-radius);
    background:var(--of-surface);
    box-shadow:var(--of-shadow-sm);
}
.return-kpi-icon{
    width:42px;
    height:42px;
    flex:0 0 42px;
    display:grid;
    place-items:center;
    border-radius:11px;
    font-size:1.05rem;
}
.return-kpi-icon.is-primary{ color:var(--of-primary-text); background:var(--of-primary-soft); }
.return-kpi-icon.is-success{ color:var(--of-success-text); background:var(--of-success-soft); }
.return-kpi-icon.is-warning{ color:var(--of-warning-text); background:var(--of-warning-soft); }
.return-kpi-icon.is-info{ color:var(--of-info-accent-text); background:var(--of-info-soft); }
.return-kpi-card > div:last-child{ min-width:0; }
.return-kpi-card span, .return-kpi-card strong, .return-kpi-card small{ display:block; }
.return-kpi-card span{ color:var(--of-muted); font-size:.72rem; font-weight:600; }
.return-kpi-card strong{ margin-top:1px; color:var(--of-heading); font-size:1.05rem; font-weight:750; letter-spacing:-.015em; overflow-wrap:anywhere; }
.return-kpi-card small{ margin-top:2px; color:var(--of-muted); font-size:.66rem; }

.return-filter-card, .return-list-card, .return-section-card, .return-settlement-card, .return-details-shell{
    border-color:var(--of-border);
    border-radius:var(--return-radius);
    box-shadow:var(--of-shadow-sm);
}
.return-filter-card .card-body{ padding:14px; }
.return-list-card{ overflow:visible; }
.return-list-card .card-header{ padding:12px 14px; border-radius:var(--return-radius) var(--return-radius) 0 0; }
.return-list-table thead th, .return-items-table thead th, .return-inspection-table thead th{
    color:var(--of-muted);
    background:var(--of-surface-2);
    font-size:.7rem;
    font-weight:750;
    text-transform:uppercase;
    letter-spacing:.035em;
    white-space:nowrap;
}
.return-list-table tbody td{ padding-top:12px; padding-bottom:12px; }
.return-list-table tbody tr:hover{ background:color-mix(in srgb,var(--of-primary) 2.5%,var(--of-surface)); }
.return-mobile-list{ padding:10px; background:var(--of-surface-2); }
.return-mobile-card{ margin-bottom:10px; padding:14px; border:1px solid var(--of-border); border-radius:12px; background:var(--of-surface); }
.return-mobile-card:last-child{ margin-bottom:0; }
.return-mobile-customer{ color:var(--of-heading); font-weight:700; }
.return-empty-state{
    min-height:260px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    padding:32px 20px;
    text-align:left;
    background:var(--of-surface-2);
}
.return-empty-icon{
    width:48px;
    height:48px;
    flex:0 0 48px;
    display:grid;
    place-items:center;
    border-radius:14px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:1.2rem;
}
.return-empty-state h3{ margin:0 0 4px; color:var(--of-heading); font-size:.95rem; }
.return-empty-state p{ margin:0 0 10px; color:var(--of-muted); font-size:.78rem; }

.return-stepper{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
    padding:7px;
    border:1px solid var(--of-border);
    border-radius:14px;
    background:var(--of-surface-2);
}
.return-stepper a{
    display:flex;
    align-items:center;
    gap:9px;
    min-width:0;
    padding:9px 10px;
    border:1px solid transparent;
    border-radius:10px;
    color:var(--of-muted);
    text-decoration:none;
    background:var(--of-surface);
}
.return-stepper a:hover{ color:var(--of-heading); border-color:var(--of-border); }
.return-stepper a > span{
    width:30px;
    height:30px;
    flex:0 0 30px;
    display:grid;
    place-items:center;
    border-radius:9px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:.75rem;
    font-weight:800;
}
.return-stepper strong, .return-stepper small{ display:block; line-height:1.2; }
.return-stepper strong{ color:inherit; font-size:.76rem; }
.return-stepper small{ margin-top:2px; font-size:.64rem; color:var(--of-muted); }

.return-sale-context{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:0;
    overflow:hidden;
    border:1px solid var(--of-border);
    border-radius:12px;
    background:var(--of-surface);
}
.return-sale-context > div{ min-width:0; padding:11px 13px; border-right:1px solid var(--of-border); }
.return-sale-context > div:last-child{ border-right:0; }
.return-sale-context span, .return-sale-context strong{ display:block; }
.return-sale-context span{ color:var(--of-muted); font-size:.68rem; }
.return-sale-context strong{ margin-top:2px; color:var(--of-heading); font-size:.78rem; font-weight:700; overflow-wrap:anywhere; }

.return-section-card{ overflow:hidden; }
.return-section-header{
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    min-height:58px;
    padding:11px 14px;
}
.return-section-heading{ display:flex; align-items:center; gap:9px; min-width:0; }
.return-section-heading strong, .return-section-heading small{ display:block; }
.return-section-heading strong{ color:var(--of-heading); font-size:.82rem; font-weight:750; }
.return-section-heading small{ margin-top:2px; color:var(--of-muted); font-size:.68rem; font-weight:500; }
.return-section-number{
    width:30px;
    height:30px;
    flex:0 0 30px;
    display:grid;
    place-items:center;
    border-radius:9px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:.73rem;
    font-weight:800;
}
.return-items-scroll{ max-height:520px; overflow:auto; }
.return-items-table thead{ position:sticky; top:0; z-index:2; }
.return-item-row{ transition:background-color .15s ease,box-shadow .15s ease; }
.return-item-row.is-selected{ background:color-mix(in srgb,var(--of-primary) 4%,var(--of-surface)); box-shadow:inset 3px 0 0 var(--of-primary); }
.return-product-icon{
    width:34px;
    height:34px;
    flex:0 0 34px;
    display:grid;
    place-items:center;
    border:1px solid var(--of-border);
    border-radius:9px;
    color:var(--of-muted);
    background:var(--of-surface-2);
}
.return-item-meta{ display:flex; flex-wrap:wrap; gap:4px 8px; }
.return-item-meta span{ color:var(--of-muted); font-size:.65rem; }
.return-available-qty{ color:var(--of-heading); font-size:.84rem; font-weight:750; }
.return-detail-row td{ padding:0!important; border-top:0; }
.return-item-detail-panel{ padding:13px 16px 15px 56px; border-top:1px dashed var(--of-border); background:var(--of-surface-2); }
.return-serial-grid{ display:flex; flex-wrap:wrap; gap:7px; }
.return-serial-option{
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:7px 9px;
    border:1px solid var(--of-border);
    border-radius:9px;
    background:var(--of-surface);
    cursor:pointer;
    font-size:.73rem;
}
.return-serial-option:has(input:checked){ color:var(--of-primary-text); border-color:color-mix(in srgb,var(--of-primary) 35%,var(--of-border)); background:var(--of-primary-soft); }
.return-stock-legend{ display:flex; flex-wrap:wrap; gap:8px 18px; padding:9px 14px; color:var(--of-muted); font-size:.68rem; }
.return-stock-legend span{ display:inline-flex; align-items:center; gap:6px; }
.return-settlement-sticky{ position:sticky; top:80px; }
.return-live-summary{
    display:grid;
    grid-template-columns:.72fr 1.28fr;
    overflow:hidden;
    border:1px solid var(--of-border);
    border-radius:11px;
    background:var(--of-surface-2);
}
.return-live-summary > div{ padding:10px 12px; border-right:1px solid var(--of-border); }
.return-live-summary > div:last-child{ border-right:0; }
.return-live-summary span, .return-live-summary strong{ display:block; }
.return-live-summary span{ color:var(--of-muted); font-size:.67rem; }
.return-live-summary strong{ margin-top:2px; color:var(--of-heading); font-size:.86rem; }
.return-adjustment-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.return-total-panel{
    padding:14px;
    border:1px solid color-mix(in srgb,var(--of-primary) 20%,var(--of-border));
    border-radius:12px;
    background:var(--of-primary-soft);
}
.return-total-panel span, .return-total-panel strong, .return-total-panel small{ display:block; }
.return-total-panel span{ color:var(--of-primary-text); font-size:.7rem; font-weight:700; }
.return-total-panel strong{ margin:2px 0; color:var(--of-heading); font-size:1.4rem; letter-spacing:-.025em; }
.return-total-panel small{ color:var(--of-muted); font-size:.64rem; }
.return-refund-row{ padding:9px; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface-2); }
.return-credit-preview{
    padding:10px 12px;
    border:1px solid var(--of-border);
    border-radius:11px;
    background:var(--of-surface-2);
}
.return-credit-preview > div{ display:flex; justify-content:space-between; gap:12px; padding:4px 0; font-size:.74rem; }
.return-credit-preview .return-credit-row{ margin-top:4px; padding-top:8px; border-top:1px solid var(--of-border); }
.return-credit-preview .return-credit-row strong{ color:var(--of-success-text); }
.return-credit-preview > small{ display:block; margin-top:6px; color:var(--of-muted); font-size:.64rem; line-height:1.4; }
.return-control-note{ display:flex; align-items:flex-start; gap:9px; padding:10px 11px; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface-2); }
.return-control-note > i{ color:var(--of-success-text); margin-top:1px; }
.return-control-note strong, .return-control-note span{ display:block; }
.return-control-note strong{ color:var(--of-heading); font-size:.72rem; }
.return-control-note span{ margin-top:1px; color:var(--of-muted); font-size:.65rem; }

.return-details-hero{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    padding:16px;
    border:1px solid var(--of-border);
    border-radius:var(--return-radius);
    background:var(--of-surface);
    box-shadow:var(--of-shadow-sm);
}
.return-details-identity{ display:flex; align-items:center; gap:13px; min-width:0; }
.return-details-icon{
    width:48px;
    height:48px;
    flex:0 0 48px;
    display:grid;
    place-items:center;
    border-radius:14px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:1.22rem;
}
.return-details-subline{ display:flex; flex-wrap:wrap; gap:5px 14px; margin-top:7px; color:var(--of-muted); font-size:.7rem; }
.return-details-subline span{ display:inline-flex; align-items:center; gap:5px; }
.return-details-actions{ display:flex; flex-wrap:wrap; gap:8px; }
.return-details-shell{ overflow:hidden; }
.return-tabs-wrap{ padding:0 14px; border-bottom:1px solid var(--of-border); background:var(--of-surface); }
.return-tabs{ flex-wrap:nowrap; gap:2px; overflow-x:auto; border:0; scrollbar-width:thin; }
.return-tabs .nav-link{
    display:inline-flex;
    align-items:center;
    gap:7px;
    min-height:46px;
    padding:9px 11px 8px;
    border:0;
    border-bottom:2px solid transparent;
    border-radius:0;
    color:var(--of-muted);
    background:transparent;
    font-size:.75rem;
    font-weight:650;
    white-space:nowrap;
}
.return-tabs .nav-link:hover{ color:var(--of-heading); background:var(--of-surface-2); }
.return-tabs .nav-link.active{ color:var(--of-primary-text); border-bottom-color:var(--of-primary); background:var(--of-primary-soft); }
.return-details-body{ padding:16px; background:var(--of-surface-2); }
.return-summary-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 22px; }
.return-summary-grid > div{ display:grid; grid-template-columns:minmax(100px,.72fr) minmax(0,1.28fr); gap:10px; padding:9px 0; border-bottom:1px dashed var(--of-border); }
.return-summary-grid span{ color:var(--of-muted); font-size:.72rem; }
.return-summary-grid strong{ color:var(--of-heading); font-size:.76rem; overflow-wrap:anywhere; }
.return-notes-panel{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.return-notes-panel > div{ padding:12px; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface-2); }
.return-notes-panel span{ color:var(--of-muted); font-size:.68rem; font-weight:650; }
.return-notes-panel p{ margin:4px 0 0; color:var(--of-heading); font-size:.75rem; line-height:1.5; }
.return-calculation-list > div{ display:flex; justify-content:space-between; gap:14px; padding:7px 0; border-bottom:1px dashed var(--of-border); font-size:.73rem; }
.return-calculation-list > div:last-child{ border-bottom:0; }
.return-calculation-list span{ color:var(--of-muted); }
.return-calculation-list strong{ color:var(--of-heading); }
.return-calculation-list .is-deduction strong{ color:var(--of-danger-text); }
.return-calculation-list .return-calculation-total{ margin-top:4px; padding-top:11px; border-top:1px solid var(--of-border); border-bottom:0; font-size:.82rem; }
.return-calculation-list .return-calculation-total strong{ font-size:1rem; }
.return-serial-badge{ display:inline-flex; align-items:center; gap:5px; margin:0 4px 4px 0; padding:4px 7px; border:1px solid var(--of-border); border-radius:7px; background:var(--of-surface-2); font-size:.68rem; white-space:nowrap; }
.return-credit-balance{ padding:14px; border:1px solid var(--of-success-border); border-radius:12px; background:var(--of-success-soft); }
.return-credit-balance span, .return-credit-balance strong, .return-credit-balance small{ display:block; }
.return-credit-balance span{ color:var(--of-muted); font-size:.68rem; }
.return-credit-balance strong{ margin:2px 0; color:var(--of-success-text); font-size:1.3rem; }
.return-credit-balance small{ color:var(--of-muted); font-size:.65rem; }
.return-empty-inline{ display:flex; align-items:flex-start; gap:10px; padding:24px; color:var(--of-muted); }
.return-empty-inline > i{ width:36px; height:36px; flex:0 0 36px; display:grid; place-items:center; border-radius:10px; color:var(--of-primary-text); background:var(--of-primary-soft); }
.return-empty-inline strong, .return-empty-inline span{ display:block; }
.return-empty-inline strong{ color:var(--of-heading); font-size:.78rem; }
.return-empty-inline span{ margin-top:2px; font-size:.7rem; }
.return-audit-timeline{ position:relative; display:grid; gap:16px; max-width:760px; }
.return-audit-timeline::before{ content:""; position:absolute; left:17px; top:18px; bottom:18px; width:1px; background:var(--of-border); }
.return-audit-timeline > div{ position:relative; display:grid; grid-template-columns:36px minmax(0,1fr); gap:12px; }
.return-audit-dot{ position:relative; z-index:1; width:36px; height:36px; display:grid; place-items:center; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface); }
.return-audit-dot.is-primary{ color:var(--of-primary-text); background:var(--of-primary-soft); }
.return-audit-dot.is-info{ color:var(--of-info-accent-text); background:var(--of-info-soft); }
.return-audit-dot.is-success{ color:var(--of-success-text); background:var(--of-success-soft); }
.return-audit-dot.is-warning{ color:var(--of-warning-text); background:var(--of-warning-soft); }
.return-audit-timeline small, .return-audit-timeline strong, .return-audit-timeline p{ display:block; }
.return-audit-timeline small{ color:var(--of-muted); font-size:.66rem; }
.return-audit-timeline strong{ margin-top:1px; color:var(--of-heading); font-size:.78rem; }
.return-audit-timeline p{ margin:2px 0 0; color:var(--of-muted); font-size:.69rem; }

@media (max-width:1199.98px) {
    .return-settlement-sticky{ position:static; }
    .return-sale-context{ grid-template-columns:repeat(3,minmax(0,1fr)); }
    .return-sale-context > div:nth-child(3){ border-right:0; }
    .return-sale-context > div:nth-child(n/**/+4){ border-top:1px solid var(--of-border); }
}
@media (max-width:991.98px) {
    .return-stepper{ grid-template-columns:repeat(2,minmax(0,1fr)); }
    .return-summary-grid{ grid-template-columns:1fr; }
    .return-notes-panel{ grid-template-columns:1fr; }
    .return-details-hero{ align-items:flex-start; }
}
@media (max-width:767.98px) {
    .return-workspace-header, .return-details-hero{ flex-direction:column; align-items:stretch; }
    .return-workspace-header .d-flex, .return-details-actions{ width:100%; }
    .return-workspace-header .btn, .return-details-actions .btn{ flex:1 1 auto; }
    .return-sale-chip{ width:100%; min-width:0; align-items:flex-start; }
    .return-stepper{ grid-template-columns:1fr 1fr; gap:5px; padding:5px; }
    .return-stepper a{ padding:7px 8px; }
    .return-stepper a > span{ width:27px; height:27px; flex-basis:27px; }
    .return-sale-context{ grid-template-columns:repeat(2,minmax(0,1fr)); }
    .return-sale-context > div{ border-top:1px solid var(--of-border); }
    .return-sale-context > div:nth-child(-n/**/+2){ border-top:0; }
    .return-sale-context > div:nth-child(odd){ border-right:1px solid var(--of-border); }
    .return-sale-context > div:nth-child(even){ border-right:0; }
    .return-section-header{ align-items:flex-start; }
    .return-items-scroll{ max-height:none; }
    .return-item-detail-panel{ padding-left:14px; }
    .return-adjustment-grid{ grid-template-columns:1fr; }
    .return-live-summary{ grid-template-columns:1fr 1fr; }
    .return-details-identity{ align-items:flex-start; }
    .return-details-icon{ width:42px; height:42px; flex-basis:42px; }
    .return-details-body{ padding:11px; }
    .return-tabs-wrap{ padding:0 7px; }
    .return-tabs .nav-link{ min-height:43px; padding:8px 9px; }
    .return-summary-grid > div{ grid-template-columns:1fr; gap:2px; }
}
@media (max-width:575.98px) {
    .return-kpi-card{ padding:11px; gap:9px; }
    .return-kpi-icon{ width:36px; height:36px; flex-basis:36px; border-radius:9px; }
    .return-kpi-card strong{ font-size:.9rem; }
    .return-kpi-card small{ display:none; }
    .return-stepper small{ display:none; }
    .return-stepper strong{ font-size:.7rem; }
    .return-sale-context{ grid-template-columns:1fr; }
    .return-sale-context > div, .return-sale-context > div:nth-child(odd){ border-right:0; border-top:1px solid var(--of-border); }
    .return-sale-context > div:first-child{ border-top:0; }
    .return-details-subline{ flex-direction:column; gap:4px; }
    .return-live-summary{ grid-template-columns:1fr; }
    .return-live-summary > div{ border-right:0; border-bottom:1px solid var(--of-border); }
    .return-live-summary > div:last-child{ border-bottom:0; }
}
@media print {
    .sales-return-workspace .return-tabs-wrap, .sales-return-workspace .return-details-actions, .sales-return-workspace .return-stepper, .sales-return-workspace .return-filter-card{ display:none!important; }
    .sales-return-workspace .return-details-shell, .sales-return-workspace .return-section-card, .sales-return-workspace .return-kpi-card, .sales-return-workspace .return-details-hero{ box-shadow:none!important; }
    .sales-return-workspace .return-details-body{ padding:0; background:var(--of-print-surface); }
    .sales-return-workspace .tab-pane{ display:block!important; opacity:1!important; margin-top:12px; }
}

/* RC54.31 — Contacts workspace redesign */
.contacts-hub{
    --contacts-radius:16px;
    --contacts-soft:color-mix(in srgb,var(--of-primary) 6%,var(--of-surface));
    min-width:0;
}
.contacts-hub-nav{
    position:relative;
    min-width:0;
    padding:6px;
    border:1px solid var(--of-border);
    border-radius:14px;
    background:var(--of-surface);
    box-shadow:var(--of-shadow-sm);
}
.contacts-hub-nav-scroll{
    display:flex;
    align-items:center;
    gap:4px;
    min-width:0;
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:thin;
}
.contacts-hub-nav-link{
    display:inline-flex;
    align-items:center;
    gap:7px;
    flex:0 0 auto;
    min-height:38px;
    padding:8px 11px;
    border:1px solid transparent;
    border-radius:10px;
    color:var(--of-muted);
    background:transparent;
    font-size:.78rem;
    font-weight:650;
    line-height:1;
    text-decoration:none;
    white-space:nowrap;
    transition:background-color .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.contacts-hub-nav-link i{ font-size:.92rem; }
.contacts-hub-nav-link:hover{
    color:var(--of-heading);
    background:var(--of-surface-2);
}
.contacts-hub-nav-link.active{
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    border-color:color-mix(in srgb,var(--of-primary) 18%,var(--of-border));
    box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--of-primary) 4%,transparent);
}
.contacts-hub-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
}
.contacts-hub-heading{ min-width:0; }
.contacts-hub-kicker{
    display:flex;
    align-items:center;
    gap:7px;
    margin-bottom:6px;
    color:var(--of-primary-text);
    font-size:.69rem;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.contacts-hub-header .page-title{ font-size:1.5rem; }
.contacts-hub-header p{ max-width:760px; font-size:.83rem; }
.contacts-hub-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:8px;
    flex:0 0 auto;
}
.contacts-stat-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
}
.contacts-stat-grid-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
.contacts-stat-card{
    display:flex;
    align-items:center;
    gap:13px;
    min-width:0;
    min-height:104px;
    padding:15px 16px;
    border:1px solid var(--of-border);
    border-radius:var(--contacts-radius);
    background:var(--of-surface);
    box-shadow:var(--of-shadow-sm);
}
.contacts-stat-icon{
    width:44px;
    height:44px;
    flex:0 0 44px;
    display:grid;
    place-items:center;
    border-radius:12px;
    font-size:1.05rem;
}
.contacts-stat-icon.is-primary{ color:var(--of-primary-text); background:var(--of-primary-soft); }
.contacts-stat-icon.is-success{ color:var(--of-success-text); background:color-mix(in srgb,var(--of-success) 10%,var(--of-surface)); }
.contacts-stat-icon.is-danger{ color:var(--of-danger-text); background:color-mix(in srgb,var(--of-danger) 9%,var(--of-surface)); }
.contacts-stat-icon.is-money{ color:color-mix(in srgb,var(--of-success-text) 82%,var(--of-heading)); background:color-mix(in srgb,var(--of-success) 8%,var(--of-surface)); }
.contacts-stat-icon.is-warning{ color:color-mix(in srgb,var(--of-warning) 72%,var(--of-heading)); background:color-mix(in srgb,var(--of-warning) 12%,var(--of-surface)); }
.contacts-stat-label{ color:var(--of-muted); font-size:.72rem; font-weight:600; }
.contacts-stat-value{
    margin-top:2px;
    color:var(--of-heading);
    font-size:1.15rem;
    font-weight:750;
    line-height:1.25;
    font-variant-numeric:tabular-nums;
    overflow-wrap:anywhere;
}
.contacts-stat-caption{ margin-top:3px; color:var(--of-muted); font-size:.68rem; line-height:1.35; }
.contacts-filter-panel, .contacts-directory-card, .contacts-import-card, .contacts-access-card{
    overflow:visible;
    border-color:var(--of-border);
    border-radius:var(--contacts-radius);
    box-shadow:var(--of-shadow-sm);
}
.contacts-filter-panel-head, .contacts-directory-head, .contacts-import-card-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:15px 16px;
}
.contacts-filter-panel-head{ padding-bottom:10px; }
.contacts-panel-title{
    display:flex;
    align-items:center;
    gap:8px;
    color:var(--of-heading);
    font-size:.86rem;
    font-weight:700;
}
.contacts-panel-subtitle{ margin-top:2px; color:var(--of-muted); font-size:.72rem; line-height:1.4; }
.contacts-clear-link{
    display:inline-flex;
    align-items:center;
    gap:6px;
    color:var(--of-muted);
    font-size:.72rem;
    font-weight:650;
    text-decoration:none;
    white-space:nowrap;
}
.contacts-clear-link:hover{ color:var(--of-primary-text); }
.contacts-filter-grid{
    display:grid;
    grid-template-columns:minmax(280px,2fr) minmax(150px,.8fr) minmax(180px,1.1fr) minmax(130px,.75fr);
    gap:12px;
    align-items:end;
}
.contacts-filter-grid > *{ min-width:0; }
.contacts-filter-search{ min-width:0; }
.contacts-search-control .input-group-text{ color:var(--of-muted); background:var(--of-surface-2); }
.contacts-filter-submit{ min-width:0; }
.contacts-active-filters{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:7px;
    margin-top:13px;
    padding-top:12px;
    border-top:1px solid var(--of-border);
}
.contacts-active-filters-label{ color:var(--of-muted); font-size:.69rem; font-weight:650; }
.contacts-filter-chip{
    display:inline-flex;
    align-items:center;
    gap:7px;
    max-width:280px;
    padding:5px 8px;
    border:1px solid color-mix(in srgb,var(--of-primary) 16%,var(--of-border));
    border-radius:999px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:.68rem;
    font-weight:650;
    text-decoration:none;
}
.contacts-filter-chip span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.contacts-directory-head{
    border-bottom:1px solid var(--of-border);
    background:color-mix(in srgb,var(--of-surface) 97%,var(--of-surface-2));
    border-radius:var(--contacts-radius) var(--contacts-radius) 0 0;
}
.contacts-directory-tools{ display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.contacts-result-count, .contacts-count-badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 9px;
    border:1px solid var(--of-border);
    border-radius:999px;
    color:var(--of-muted);
    background:var(--of-surface-2);
    font-size:.69rem;
    font-weight:650;
    white-space:nowrap;
}
.contacts-table-shell{ overflow-x:auto; }
.contacts-table{ min-width:980px; }
.contacts-table > :not(caption) > * > *{ padding:12px 14px; }
.contacts-table thead th{
    color:var(--of-muted);
    background:var(--of-surface-2);
    border-bottom-color:var(--of-border);
    font-size:.67rem;
    letter-spacing:.055em;
    text-transform:uppercase;
    white-space:nowrap;
}
.contacts-table tbody tr{ transition:background-color .14s ease; }
.contacts-table tbody tr:hover{ background:color-mix(in srgb,var(--of-primary) 2.8%,var(--of-surface)); }
.contacts-table tbody td{ border-bottom-color:color-mix(in srgb,var(--of-border) 82%,transparent); }
.contacts-contact-cell{ display:flex; align-items:center; gap:10px; min-width:0; }
.contact-avatar{
    width:38px;
    height:38px;
    flex:0 0 38px;
    display:grid;
    place-items:center;
    border-radius:11px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    border:1px solid color-mix(in srgb,var(--of-primary) 12%,var(--of-border));
}
.contacts-contact-name{
    display:block;
    max-width:260px;
    color:var(--of-heading);
    font-size:.79rem;
    font-weight:680;
    line-height:1.3;
    text-decoration:none;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.contacts-contact-name:hover{ color:var(--of-primary-text); }
.contacts-contact-code{ margin-top:2px; color:var(--of-muted); font-size:.68rem; line-height:1.3; }
.contacts-group-pill{
    display:inline-flex;
    align-items:center;
    max-width:180px;
    padding:5px 8px;
    border-radius:999px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:.68rem;
    font-weight:650;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.contacts-detail-stack{ display:grid; gap:3px; min-width:0; }
.contacts-detail-stack span{
    display:flex;
    align-items:center;
    gap:6px;
    max-width:250px;
    min-width:0;
    color:var(--of-text);
    font-size:.73rem;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.contacts-detail-stack i{ color:var(--of-muted); font-size:.72rem; }
.contacts-detail-stack .contacts-detail-muted{ color:var(--of-muted); }
.contacts-term-value{ color:var(--of-heading); font-size:.76rem; font-weight:680; font-variant-numeric:tabular-nums; }
.contacts-term-label{ margin-top:2px; color:var(--of-muted); font-size:.67rem; }
.contacts-balance-value{ color:var(--of-heading); font-size:.78rem; font-weight:720; font-variant-numeric:tabular-nums; white-space:nowrap; }
.contacts-balance-value.is-receivable{ color:var(--of-danger-text); }
.contacts-balance-value.is-credit{ color:var(--of-success-text); }
.contacts-status-pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:5px 8px;
    border:1px solid var(--of-border);
    border-radius:999px;
    color:var(--of-muted);
    background:var(--of-surface-2);
    font-size:.67rem;
    font-weight:700;
    white-space:nowrap;
}
.contacts-status-pill > span{ width:6px; height:6px; border-radius:50%; background:currentColor; }
.contacts-status-pill.is-active{ color:var(--of-success-text); border-color:color-mix(in srgb,var(--of-success) 20%,var(--of-border)); background:color-mix(in srgb,var(--of-success) 8%,var(--of-surface)); }
.contacts-status-pill.is-inactive{ color:var(--of-muted); }
.contacts-export-tag{ display:flex; align-items:center; gap:5px; color:var(--of-muted); font-size:.65rem; }
.contacts-empty-state{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    min-height:210px;
    padding:28px 18px;
    color:var(--of-muted);
    text-align:center;
}
.contacts-empty-state .contacts-empty-icon{
    width:48px;
    height:48px;
    display:grid;
    place-items:center;
    margin-bottom:10px;
    border-radius:14px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:1.15rem;
}
.contacts-empty-state strong{ color:var(--of-heading); font-size:.86rem; }
.contacts-empty-state > span{ margin-top:3px; font-size:.73rem; }
.contacts-mobile-card{ padding:15px; }
.contacts-mobile-meta{ display:flex; flex-wrap:wrap; gap:7px 12px; }
.contacts-mobile-meta span{ display:inline-flex; align-items:center; gap:5px; min-width:0; color:var(--of-muted); font-size:.7rem; overflow-wrap:anywhere; }
.contacts-mobile-finance{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    padding:11px 12px;
    border:1px solid var(--of-border);
    border-radius:11px;
    background:var(--of-surface-2);
}
.contacts-mobile-finance > div{ min-width:0; }
.contacts-mobile-finance span, .contacts-mobile-finance strong, .contacts-mobile-finance small{ display:block; }
.contacts-mobile-finance span{ color:var(--of-muted); font-size:.65rem; }
.contacts-mobile-finance strong{ margin-top:2px; color:var(--of-heading); font-size:.76rem; font-weight:700; overflow-wrap:anywhere; }
.contacts-mobile-finance small{ margin-top:2px; color:var(--of-muted); font-size:.63rem; }
.contacts-pagination-footer{ padding:11px 14px; background:var(--of-surface); border-top-color:var(--of-border); }
.contacts-count-link{ display:inline-flex; flex-direction:column; color:var(--of-heading); text-decoration:none; }
.contacts-count-link strong{ font-size:.78rem; }
.contacts-count-link span{ margin-top:1px; color:var(--of-primary-text); font-size:.65rem; }
.contacts-group-guide, .contacts-access-guide, .contacts-import-tip{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:12px 14px;
    border:1px solid color-mix(in srgb,var(--of-primary) 13%,var(--of-border));
    border-radius:12px;
    color:var(--of-muted);
    background:var(--contacts-soft);
    font-size:.73rem;
    line-height:1.45;
}
.contacts-group-guide > i, .contacts-access-guide > i, .contacts-import-tip > i{ color:var(--of-primary-text); font-size:.95rem; }
.contacts-group-guide strong, .contacts-group-guide span{ display:block; }
.contacts-group-guide strong{ color:var(--of-heading); font-size:.78rem; }
.contacts-group-guide span{ margin-top:2px; }
.contacts-form-modal .modal-content{ border:1px solid var(--of-border); border-radius:16px; overflow:hidden; }
.contacts-form-modal .modal-header{ align-items:flex-start; padding:17px 18px; }
.contacts-form-modal .modal-body{ padding:18px; background:var(--of-surface-2); }
.contacts-form-modal .modal-footer{ padding:12px 18px; background:var(--of-surface); }

/* Contact create/edit pages */
.contacts-editor-shell{
    display:grid;
    grid-template-columns:minmax(220px,280px) minmax(0,1fr);
    gap:16px;
    align-items:start;
}
.contacts-editor-aside{
    position:sticky;
    top:calc(var(--of-topbar-height) + 14px);
    padding:18px;
    border:1px solid var(--of-border);
    border-radius:var(--contacts-radius);
    background:linear-gradient(180deg,var(--contacts-soft),var(--of-surface));
    box-shadow:var(--of-shadow-sm);
}
.contacts-editor-aside-icon{
    width:44px;
    height:44px;
    display:grid;
    place-items:center;
    margin-bottom:13px;
    border-radius:12px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:1.05rem;
}
.contacts-editor-aside h2{ margin:0; color:var(--of-heading); font-size:1rem; font-weight:750; line-height:1.35; }
.contacts-editor-aside p{ margin:8px 0 0; color:var(--of-muted); font-size:.73rem; line-height:1.55; }
.contacts-editor-checks{ display:grid; gap:8px; margin-top:16px; padding-top:14px; border-top:1px solid var(--of-border); }
.contacts-editor-checks span{ display:flex; align-items:center; gap:8px; color:var(--of-text); font-size:.72rem; font-weight:600; }
.contacts-editor-checks i{ color:var(--of-success-text); }
.contacts-editor-workspace .contact-editor-card{ overflow:hidden; border-radius:var(--contacts-radius); box-shadow:var(--of-shadow-sm); }
.contacts-editor-workspace .contact-editor-section{ padding:18px; }
.contacts-editor-footer{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; padding:12px 16px; }
.contacts-form-alert{ border-radius:12px; }

/* Contact import */
.contacts-import-grid{ display:grid; grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr); gap:16px; align-items:start; }
.contacts-import-main, .contacts-import-history{ min-width:0; }
.contacts-import-history{ position:sticky; top:calc(var(--of-topbar-height) + 14px); }
.contacts-import-card-head{ justify-content:flex-start; border-bottom:1px solid var(--of-border); }
.contacts-import-step{
    width:30px;
    height:30px;
    flex:0 0 30px;
    display:grid;
    place-items:center;
    border-radius:9px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:.75rem;
    font-weight:750;
}
.contacts-upload-zone{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    min-height:235px;
    padding:22px;
    border:1px dashed color-mix(in srgb,var(--of-primary) 32%,var(--of-border));
    border-radius:14px;
    background:var(--of-surface-2);
    text-align:center;
    cursor:pointer;
}
.contacts-upload-icon{
    width:52px;
    height:52px;
    display:grid;
    place-items:center;
    margin-bottom:10px;
    border-radius:15px;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    font-size:1.28rem;
}
.contacts-upload-zone strong{ color:var(--of-heading); font-size:.86rem; }
.contacts-upload-zone > span:not(.contacts-upload-icon){ margin-top:3px; color:var(--of-muted); font-size:.7rem; }
.contacts-upload-zone .form-control{ max-width:430px; }
.contacts-import-feature-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.contacts-import-feature-grid > div{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:11px;
    border:1px solid var(--of-border);
    border-radius:11px;
    background:var(--of-surface);
}
.contacts-import-feature-grid > div > i{ width:28px; height:28px; flex:0 0 28px; display:grid; place-items:center; border-radius:8px; color:var(--of-primary-text); background:var(--of-primary-soft); }
.contacts-import-feature-grid strong, .contacts-import-feature-grid small{ display:block; }
.contacts-import-feature-grid strong{ color:var(--of-heading); font-size:.73rem; }
.contacts-import-feature-grid small{ margin-top:2px; color:var(--of-muted); font-size:.66rem; line-height:1.4; }
.contacts-import-history-list{ display:grid; }
.contacts-import-history-item{ display:flex; align-items:flex-start; gap:11px; padding:14px 15px; border-bottom:1px solid var(--of-border); }
.contacts-import-history-item:last-child{ border-bottom:0; }
.contacts-import-file-icon{ width:36px; height:36px; flex:0 0 36px; display:grid; place-items:center; border-radius:10px; color:var(--of-muted); background:var(--of-surface-2); }
.contacts-import-file-icon.is-success{ color:var(--of-success-text); background:color-mix(in srgb,var(--of-success) 8%,var(--of-surface)); }
.contacts-import-file-icon.is-danger{ color:var(--of-danger-text); background:color-mix(in srgb,var(--of-danger) 8%,var(--of-surface)); }
.contacts-import-file-icon.is-warning{ color:color-mix(in srgb,var(--of-warning) 70%,var(--of-heading)); background:color-mix(in srgb,var(--of-warning) 11%,var(--of-surface)); }
.contacts-import-file-name{ max-width:250px; color:var(--of-heading); font-size:.75rem; font-weight:680; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.contacts-import-status{ flex:0 0 auto; padding:4px 6px; border-radius:999px; color:var(--of-muted); background:var(--of-surface-2); font-size:.61rem; font-weight:700; }
.contacts-import-status.is-success{ color:var(--of-success-text); background:color-mix(in srgb,var(--of-success) 8%,var(--of-surface)); }
.contacts-import-status.is-danger{ color:var(--of-danger-text); background:color-mix(in srgb,var(--of-danger) 8%,var(--of-surface)); }
.contacts-import-status.is-warning{ color:color-mix(in srgb,var(--of-warning) 70%,var(--of-heading)); background:color-mix(in srgb,var(--of-warning) 11%,var(--of-surface)); }
.contacts-import-meta, .contacts-import-result{ display:flex; flex-wrap:wrap; gap:4px 10px; margin-top:5px; color:var(--of-muted); font-size:.64rem; }
.contacts-import-result span{ display:inline-flex; align-items:center; gap:4px; }

/* Contact access */
.contacts-access-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.contacts-access-card{ overflow:hidden; }
.contacts-access-card-head{ display:flex; align-items:center; gap:11px; padding:14px 15px; border-bottom:1px solid var(--of-border); background:var(--of-surface); }
.contacts-user-avatar{ width:40px; height:40px; flex:0 0 40px; display:grid; place-items:center; border-radius:11px; color:var(--of-primary-text); background:var(--of-primary-soft); font-size:.75rem; font-weight:750; }
.contacts-access-name{ color:var(--of-heading); font-size:.78rem; font-weight:700; }
.contacts-access-email{ margin-top:2px; color:var(--of-muted); font-size:.67rem; overflow-wrap:anywhere; }
.contacts-access-badge{ display:inline-flex; align-items:center; gap:5px; flex:0 0 auto; padding:5px 8px; border-radius:999px; font-size:.64rem; font-weight:700; }
.contacts-access-badge.is-restricted{ color:color-mix(in srgb,var(--of-warning) 72%,var(--of-heading)); background:color-mix(in srgb,var(--of-warning) 11%,var(--of-surface)); }
.contacts-access-badge.is-open{ color:var(--of-success-text); background:color-mix(in srgb,var(--of-success) 9%,var(--of-surface)); }
.contacts-access-form{ display:grid; gap:16px; }
.contacts-access-switch{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px; border:1px solid var(--of-border); border-radius:11px; background:var(--of-surface-2); }
.contacts-access-switch strong, .contacts-access-switch span{ display:block; }
.contacts-access-switch strong{ color:var(--of-heading); font-size:.74rem; }
.contacts-access-switch span{ margin-top:2px; color:var(--of-muted); font-size:.66rem; }

/* Integrate the existing contact profile into the new contacts workspace. */
.contacts-hub.contact-profile-page-modern .contact-profile-hero, .contacts-hub.contact-profile-page-modern .contact-profile-workspace, .contacts-hub.contact-profile-page-modern .contact-profile-stat-card{ border-radius:var(--contacts-radius); }
.contacts-hub.contact-profile-page-modern .contact-profile-hero{ background:linear-gradient(180deg,color-mix(in srgb,var(--of-primary) 3%,var(--of-surface)),var(--of-surface)); }
.contacts-hub.contact-profile-page-modern .contact-profile-tabs-wrap{ border-radius:var(--contacts-radius) var(--contacts-radius) 0 0; }

@media (max-width:1199.98px) {
    .contacts-stat-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
    .contacts-stat-grid-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
    .contacts-filter-grid{ grid-template-columns:minmax(250px,1.7fr) minmax(140px,.7fr) minmax(170px,1fr); }
    .contacts-filter-submit{ grid-column:auto; }
    .contacts-import-grid{ grid-template-columns:1fr; }
    .contacts-import-history{ position:static; }
}
@media (max-width:991.98px) {
    .contacts-hub-header{ flex-direction:column; align-items:stretch; }
    .contacts-hub-actions{ justify-content:flex-start; }
    .contacts-filter-grid{ grid-template-columns:1fr 1fr; }
    .contacts-filter-search{ grid-column:1/-1; }
    .contacts-editor-shell{ grid-template-columns:1fr; }
    .contacts-editor-aside{ position:static; }
    .contacts-access-grid{ grid-template-columns:1fr; }
    .contacts-stat-grid-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:767.98px) {
    .contacts-hub-nav{ margin-inline:-2px; padding:5px; border-radius:12px; }
    .contacts-hub-nav-link{ min-height:36px; padding:7px 9px; }
    .contacts-hub-header .page-title{ font-size:1.25rem; }
    .contacts-stat-card{ min-height:92px; padding:12px; gap:10px; }
    .contacts-stat-icon{ width:38px; height:38px; flex-basis:38px; border-radius:10px; }
    .contacts-stat-value{ font-size:.98rem; }
    .contacts-stat-caption{ font-size:.64rem; }
    .contacts-filter-panel-head, .contacts-directory-head, .contacts-import-card-head{ align-items:flex-start; }
    .contacts-filter-panel-head{ flex-direction:column; }
    .contacts-filter-grid{ grid-template-columns:1fr; }
    .contacts-filter-search{ grid-column:auto; }
    .contacts-directory-head{ flex-direction:column; }
    .contacts-directory-tools{ width:100%; justify-content:flex-start; }
    .contacts-mobile-card{ border-radius:0; }
    .contacts-import-feature-grid{ grid-template-columns:1fr; }
    .contacts-editor-aside{ padding:15px; }
    .contacts-access-card-head{ align-items:flex-start; flex-wrap:wrap; }
    .contacts-access-badge{ margin-left:auto; }
}
@media (max-width:575.98px) {
    .contacts-hub-actions{ display:grid; grid-template-columns:1fr 1fr; width:100%; }
    .contacts-hub-actions > .btn, .contacts-hub-actions > a{ width:100%; }
    .contacts-hub-actions > :only-child{ grid-column:1/-1; }
    .contacts-stat-grid, .contacts-stat-grid-3{ grid-template-columns:1fr 1fr; gap:8px; }
    .contacts-stat-card{ align-items:flex-start; min-height:106px; padding:11px; }
    .contacts-stat-icon{ width:34px; height:34px; flex-basis:34px; }
    .contacts-stat-caption{ display:none; }
    .contacts-mobile-finance{ grid-template-columns:1fr; }
    .contacts-mobile-finance > .text-end{ text-align:left!important; padding-top:9px; border-top:1px solid var(--of-border); }
    .contacts-editor-footer .btn{ flex:1 1 auto; }
    .contacts-upload-zone{ min-height:205px; padding:16px; }
    .contacts-access-switch{ align-items:flex-start; }
}

/* RC54.40 — Purchase & Sale report rebuild */
.purchase-sale-report-page{min-width:0}.purchase-sale-report-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.purchase-sale-report-subtitle{color:var(--of-muted);font-size:.88rem}.purchase-sale-filter-card{box-shadow:none}.purchase-sale-filter-grid{display:grid;grid-template-columns:minmax(230px,1.7fr) repeat(2,minmax(150px,.8fr)) minmax(150px,.8fr);gap:.75rem;align-items:end}.purchase-sale-filter-action{align-self:end}.purchase-sale-overall-card .card-body{padding:1.1rem 1.25rem}.purchase-sale-overall-title{display:flex;align-items:center;gap:.5rem;font-weight:800;color:var(--of-heading);font-size:.92rem}.purchase-sale-overall-values{display:flex;flex-wrap:wrap;gap:1rem 3rem;margin-top:1rem}.purchase-sale-overall-values>div{display:flex;align-items:baseline;gap:.45rem;font-size:1rem}.purchase-sale-overall-values span{font-weight:700;color:var(--of-muted)}.purchase-sale-overall-values strong{font-size:1.15rem;font-weight:850;font-variant-numeric:tabular-nums}.purchase-sale-detail-card{min-width:0}.purchase-sale-table-scroll{max-height:420px}.purchase-sale-table td, .purchase-sale-table th{font-variant-numeric:tabular-nums}
@media(max-width:900px){.purchase-sale-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.purchase-sale-report-header{align-items:stretch;flex-direction:column}.purchase-sale-report-header>.d-flex{justify-content:flex-start}}
@media(max-width:560px){.purchase-sale-filter-grid{grid-template-columns:1fr}.purchase-sale-overall-values{display:grid;gap:.7rem}.purchase-sale-overall-values>div{display:grid;gap:.15rem}.purchase-sale-report-subtitle{display:block;width:100%;margin-top:.3rem}}
@media print{.purchase-sale-report-header .eyebrow, .purchase-sale-detail-card{display:none!important}.purchase-sale-overall-card{break-inside:avoid}.purchase-sale-report-subtitle{color:var(--of-print-muted)}.purchase-sale-overall-values strong{color:var(--of-print-text)!important}}

/* RC54.43 — Tax Report workspace redesign */
.tax3-page{--tax3-blue:var(--of-primary);--tax3-blue-soft:var(--of-primary-soft);--tax3-border:var(--of-border);--tax3-muted:var(--of-muted)}
.tax3-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.tax3-title-wrap{min-width:0}.tax3-title-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.tax3-subtitle{color:var(--of-muted);font-size:13px;margin-top:4px}.tax3-period-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border:1px solid var(--of-border);background:var(--of-surface);border-radius:999px;color:var(--of-muted);font-size:12px;font-weight:600}.tax3-head-actions{display:flex;gap:8px;flex-wrap:wrap}
.tax3-overview-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(360px,.65fr);gap:14px}.tax3-position-card{position:relative;overflow:hidden;border:1px solid color-mix(in srgb,var(--of-primary) 20%,var(--of-border));background:linear-gradient(135deg,color-mix(in srgb,var(--of-primary) 8%,var(--of-surface)),var(--of-surface) 52%);border-radius:var(--of-radius-lg);padding:20px;box-shadow:var(--of-shadow-sm)}.tax3-position-card:before{content:"";position:absolute;right:-50px;top:-75px;width:190px;height:190px;border-radius:50%;background:color-mix(in srgb,var(--of-primary) 8%,transparent);pointer-events:none}.tax3-position-card.is-recoverable{border-color:color-mix(in srgb,var(--of-success) 25%,var(--of-border));background:linear-gradient(135deg,color-mix(in srgb,var(--of-success) 7%,var(--of-surface)),var(--of-surface) 52%)}.tax3-position-main{position:relative;display:flex;align-items:flex-start;gap:14px}.tax3-position-icon{width:46px;height:46px;flex:0 0 46px;border-radius:13px;display:inline-flex;align-items:center;justify-content:center;background:var(--of-primary);color:var(--of-inverse-text);font-size:21px;box-shadow:0 8px 20px color-mix(in srgb,var(--of-primary) 24%,transparent)}.tax3-position-card.is-recoverable .tax3-position-icon{background:var(--of-success)}.tax3-position-label{font-size:12px;text-transform:uppercase;letter-spacing:.065em;font-weight:800;color:var(--of-muted)}.tax3-position-value{font-size:30px;line-height:1.15;font-weight:800;color:var(--of-heading);margin:3px 0}.tax3-position-help{font-size:12px;color:var(--of-muted)}.tax3-position-equation{position:relative;display:grid;grid-template-columns:1fr auto 1fr auto 1fr;align-items:center;gap:10px;margin-top:20px;padding-top:15px;border-top:1px dashed color-mix(in srgb,var(--of-primary) 18%,var(--of-border))}.tax3-position-equation span{display:flex;flex-direction:column;min-width:0}.tax3-position-equation small{color:var(--of-muted);font-size:11px}.tax3-position-equation strong{font-size:13px;color:var(--of-heading);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tax3-position-equation b{color:var(--of-muted);font-weight:700}
.tax3-metric-stack{display:grid;grid-template-columns:1fr;gap:8px}.tax3-metric-card{display:flex;align-items:center;gap:12px;border:1px solid var(--of-border);background:var(--of-surface);border-radius:var(--of-radius-lg);padding:12px 14px;box-shadow:var(--of-shadow-sm);min-width:0}.tax3-metric-icon{width:38px;height:38px;flex:0 0 38px;border-radius:11px;display:flex;align-items:center;justify-content:center;font-size:16px}.tax3-metric-output .tax3-metric-icon{background:color-mix(in srgb,var(--of-info) 11%,var(--of-surface));color:var(--of-info-text)}.tax3-metric-input .tax3-metric-icon{background:color-mix(in srgb,var(--of-success) 11%,var(--of-surface));color:var(--of-success-text)}.tax3-metric-expense .tax3-metric-icon{background:color-mix(in srgb,var(--of-warning) 11%,var(--of-surface));color:var(--of-warning-text)}.tax3-metric-card>div{min-width:0;display:grid;grid-template-columns:1fr auto;column-gap:8px;align-items:baseline;width:100%}.tax3-metric-card small{grid-column:1;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--of-muted)}.tax3-metric-card strong{grid-column:1;font-size:16px;color:var(--of-heading);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tax3-metric-card span:not(.tax3-metric-icon){grid-column:2;grid-row:1 / span 2;font-size:11px;color:var(--of-muted);align-self:center}
.tax3-filter-card, .tax3-workspace-card{border:1px solid var(--of-border);border-radius:var(--of-radius-lg);box-shadow:var(--of-shadow-sm);overflow:hidden}.tax3-filter-head{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--of-surface);padding:11px 14px;border-bottom:1px solid var(--of-border)}.tax3-filter-head>div:first-child{display:flex;align-items:center;gap:9px}.tax3-filter-head>div:first-child>div{display:flex;flex-direction:column}.tax3-filter-head small{font-size:11px;color:var(--of-muted);font-weight:400}.tax3-section-icon{width:32px;height:32px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:var(--of-primary-soft);color:var(--of-primary-text)}.tax3-filter-status{display:inline-flex;align-items:center;gap:5px;color:var(--of-muted);font-size:11px;font-weight:600}.tax3-filter-grid{display:grid;grid-template-columns:1.2fr 1.2fr .8fr .8fr auto;gap:10px;align-items:end}.tax3-field .form-label{font-size:11px;font-weight:700;color:var(--of-muted);margin-bottom:5px}.tax3-field .input-group-text{background:var(--of-surface-2);color:var(--of-muted);border-color:var(--of-border)}.tax3-filter-actions{display:flex;align-items:center;gap:7px}.tax3-filter-actions .btn{min-width:74px}
.tax3-workspace-card{background:var(--of-surface)}.tax3-tabs-shell{padding:10px 10px 0;background:var(--of-surface-2);border-bottom:1px solid var(--of-border)}.tax3-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.tax3-tab{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;padding:11px 12px;border:1px solid transparent;border-bottom:0;border-radius:10px 10px 0 0;color:var(--of-muted);text-decoration:none;min-width:0;transition:background .15s ease,border-color .15s ease,color .15s ease}.tax3-tab:hover{background:color-mix(in srgb,var(--of-primary) 4%,var(--of-surface));color:var(--of-primary-text)}.tax3-tab.active{background:var(--of-surface);border-color:var(--of-border);color:var(--of-heading)}.tax3-tab.active:after{content:"";position:absolute;left:12px;right:12px;bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--of-primary)}.tax3-tab-icon{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:var(--of-surface-3);color:var(--of-muted)}.tax3-tab.active .tax3-tab-icon{background:var(--of-primary-soft);color:var(--of-primary-text)}.tax3-tab-text{display:flex;flex-direction:column;min-width:0}.tax3-tab-text strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tax3-tab-text small{font-size:10px;color:var(--of-muted)}.tax3-tab-value{font-size:11px;font-weight:700;white-space:nowrap;color:var(--of-heading)}
.tax3-workspace-body{padding:14px}.tax3-table-head{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px solid var(--of-border)}.tax3-table-title-row{display:flex;align-items:center;gap:10px}.tax3-table-icon{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:var(--of-primary-soft);color:var(--of-primary-text);font-size:15px}.tax3-table-title-row h5{font-size:15px}.tax3-table-title-row p{font-size:11px;color:var(--of-muted);margin-top:2px}.tax3-table-summary{display:flex;align-items:stretch;border:1px solid var(--of-border);border-radius:10px;overflow:hidden;background:var(--of-surface-2)}.tax3-table-summary>span{display:flex;flex-direction:column;padding:7px 11px;min-width:105px;border-left:1px solid var(--of-border)}.tax3-table-summary>span:first-child{border-left:0}.tax3-table-summary small{font-size:9px;text-transform:uppercase;letter-spacing:.045em;color:var(--of-muted)}.tax3-table-summary strong{font-size:12px;color:var(--of-heading);white-space:nowrap}
.tax3-toolbar{display:grid;grid-template-columns:auto minmax(220px,1fr) auto;gap:10px;align-items:center;padding:12px 0}.tax3-page-size label{display:flex;align-items:center;gap:6px;margin:0;font-size:11px;font-weight:600;color:var(--of-muted)}.tax3-page-size select{width:auto;min-width:64px}.tax3-search-form{max-width:440px;width:100%;justify-self:center}.tax3-toolbar-actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}.tax3-toolbar-actions .btn{border-color:var(--of-border);color:var(--of-text)}
.tax3-table-wrap{border:1px solid var(--of-border);border-radius:10px;overflow:auto}.tax3-table{min-width:860px}.tax3-table thead th{position:sticky;top:0;z-index:1;background:var(--of-surface-2);border-bottom:1px solid var(--of-border);color:var(--of-muted);font-size:10px;text-transform:uppercase;letter-spacing:.045em;font-weight:800;white-space:nowrap;padding:10px 11px}.tax3-table tbody td{padding:10px 11px;font-size:12px;border-color:color-mix(in srgb,var(--of-border) 75%,transparent);vertical-align:middle}.tax3-table tbody tr{transition:background .12s ease}.tax3-table tbody tr:hover{background:color-mix(in srgb,var(--of-primary) 3%,var(--of-surface))}.tax3-table tfoot th{padding:10px 11px;background:var(--of-surface-3);border-top:1px solid var(--of-border);font-size:11px;color:var(--of-heading)}.tax3-reference{font-weight:700;color:var(--of-heading)}.tax3-money{font-variant-numeric:tabular-nums;font-weight:650;color:var(--of-heading)}.tax3-tax-number{display:inline-flex;padding:3px 7px;background:var(--of-surface-3);border-radius:6px;color:var(--of-muted);font-size:10px}.tax3-date{display:flex;flex-direction:column;line-height:1.25}.tax3-date strong{font-size:11px;font-weight:650}.tax3-date small{font-size:9px;color:var(--of-muted)}.tax3-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:42px 16px;color:var(--of-muted)}.tax3-empty>span{width:46px;height:46px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:var(--of-primary-soft);color:var(--of-primary-text);font-size:19px;margin-bottom:9px}.tax3-empty strong{color:var(--of-heading);font-size:13px}.tax3-empty p{margin:3px 0 11px;font-size:11px}.tax3-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:12px}.tax3-pagination-copy, .tax3-pagination-page{font-size:11px;color:var(--of-muted)}.tax3-pagination .page-link{display:flex;align-items:center;gap:4px;min-width:30px;justify-content:center;border-radius:7px!important;margin:0 1px;border-color:var(--of-border)}
@media (max-width:1199.98px){.tax3-overview-grid{grid-template-columns:1fr}.tax3-metric-stack{grid-template-columns:repeat(3,minmax(0,1fr))}.tax3-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tax3-filter-actions{grid-column:span 2;justify-content:flex-end}.tax3-toolbar{grid-template-columns:auto 1fr}.tax3-search-form{max-width:none;justify-self:stretch}.tax3-toolbar-actions{grid-column:1/-1;justify-content:flex-end}}
@media (max-width:767.98px){.tax3-page-head{align-items:stretch}.tax3-head-actions{width:100%}.tax3-head-actions>.btn, .tax3-head-actions>.btn-group{flex:1}.tax3-head-actions>.btn-group .btn{flex:1}.tax3-period-pill{width:max-content}.tax3-position-card{padding:15px}.tax3-position-value{font-size:24px}.tax3-position-equation{grid-template-columns:1fr;gap:6px}.tax3-position-equation>b{display:none}.tax3-position-equation span{flex-direction:row;justify-content:space-between;gap:8px}.tax3-metric-stack{grid-template-columns:1fr}.tax3-filter-head{align-items:flex-start}.tax3-filter-status{display:none}.tax3-filter-grid{grid-template-columns:1fr}.tax3-filter-actions{grid-column:auto}.tax3-filter-actions .btn{flex:1}.tax3-tabs-shell{overflow-x:auto;padding-bottom:0}.tax3-tabs{display:flex;min-width:max-content}.tax3-tab{width:245px;grid-template-columns:auto minmax(0,1fr);border:1px solid var(--of-border);border-bottom:0}.tax3-tab-value{display:none}.tax3-table-head{align-items:stretch}.tax3-table-summary{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}.tax3-table-summary>span{min-width:0;border-left:1px solid var(--of-border)}.tax3-table-summary>span:first-child{border-left:0}.tax3-toolbar{grid-template-columns:1fr}.tax3-page-size, .tax3-search-form, .tax3-toolbar-actions{width:100%}.tax3-toolbar-actions{grid-column:auto;justify-content:flex-start}.tax3-toolbar-actions .btn{flex:1}.tax3-pagination{align-items:stretch;flex-direction:column}.tax3-pagination .pagination{justify-content:space-between}.tax3-pagination .page-item .page-link span{display:none}}
@media (max-width:479.98px){.tax3-table-summary{grid-template-columns:1fr}.tax3-table-summary>span{border-left:0;border-top:1px solid var(--of-border)}.tax3-table-summary>span:first-child{border-top:0}.tax3-position-main{gap:10px}.tax3-position-icon{width:40px;height:40px;flex-basis:40px}.tax3-position-value{font-size:21px}}
@media print{.tax3-head-actions, .tax3-filter-card, .tax3-tabs-shell, .tax3-toolbar, .tax3-pagination{display:none!important}.tax3-overview-grid{grid-template-columns:1.35fr .65fr}.tax3-metric-stack{grid-template-columns:1fr}.tax3-position-card, .tax3-metric-card, .tax3-workspace-card{box-shadow:none!important}.tax3-table-wrap{overflow:visible!important;border:0}.tax3-table{min-width:0}.tax3-table thead th{position:static}}

/* RC54.56 — Reports deep UI/UX + Light/Dark mode hardening */
.reports-route .report-filter-card, .reports-route .report-table-card, .reports-route .pl-analysis-card{
    border-color:var(--of-border);
    border-radius:var(--of-radius-lg);
    background:var(--of-surface);
    box-shadow:var(--of-shadow-sm);
}
.reports-route .report-filter-card .card-body{padding:14px 16px}
.reports-route .advanced-report-table thead th{
    color:var(--of-muted);
    background:var(--of-surface-2);
    border-bottom-color:var(--of-border);
}
.reports-route .advanced-report-table tbody tr:hover{
    background:color-mix(in srgb,var(--of-primary) 4%,var(--of-surface));
}
.reports-route .advanced-report-table tfoot th{
    color:var(--of-heading);
    background:var(--of-surface-3);
    border-top-color:var(--of-border);
}
.reports-route .report-table-scroll, .reports-route .table-responsive{
    scrollbar-color:color-mix(in srgb,var(--of-primary) 30%,transparent) transparent;
}
.reports-route .page-link{
    color:var(--of-text);
    background:var(--of-surface);
    border-color:var(--of-border);
}
.reports-route .page-link:hover, .reports-route .page-link:focus{
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
    border-color:color-mix(in srgb,var(--of-primary) 24%,var(--of-border));
}
.reports-route .page-item.active .page-link{
    color:var(--of-inverse-text);
    background:var(--of-primary);
    border-color:var(--of-primary);
}
.reports-route .page-item.disabled .page-link{
    color:var(--of-muted);
    background:var(--of-surface-2);
    border-color:var(--of-border);
    opacity:.72;
}
.reports-route .badge.text-bg-light{
    color:var(--of-text)!important;
    background:var(--of-surface-3)!important;
    border:1px solid var(--of-border);
}
.reports-route .input-group-text{
    color:var(--of-muted);
    background:var(--of-surface-2);
    border-color:var(--of-border-strong);
}
.reports-route .dropdown-menu{
    color:var(--of-text);
    background:var(--of-surface);
    border-color:var(--of-border);
}
.reports-route .dropdown-item{color:var(--of-text)}
.reports-route .dropdown-item:hover, .reports-route .dropdown-item:focus{color:var(--of-primary-text);background:var(--of-primary-soft)}
.reports-route .btn-outline-secondary{
    --bs-btn-color:var(--of-text);
    --bs-btn-border-color:var(--of-border-strong);
    --bs-btn-hover-bg:var(--of-surface-2);
    --bs-btn-hover-border-color:color-mix(in srgb,var(--of-primary) 20%,var(--of-border-strong));
    --bs-btn-hover-color:var(--of-heading);
}
[data-bs-theme="dark"] .reports-route .report-filter-card, [data-bs-theme="dark"] .reports-route .report-table-card, [data-bs-theme="dark"] .reports-route .pl-analysis-card{
    box-shadow:0 8px 22px rgba(var(--of-black-rgb),.14);
}
@media(max-width:767.98px){
    .reports-route .report-filter-card .card-body{padding:12px}
    .reports-route .card-footer .pagination{max-width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}
}
@media(prefers-reduced-motion:reduce){
    .reports-route .btn, .reports-route .page-link, .reports-route .dropdown-item{transition:none!important}
}


/* RC54.57 — Reports UI consistency + interaction polish */
body.reports-route{
    color:var(--of-text);
    background:var(--of-bg);
}
.reports-route .report-page-header, .reports-route .page-workspace-header{
    position:relative;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:1rem;
    padding:1rem 1.1rem;
    border:1px solid var(--of-border);
    border-radius:var(--of-radius-lg);
    background:linear-gradient(135deg,color-mix(in srgb,var(--of-primary) 6%,var(--of-surface)),var(--of-surface) 62%);
    box-shadow:var(--of-shadow-sm);
}
.reports-route .report-page-header::after, .reports-route .page-workspace-header::after{
    content:"";
    position:absolute;
    right:1.1rem;
    bottom:-1px;
    width:72px;
    height:2px;
    border-radius:2px;
    background:linear-gradient(90deg,transparent,var(--of-primary));
    opacity:.55;
    pointer-events:none;
}
.reports-route .report-page-header .page-title, .reports-route .page-workspace-header .page-title{
    margin:0;
    color:var(--of-heading);
    font-size:clamp(1.25rem,1.55vw,1.65rem);
    line-height:1.18;
    letter-spacing:-.02em;
    font-weight:800;
}
.reports-route .report-page-header p, .reports-route .page-workspace-header p{
    max-width:70ch;
    margin-top:.32rem!important;
    color:var(--of-muted)!important;
    font-size:.84rem;
    line-height:1.45;
}
.reports-route .page-eyebrow, .reports-route .report-page-header .eyebrow{
    display:inline-flex;
    align-items:center;
    gap:.35rem;
    margin-bottom:.42rem;
    color:var(--of-primary-text)!important;
    font-size:.66rem;
    line-height:1;
    font-weight:800!important;
    letter-spacing:.07em;
}
.reports-route .report-page-header > .d-print-none, .reports-route .page-workspace-header > .d-print-none{
    position:relative;
    z-index:2;
    align-items:center!important;
    flex-wrap:wrap;
    justify-content:flex-end;
}
.reports-route .card:not(.report-hero), .reports-route .report-filter-card{
    border-color:var(--of-border);
    background:var(--of-surface);
}
.reports-route .card-header.bg-body, .reports-route .card-header.bg-body-tertiary{
    color:var(--of-heading);
    background:var(--of-surface-2)!important;
    border-bottom-color:var(--of-border);
}
.reports-route .form-label{
    margin-bottom:.34rem;
    color:var(--of-heading);
    font-size:.72rem;
    line-height:1.25;
    font-weight:750;
}
.reports-route .form-control, .reports-route .form-select, .reports-route .input-group-text{
    min-height:40px;
    color:var(--of-text);
    background-color:var(--of-surface);
    border-color:var(--of-border-strong);
    border-radius:.7rem;
}
.reports-route .form-control::placeholder{color:color-mix(in srgb,var(--of-muted) 78%,transparent);opacity:1}
.reports-route .form-control:focus, .reports-route .form-select:focus{
    color:var(--of-text);
    background-color:var(--of-surface);
    border-color:color-mix(in srgb,var(--of-primary) 55%,var(--of-border-strong));
    box-shadow:0 0 0 .2rem var(--of-focus-ring-color);
}
.reports-route input[type="date"], .reports-route input[type="time"]{font-variant-numeric:tabular-nums}
[data-bs-theme="dark"] .reports-route input[type="date"], [data-bs-theme="dark"] .reports-route input[type="time"]{color-scheme:dark}
.reports-route .btn{
    border-radius:.68rem;
    font-weight:700;
}
.reports-route .btn:not(.btn-sm){min-height:40px}
.reports-route .btn-sm{min-height:32px}
.reports-route .btn:focus-visible, .reports-route .form-control:focus-visible, .reports-route .form-select:focus-visible{
    outline:2px solid transparent;
    outline-offset:2px;
}
.reports-route .table{
    --bs-table-color:var(--of-text);
    --bs-table-bg:transparent;
    --bs-table-border-color:var(--of-border);
    margin-bottom:0;
}
.reports-route .table > :not(caption) > * > *{
    border-bottom-color:var(--of-border);
}
.reports-route .table > thead > tr > th{
    color:var(--of-muted);
    background:var(--of-surface-2);
    font-size:.69rem;
    line-height:1.25;
    font-weight:800;
    letter-spacing:.035em;
    text-transform:uppercase;
}
.reports-route .table > tbody > tr > td{
    color:var(--of-text);
    font-size:.78rem;
    line-height:1.4;
}
.reports-route .table > tbody > tr:hover > *{
    --bs-table-accent-bg:color-mix(in srgb,var(--of-primary) 4%,var(--of-surface));
    color:var(--of-text);
}
.reports-route .table tfoot > tr > *{
    color:var(--of-heading);
    background:var(--of-surface-3);
    font-variant-numeric:tabular-nums;
}
.reports-route .table .text-end, .reports-route .money, .reports-route [class*="amount"], .reports-route [class*="total"]{
    font-variant-numeric:tabular-nums;
}
.reports-route .table-responsive, .reports-route .report-table-scroll, .reports-route .reference-table-scroll, .reports-route .report-wide-scroll{
    background:var(--of-surface);
    overscroll-behavior-inline:contain;
    scrollbar-gutter:stable;
}
.reports-route .table-responsive:focus-visible, .reports-route .report-table-scroll:focus-visible, .reports-route .reference-table-scroll:focus-visible, .reports-route .report-wide-scroll:focus-visible{
    outline:3px solid var(--of-focus-ring-color);
    outline-offset:-3px;
}
.reports-route .pagination{gap:.18rem}
.reports-route .page-link{
    min-width:34px;
    min-height:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:.55rem!important;
    font-size:.75rem;
    font-weight:700;
}
.reports-route .empty-state-inline, .reports-route .reference-empty{
    color:var(--of-muted);
}
.reports-route .empty-state-inline strong, .reports-route .reference-empty strong{
    color:var(--of-heading);
}
.reports-route .empty-state-inline > i{
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    margin-bottom:.35rem;
    border-radius:.8rem;
    color:var(--of-primary-text);
    background:var(--of-primary-soft);
}
.reports-route .reference-range-grid{
    min-width:0;
}
.reports-route .report-ultra-wide-table{min-width:2200px!important}
.reports-route .metric-value.metric-value-label{
    font-size:1rem!important;
    line-height:1.25!important;
}
[data-bs-theme="dark"] .reports-route .table{
    --bs-table-striped-bg:color-mix(in srgb,var(--of-surface-2) 65%,transparent);
    --bs-table-hover-bg:color-mix(in srgb,var(--of-primary) 5%,var(--of-surface));
}
[data-bs-theme="dark"] .reports-route .card-header.bg-body, [data-bs-theme="dark"] .reports-route .card-header.bg-body-tertiary{
    background:var(--of-surface-2)!important;
}
@media(max-width:991.98px){
    .reports-route .report-page-header, .reports-route .page-workspace-header{
        align-items:stretch;
        flex-direction:column;
    }
    .reports-route .report-page-header > .d-print-none, .reports-route .page-workspace-header > .d-print-none{
        width:100%;
        justify-content:flex-start;
    }
}
@media(max-width:767.98px){
    .reports-route .report-page-header, .reports-route .page-workspace-header{
        padding:.9rem;
        border-radius:.95rem;
    }
    .reports-route .report-page-header::after, .reports-route .page-workspace-header::after{display:none}
    .reports-route .report-page-header .page-title, .reports-route .page-workspace-header .page-title{font-size:1.28rem}
    .reports-route .report-page-header > .d-print-none > .btn, .reports-route .page-workspace-header > .d-print-none > .btn, .reports-route .report-page-header > .d-print-none > .dropdown, .reports-route .page-workspace-header > .d-print-none > .dropdown{
        flex:1 1 auto;
    }
    .reports-route .report-page-header > .d-print-none > .dropdown > .btn, .reports-route .page-workspace-header > .d-print-none > .dropdown > .btn{width:100%}
    .reports-route .form-control, .reports-route .form-select, .reports-route .input-group-text{min-height:42px}
    .reports-route .table > thead > tr > th{font-size:.65rem}
    .reports-route .table > tbody > tr > td{font-size:.75rem}
}
@media(max-width:575.98px){
    .reports-route .report-page-header > .d-print-none, .reports-route .page-workspace-header > .d-print-none{
        display:grid!important;
        grid-template-columns:1fr;
    }
    .reports-route .report-page-header > .d-print-none > *, .reports-route .page-workspace-header > .d-print-none > *{width:100%}
    .reports-route .report-page-header > .d-print-none .btn-group, .reports-route .page-workspace-header > .d-print-none .btn-group{display:grid;grid-template-columns:1fr 1fr}
    .reports-route .report-page-header > .d-print-none .btn-group > .btn, .reports-route .page-workspace-header > .d-print-none .btn-group > .btn{width:100%}
}
@media print{
    .reports-route .report-page-header, .reports-route .page-workspace-header{
        padding:0 0 .5rem;
        border:0;
        border-radius:0;
        box-shadow:none;
        background:transparent;
    }
    .reports-route .report-page-header::after, .reports-route .page-workspace-header::after{display:none}
}

/* RC54.62 — Modern flexible primary navigation */
.app-sidebar{
    /* Keep primary navigation dark in both light and dark application themes.
       These local semantic remaps affect the sidebar only; the workspace/topbar
       continues to follow the selected application theme. */
    --of-sidebar:var(--of-nav-bg);
    --of-surface:var(--of-nav-bg);
    --of-surface-2:var(--of-nav-surface);
    --of-surface-3:var(--of-nav-surface-2);
    --of-text:var(--of-nav-text);
    --of-heading:var(--of-nav-heading);
    --of-muted:var(--of-nav-muted);
    --of-border:var(--of-nav-border);
    --of-border-strong:var(--of-nav-border-strong);
    --of-primary-text:var(--of-nav-primary-text);
    --of-primary-text-hover:var(--of-nav-primary-text-hover);
    --of-primary-soft:var(--of-nav-primary-soft);
    color:var(--of-text);
    background:
        radial-gradient(circle at 18% 0%,color-mix(in srgb,var(--of-primary) 12%,transparent),transparent 34%),
        var(--of-sidebar);
    border-right-color:var(--of-border);
    transition:width .2s ease,flex-basis .2s ease,transform .2s ease,background-color .16s ease;
}
.app-workspace{transition:margin-left .2s ease}
.sidebar-inner{padding:12px 11px 11px}
.sidebar-brand-row{min-height:52px;margin-bottom:7px;padding:2px 2px 5px}
.sidebar-brand{gap:11px}
.brand-mark{width:40px;height:40px;border-radius:13px;font-size:1rem;box-shadow:0 8px 22px color-mix(in srgb,var(--of-primary) 20%,transparent)}
.brand-copy strong{font-size:14.5px;font-weight:750;letter-spacing:-.015em}
.brand-copy small{font-size:10.75px;letter-spacing:.01em}
.sidebar-collapse-toggle{width:32px;height:32px;min-height:32px;flex:0 0 32px;border:0;background:transparent;box-shadow:none;border-radius:9px}
.sidebar-collapse-toggle:hover{background:var(--of-primary-soft)}
.sidebar-navigation-tools{padding:0 1px 8px}
.sidebar-search{height:38px;display:flex;align-items:center;gap:8px;padding:0 9px;border:1px solid var(--of-border);border-radius:11px;background:color-mix(in srgb,var(--of-surface) 94%,transparent);box-shadow:0 1px 2px rgba(var(--of-shadow-neutral-rgb),.025);transition:border-color .14s ease,box-shadow .14s ease,background-color .14s ease}
.sidebar-search:focus-within{border-color:color-mix(in srgb,var(--of-primary) 48%,var(--of-border));box-shadow:0 0 0 3px color-mix(in srgb,var(--of-primary) 10%,transparent);background:var(--of-surface)}
.sidebar-search>i{color:var(--of-muted);font-size:.86rem}
.sidebar-search input{min-width:0;flex:1;width:100%;border:0;outline:0;background:transparent;color:var(--of-text);font:inherit;font-size:12.5px;padding:0}
.sidebar-search input::placeholder{color:color-mix(in srgb,var(--of-muted) 80%,transparent)}
.sidebar-search kbd{padding:2px 5px;border:1px solid var(--of-border);border-bottom-color:var(--of-border-strong);border-radius:5px;background:var(--of-surface-2);color:var(--of-muted);font-family:inherit;font-size:10px;font-weight:650;line-height:1}
.sidebar-search-clear{width:22px;height:22px;display:grid;place-items:center;border:0;border-radius:6px;padding:0;background:transparent;color:var(--of-muted);font-size:10px}
.sidebar-search-clear:hover{background:var(--of-surface-3);color:var(--of-heading)}
.sidebar-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:7px}
.sidebar-shortcut{min-width:0;height:34px;display:flex;align-items:center;justify-content:center;gap:5px;border:1px solid var(--of-border);border-radius:9px;background:color-mix(in srgb,var(--of-surface-2) 78%,transparent);color:var(--of-muted);text-decoration:none;font-size:10.75px;font-weight:650;transition:.14s ease}
.sidebar-shortcut i{font-size:11.5px;color:var(--of-primary-text)}
.sidebar-shortcut:hover, .sidebar-shortcut:focus-visible{color:var(--of-heading);border-color:color-mix(in srgb,var(--of-primary) 25%,var(--of-border));background:var(--of-primary-soft)}
.sidebar-nav{padding:2px 2px 12px;overscroll-behavior:contain;scroll-padding-block:56px}
.sidebar-nav::-webkit-scrollbar{width:5px}
.sidebar-nav::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--of-muted) 24%,transparent);border-radius:999px}
.nav-section-label{display:flex;align-items:center;gap:8px;padding:15px 9px 6px;color:color-mix(in srgb,var(--of-muted) 84%,transparent);font-size:9.5px;font-weight:800;letter-spacing:.12em}
.nav-section-label::after{content:"";height:1px;flex:1;background:linear-gradient(90deg,var(--of-border),transparent)}
.sidebar-link{position:relative;min-height:41px;margin:2px 0;padding:6px 8px;border:1px solid transparent;border-radius:11px;gap:9px;font-size:12.75px;font-weight:560;color:color-mix(in srgb,var(--of-text) 78%,var(--of-muted));transition:background-color .13s ease,border-color .13s ease,color .13s ease,transform .13s ease}
.sidebar-link-icon{width:30px;height:30px;flex:0 0 30px;border-radius:9px;font-size:14px;color:color-mix(in srgb,var(--of-muted) 90%,var(--of-text));background:transparent}
.sidebar-link:hover{transform:translateX(1px);border-color:color-mix(in srgb,var(--of-border) 82%,transparent);background:color-mix(in srgb,var(--of-surface-2) 88%,transparent)}
.sidebar-link.active{border-color:color-mix(in srgb,var(--of-primary) 18%,var(--of-border));background:linear-gradient(90deg,color-mix(in srgb,var(--of-primary) 12%,var(--of-surface)),color-mix(in srgb,var(--of-primary) 5%,var(--of-surface)));box-shadow:0 4px 12px color-mix(in srgb,var(--of-primary) 7%,transparent);font-weight:700}
.sidebar-link.active::before{content:"";position:absolute;left:-3px;top:11px;bottom:11px;width:3px;border-radius:999px;background:var(--of-primary)}
.sidebar-link.active .sidebar-link-icon{color:var(--of-inverse-text);background:var(--of-primary);box-shadow:0 5px 12px color-mix(in srgb,var(--of-primary) 18%,transparent)}
.sidebar-submenu-group{margin:2px 0}
.sidebar-submenu-toggle .sidebar-submenu-chevron{font-size:.68rem;color:var(--of-muted)}
.sidebar-submenu{margin:4px 0 8px 18px;padding:5px 5px 5px 17px;border-left:1px solid color-mix(in srgb,var(--of-primary) 18%,var(--of-border));border-radius:0 9px 9px 0;background:linear-gradient(90deg,color-mix(in srgb,var(--of-primary) 3%,var(--of-surface)),transparent 75%)}
.sidebar-submenu::before{display:none}
.sidebar-sublink{position:relative;min-height:32px;display:flex;align-items:center;padding:6px 8px 6px 15px;border-radius:8px;font-size:11.75px;line-height:1.25;color:var(--of-muted);transition:.12s ease}
.sidebar-sublink::before{content:"";position:absolute;left:5px;width:4px;height:4px;border-radius:50%;background:color-mix(in srgb,var(--of-muted) 50%,transparent);transition:.12s ease}
.sidebar-sublink:hover{background:color-mix(in srgb,var(--of-surface-2) 92%,transparent);color:var(--of-heading);transform:translateX(1px)}
.sidebar-sublink.active{background:var(--of-primary-soft);color:var(--of-primary-text);font-weight:700}
.sidebar-sublink.active::before{width:5px;height:5px;background:var(--of-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--of-primary) 11%,transparent)}
.sidebar-submenu-scroll{max-height:min(360px,42vh);padding-right:4px}
.sidebar-footer{min-height:50px;padding:8px 9px;border-radius:12px;background:linear-gradient(135deg,var(--of-surface-2),color-mix(in srgb,var(--of-primary) 4%,var(--of-surface-2)));box-shadow:none}
.sidebar-footer>div:not(.sidebar-status-dot){min-width:0;overflow:hidden}
.sidebar-footer strong, .sidebar-footer small{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.sidebar-footer strong{font-size:11.5px}.sidebar-footer small{font-size:10.5px}
.sidebar-search-empty{margin:12px 4px;padding:18px 10px;border:1px dashed var(--of-border-strong);border-radius:12px;text-align:center;color:var(--of-muted);background:var(--of-surface-2)}
.sidebar-search-empty i{display:block;margin-bottom:5px;font-size:18px;color:var(--of-primary-text)}
.sidebar-search-empty strong, .sidebar-search-empty span{display:block}.sidebar-search-empty strong{color:var(--of-heading);font-size:12px}.sidebar-search-empty span{margin-top:2px;font-size:10.5px}
.sidebar-search-hidden{display:none!important}
.sidebar-nav.is-searching .nav-section-label{padding-top:10px}

@media (min-width:992px){
    html[data-sidebar-state="compact"]{--of-sidebar-width:82px}
    html[data-sidebar-state="compact"] .sidebar-inner{padding-inline:10px}
    html[data-sidebar-state="compact"] .sidebar-brand-row{justify-content:center;padding-inline:0}
    html[data-sidebar-state="compact"] .sidebar-brand{flex:0 0 auto;justify-content:center}
    html[data-sidebar-state="compact"] .brand-copy, html[data-sidebar-state="compact"] .sidebar-navigation-tools, html[data-sidebar-state="compact"] .sidebar-link-label, html[data-sidebar-state="compact"] .sidebar-submenu-chevron, html[data-sidebar-state="compact"] .sidebar-submenu-group>.collapse, html[data-sidebar-state="compact"] .sidebar-footer>div:not(.sidebar-status-dot), html[data-sidebar-state="compact"] .sidebar-footer .badge-soft{display:none!important}
    html[data-sidebar-state="compact"] .sidebar-collapse-toggle{position:absolute;top:52px;left:25px;z-index:2;width:30px;height:30px;min-height:30px;border:1px solid var(--of-border);background:var(--of-surface);box-shadow:var(--of-shadow-sm)}
    html[data-sidebar-state="compact"] .sidebar-nav{padding-top:40px}
    html[data-sidebar-state="compact"] .nav-section-label{height:14px;margin:9px 9px 6px;padding:0;font-size:0}
    html[data-sidebar-state="compact"] .nav-section-label::after{background:var(--of-border)}
    html[data-sidebar-state="compact"] .sidebar-link{justify-content:center;width:48px;min-height:46px;margin:3px auto;padding:4px;border-radius:12px;transform:none}
    html[data-sidebar-state="compact"] .sidebar-link-icon{width:34px;height:34px;flex-basis:34px;font-size:15px}
    html[data-sidebar-state="compact"] .sidebar-link.active::before{left:-7px;top:13px;bottom:13px}
    html[data-sidebar-state="compact"] .sidebar-footer{justify-content:center;min-height:42px;padding:8px;border-radius:11px}
    html[data-sidebar-state="compact"] .sidebar-status-dot{margin:0}
}

@media (max-width:991.98px){
    .app-sidebar{width:min(90vw,320px);flex-basis:auto}
    .sidebar-inner{padding:12px}
    .sidebar-navigation-tools{padding-bottom:9px}
    .sidebar-shortcuts{grid-template-columns:repeat(3,minmax(0,1fr))}
    .sidebar-link{min-height:44px}
    .sidebar-sublink{min-height:40px}
}

@media (max-width:420px){
    .app-sidebar{width:min(94vw,320px)}
    .sidebar-shortcut span{display:none}
    .sidebar-shortcut{height:36px}
}

@media (prefers-reduced-motion:reduce){
    .app-sidebar, .app-workspace, .sidebar-link, .sidebar-sublink, .sidebar-submenu-chevron{transition:none!important}
}
.sidebar-shortcut:focus-visible, .sidebar-search-clear:focus-visible, .sidebar-collapse-toggle:focus-visible{outline:3px solid var(--of-focus-ring-color);outline-offset:2px}

/* RC54.75 — Purchases standardization */
.purchase-entry-summary-card{top:82px;box-shadow:var(--of-shadow-sm)}
.purchase-entry-page .purchase-entry-table{min-width:1180px}
.purchase-order-detail-page .progress{height:7px}
@media(max-width:1199.98px){.purchase-entry-summary-card{position:static!important}}

/* RC54.93 — Product Management & Add Product Experience Hardening */
.product-setup-overview{
    border:1px solid var(--of-border);
    border-radius:14px;
    background:var(--of-surface);
    box-shadow:var(--of-shadow-sm);
    overflow:hidden;
}
.product-setup-overview__head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:14px 16px 10px;
}
.product-setup-overview__head strong{ color:var(--of-heading); font-size:1rem; }
.product-completion-pill{
    padding:6px 10px;
    border:1px solid color-mix(in srgb,var(--of-primary) 22%,var(--of-border));
    border-radius:999px;
    background:var(--of-primary-soft);
    color:var(--of-primary-text);
    font-size:var(--of-type-support);
    font-weight:750;
    white-space:nowrap;
}
.product-completion-track{ height:4px; background:var(--of-surface-3); }
.product-completion-track span{ display:block; width:0; height:100%; background:var(--of-primary); transition:width .2s ease; }
.product-setup-metrics{ display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); border-top:1px solid var(--of-border); }
.product-setup-metrics>div{ min-width:0; padding:11px 14px; border-right:1px solid var(--of-border); }
.product-setup-metrics>div:last-child{ border-right:0; }
.product-setup-metrics span, .product-setup-metrics strong{ display:block; overflow-wrap:anywhere; }
.product-setup-metrics span{ color:var(--of-muted); font-size:var(--of-type-support); }
.product-setup-metrics strong{ margin-top:3px; color:var(--of-heading); font-size:.92rem; }
[data-stock-only].d-none{ display:none!important; }
@media(max-width:991.98px) {
    .product-setup-metrics{ grid-template-columns:repeat(3,minmax(0,1fr)); }
    .product-setup-metrics>div:nth-child(3){ border-right:0; }
    .product-setup-metrics>div:nth-child(n/**/+4){ border-top:1px solid var(--of-border); }
}
@media(max-width:575.98px) {
    .product-setup-overview__head{ align-items:flex-start; }
    .product-setup-metrics{ grid-template-columns:1fr 1fr; }
    .product-setup-metrics>div{ border-top:1px solid var(--of-border); }
    .product-setup-metrics>div:nth-child(odd){ border-right:1px solid var(--of-border); }
    .product-setup-metrics>div:nth-child(even){ border-right:0; }
    .product-setup-metrics>div:first-child, .product-setup-metrics>div:nth-child(2){ border-top:0; }
    .product-setup-metrics>div:last-child{ grid-column:1 / -1; border-right:0; }
}
@media (prefers-reduced-motion: reduce) {
    .product-completion-track span{ transition:none; }
}

/* RC54.117 maintenance — business branding identity */
.brand-mark.brand-mark-logo{
    width:52px;
    height:40px;
    padding:2px;
    background:transparent;
    box-shadow:none;
    border-radius:9px;
    overflow:hidden;
}
.brand-mark.brand-mark-logo img{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
}
.brand-mark.brand-mark-logo-compact{width:40px;height:36px}
.brand-mark.brand-mark-logo-standard{width:52px;height:40px}
.brand-mark.brand-mark-logo-prominent{width:70px;height:44px}
@media (min-width:992px){
    html[data-sidebar-state="compact"] .brand-mark.brand-mark-logo{
        width:40px;
        height:40px;
        padding:1px;
    }
}

/* RC54.117 maintenance — Roles & permissions flexibility refresh */
.role-summary-grid>.col-xl{min-width:0}.role-card-modern{overflow:hidden}.role-card-modern .card-body{padding:16px}.role-card-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.role-card-metrics>div{padding:9px 10px;border:1px solid var(--of-border);border-radius:9px;background:var(--of-surface-2)}.role-card-metrics span,.role-card-metrics strong{display:block}.role-card-metrics span{color:var(--of-muted);font-size:var(--of-type-support)}.role-card-metrics strong{margin-top:2px;color:var(--of-heading);font-size:.92rem}.role-card-coverage .progress{height:6px;background:var(--of-surface-2)}
.role-editor-shell{display:grid;grid-template-columns:230px minmax(0,1fr);gap:16px;align-items:start}.role-editor-nav{position:sticky;top:84px;border:1px solid var(--of-border);border-radius:12px;background:var(--of-surface);overflow:hidden;box-shadow:var(--of-shadow-sm)}.role-editor-nav-head{padding:13px 14px;border-bottom:1px solid var(--of-border);background:var(--of-surface-2)}.role-editor-kicker{display:block;color:var(--of-muted);font-size:var(--of-type-support);font-weight:700;text-transform:uppercase;letter-spacing:.055em}.role-editor-nav-head strong{display:block;margin-top:2px;color:var(--of-heading);font-size:var(--of-type-control)}.role-editor-nav-list{max-height:calc(100vh - 190px);overflow:auto;scrollbar-width:thin;padding:6px}.role-editor-nav-item{width:100%;display:flex;align-items:center;gap:9px;padding:8px;border:0;border-radius:9px;background:transparent;color:var(--of-text);text-align:left}.role-editor-nav-item:hover,.role-editor-nav-item:focus-visible{background:var(--of-surface-2);color:var(--of-heading)}.role-editor-nav-icon{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:9px;background:var(--of-primary-soft);color:var(--of-primary-text)}.role-editor-nav-copy{min-width:0}.role-editor-nav-copy strong,.role-editor-nav-copy small{display:block}.role-editor-nav-copy strong{font-size:var(--of-type-support);font-weight:740;line-height:1.25;overflow-wrap:anywhere}.role-editor-nav-copy small{margin-top:2px;color:var(--of-muted);font-size:.7rem}.role-editor-main{min-width:0}.role-editor-identity,.role-permission-workspace{border:1px solid var(--of-border);border-radius:12px;background:var(--of-surface);box-shadow:var(--of-shadow-sm)}.role-editor-identity{padding:15px}.role-permission-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.role-permission-summary>div{padding:10px 12px;border:1px solid var(--of-border);border-radius:10px;background:var(--of-surface)}.role-permission-summary span,.role-permission-summary strong,.role-permission-summary small{display:block}.role-permission-summary span{color:var(--of-muted);font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.045em}.role-permission-summary strong{margin-top:2px;color:var(--of-heading);font-size:1rem}.role-permission-summary small{margin-top:2px;color:var(--of-muted);font-size:.72rem}.role-editor-dirty .role-permission-dirty{border-color:color-mix(in srgb,var(--bs-warning) 50%,var(--of-border));background:color-mix(in srgb,var(--bs-warning) 8%,var(--of-surface))}.role-editor-dirty .role-permission-dirty strong{color:var(--bs-warning-text-emphasis)}.role-permission-workspace{padding:14px}.role-permission-toolbar{position:sticky;top:76px;z-index:8;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-14px -14px 14px;padding:10px 14px;border-bottom:1px solid var(--of-border);border-radius:12px 12px 0 0;background:color-mix(in srgb,var(--of-surface) 96%,transparent);backdrop-filter:blur(10px)}.role-permission-search-wrap{width:min(390px,100%)}.role-permission-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}.role-permission-toolbar-actions .btn.active{color:var(--of-primary-text);border-color:color-mix(in srgb,var(--of-primary) 45%,var(--of-border));background:var(--of-primary-soft)}.role-permission-groups{display:grid;gap:9px}.role-permission-group{scroll-margin-top:150px;border:1px solid var(--of-border);border-radius:10px;background:var(--of-surface);overflow:hidden}.role-permission-group[open]{box-shadow:0 4px 12px rgba(var(--of-shadow-ink-rgb),.035)}.role-permission-group-summary{min-height:58px;display:flex;align-items:center;gap:10px;padding:9px 11px;cursor:pointer;list-style:none;background:var(--of-surface-2)}.role-permission-group-summary::-webkit-details-marker{display:none}.role-permission-group-icon{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:9px;background:var(--of-primary-soft);color:var(--of-primary-text)}.role-permission-group-copy{min-width:0;flex:1}.role-permission-group-copy strong,.role-permission-group-copy small{display:block}.role-permission-group-copy strong{color:var(--of-heading);font-size:var(--of-type-control);font-weight:780}.role-permission-group-copy small{margin-top:2px;color:var(--of-muted);font-size:var(--of-type-support)}.role-permission-chevron{color:var(--of-muted);transition:transform .15s ease}.role-permission-group[open] .role-permission-chevron{transform:rotate(180deg)}.role-permission-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;padding:7px;background:var(--of-border)}.role-permission-option{min-height:56px!important;margin:0!important;padding:9px 10px!important;border-radius:0!important;background:var(--of-surface)!important}.role-permission-option:hover{background:var(--of-surface-2)!important}.role-permission-option-copy{min-width:0}.role-permission-option-title{display:flex;align-items:center;gap:6px;flex-wrap:wrap;color:var(--of-heading);font-size:var(--of-type-support);font-weight:680;line-height:1.35}.role-permission-option code{display:block;margin-top:3px;color:var(--of-muted);font-size:.68rem;white-space:normal;overflow-wrap:anywhere}.role-permission-option .form-check-input:disabled{opacity:.65}.role-permission-group.d-none{display:none!important}
@media(max-width:1199.98px){.role-editor-shell{grid-template-columns:200px minmax(0,1fr)}.role-permission-options{grid-template-columns:1fr}.role-permission-toolbar{align-items:stretch;flex-direction:column}.role-permission-search-wrap{width:100%}.role-permission-toolbar-actions{justify-content:flex-start}.role-permission-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:991.98px){.role-editor-shell{grid-template-columns:1fr}.role-editor-nav{position:static}.role-editor-nav-list{max-height:none;display:flex;overflow-x:auto;padding:7px}.role-editor-nav-item{width:auto;min-width:180px;flex:0 0 auto}.role-permission-toolbar{position:static;margin:-14px -14px 14px}.role-permission-group{scroll-margin-top:80px}}
@media(max-width:575.98px){.role-permission-summary{grid-template-columns:1fr 1fr}.role-permission-toolbar-actions>.btn{flex:1 1 calc(50% - 6px)}.role-permission-group-summary{padding:9px}.role-permission-group-summary .permission-group-toggle{display:none}.role-card-metrics{grid-template-columns:1fr 1fr}}

/* RC54.117 maintenance — Background Exports hardening & workspace refresh */
.export-workspace{--export-soft:color-mix(in srgb,var(--of-primary) 7%,var(--of-surface));}
.export-retention-note{display:flex;align-items:center;gap:10px;max-width:360px;padding:10px 12px;border:1px solid var(--of-border);border-radius:12px;background:var(--of-surface);box-shadow:var(--of-shadow-sm)}
.export-retention-note>i{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:10px;background:var(--of-primary-soft);color:var(--of-primary-text)}
.export-retention-note strong,.export-retention-note span{display:block}.export-retention-note strong{font-size:var(--of-type-support);color:var(--of-heading)}.export-retention-note span{margin-top:2px;font-size:.72rem;color:var(--of-muted);line-height:1.35}
.export-summary-card{height:100%;display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--of-border);border-radius:12px;background:var(--of-surface);box-shadow:var(--of-shadow-sm)}
.export-summary-icon{width:40px;height:40px;flex:0 0 40px;display:grid;place-items:center;border-radius:11px;background:var(--export-soft);color:var(--of-primary-text);font-size:1.05rem}.export-summary-card small,.export-summary-card strong{display:block}.export-summary-card small{color:var(--of-muted);font-size:var(--of-type-support)}.export-summary-card strong{margin-top:1px;color:var(--of-heading);font-size:1.15rem;line-height:1.2}
.export-create-card,.export-history-card{overflow:hidden}.export-card-heading,.export-history-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid var(--of-border);background:linear-gradient(180deg,var(--of-surface),var(--of-surface-2))}.export-card-heading h2,.export-history-head h2{margin:2px 0 0;color:var(--of-heading);font-size:1rem}.export-card-kicker{display:block;color:var(--of-muted);font-size:.68rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.export-card-heading p{margin-top:5px!important;font-size:var(--of-type-support)}
.export-queue-chip{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid color-mix(in srgb,var(--of-primary) 25%,var(--of-border));border-radius:999px;background:var(--of-primary-soft);color:var(--of-primary-text);font-size:.72rem;font-weight:750;white-space:nowrap}.export-create-form{padding:16px 18px}.export-create-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:16px;padding-top:14px;border-top:1px solid var(--of-border)}
.export-history-head{align-items:center}.export-filter-bar{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}.export-filter-bar .form-select{width:auto;min-width:135px}.export-search-control{position:relative;width:min(235px,100%)}.export-search-control>i{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--of-muted);pointer-events:none}.export-search-control .form-control{padding-left:33px}
.export-table thead th{white-space:nowrap}.export-report-cell{min-width:310px}.export-file-icon{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;border:1px solid var(--of-border);border-radius:10px;background:var(--of-surface-2);color:var(--of-primary-text);font-size:1.05rem}.export-meta-row{display:flex;align-items:center;gap:5px 10px;flex-wrap:wrap;margin-top:4px;color:var(--of-muted);font-size:.68rem}.export-status-badge{min-width:76px}.export-actions form{display:inline-block}.export-empty-state{display:grid;place-items:center;text-align:center;padding:42px 16px}.export-empty-state>span{width:48px;height:48px;display:grid;place-items:center;margin-bottom:10px;border-radius:14px;background:var(--of-surface-2);color:var(--of-muted);font-size:1.25rem}.export-empty-state strong{color:var(--of-heading)}.export-empty-state p{margin:4px 0 0;color:var(--of-muted);font-size:var(--of-type-support)}
@media(max-width:1199.98px){.export-history-head{align-items:stretch;flex-direction:column}.export-filter-bar{justify-content:flex-start}.export-filter-bar .form-select{flex:1 1 150px}.export-search-control{flex:1 1 220px;width:auto}}
@media(max-width:767.98px){.export-card-heading{align-items:stretch;flex-direction:column}.export-queue-chip{align-self:flex-start}.export-create-footer{align-items:stretch;flex-direction:column}.export-create-footer .btn{width:100%}.export-filter-bar>*{flex:1 1 100%!important;width:100%!important}.export-retention-note{max-width:none;width:100%}}

/* Activity Log audit intelligence */
.activity-shell{max-width:100%;}
.activity-stat-card{height:100%;display:flex;align-items:center;gap:14px;padding:16px 17px;border:1px solid var(--of-border);border-radius:var(--of-radius-lg);background:var(--of-surface);box-shadow:var(--of-shadow-sm);}
.activity-stat-card>div:last-child{min-width:0;display:flex;flex-direction:column;}
.activity-stat-card span{color:var(--of-muted);font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;}
.activity-stat-card strong{margin-top:2px;color:var(--of-heading);font-size:22px;line-height:1.15;font-variant-numeric:tabular-nums;}
.activity-stat-card small{margin-top:2px;color:var(--of-muted);font-size:11.5px;}
.activity-stat-icon{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:12px;color:var(--of-primary-text);background:var(--of-primary-soft);font-size:18px;}
.activity-stat-icon-warning{color:var(--of-warning);background:var(--of-warning-soft);}
.activity-stat-icon-success{color:var(--of-success);background:var(--of-success-soft);}
.activity-stat-icon-info{color:var(--of-info-accent);background:var(--of-info-soft);}
.activity-filter-card,.activity-table-card{border-color:var(--of-border);box-shadow:var(--of-shadow-sm);}
.activity-card-header{padding:15px 17px;border-bottom:1px solid var(--of-border);background:var(--of-surface);}
.activity-append-only{display:inline-flex;align-items:center;padding:5px 9px;border:1px solid var(--of-success-border);border-radius:999px;color:var(--of-success);background:var(--of-success-soft);font-size:11.5px;font-weight:700;white-space:nowrap;}
.activity-table{min-width:1180px;}
.activity-time{display:block;color:var(--of-heading);font-size:12.5px;font-weight:700;}
.activity-time+small{display:block;margin-top:2px;color:var(--of-muted);font-size:11.5px;font-variant-numeric:tabular-nums;}
.activity-category{display:inline-flex;align-items:center;min-height:25px;padding:3px 8px;border:1px solid var(--of-border);border-radius:999px;color:var(--of-muted);background:var(--of-surface-3);font-size:11px;font-weight:700;white-space:nowrap;}
.activity-category-security{color:var(--of-danger);background:var(--of-danger-soft);border-color:var(--of-danger-border);}
.activity-category-finance{color:var(--of-success);background:var(--of-success-soft);border-color:var(--of-success-border);}
.activity-category-pricing,.activity-category-sales{color:var(--of-primary-text);background:var(--of-primary-soft);border-color:color-mix(in srgb,var(--of-primary) 22%,var(--of-border));}
.activity-category-administration,.activity-category-access{color:var(--of-info-accent);background:var(--of-info-soft);border-color:var(--of-info-border);}
.activity-action-label{max-width:260px;color:var(--of-heading);font-weight:700;white-space:normal;}
.activity-action-code{display:block;max-width:280px;margin-top:3px;color:var(--of-muted);font-size:10.5px;white-space:normal;overflow-wrap:anywhere;}
.activity-actor{display:flex;align-items:center;gap:9px;min-width:180px;}
.activity-avatar{width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;border:1px solid var(--of-border);border-radius:9px;color:var(--of-primary-text);background:var(--of-primary-soft);font-size:11px;font-weight:800;}
.activity-actor strong{display:block;max-width:190px;color:var(--of-heading);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.activity-actor small{display:block;max-width:190px;color:var(--of-muted);font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.activity-subject-link{color:var(--of-primary-text);font-weight:700;text-decoration:none;}
.activity-subject-link:hover{text-decoration:underline;}
.activity-ip{color:var(--of-muted);font-size:11px;}
.activity-detail-toggle[aria-expanded="true"] .bi-chevron-down{display:inline-block;transform:rotate(180deg);}
.activity-detail-toggle .bi-chevron-down{transition:transform .15s ease;}
.activity-detail-row:hover{background:transparent!important;}
.activity-detail-panel{padding:18px 20px 20px;border-top:1px solid var(--of-border);border-bottom:1px solid var(--of-border);background:var(--of-surface-2);}
.activity-detail-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:15px;}
.activity-detail-heading h3{margin:2px 0 0;color:var(--of-heading);font-size:15px;font-weight:750;}
.activity-integrity{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border:1px solid var(--of-border);border-radius:999px;color:var(--of-muted);background:var(--of-surface);font-size:11px;font-weight:700;white-space:nowrap;}
.activity-integrity-ok{color:var(--of-success);border-color:var(--of-success-border);background:var(--of-success-soft);}
.activity-integrity-bad{color:var(--of-danger);border-color:var(--of-danger-border);background:var(--of-danger-soft);}
.activity-detail-section{padding:15px;border:1px solid var(--of-border);border-radius:12px;background:var(--of-surface);}
.activity-detail-section h4{margin:0 0 12px;color:var(--of-heading);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;}
.activity-change-list{display:grid;gap:8px;}
.activity-change-row{display:grid;grid-template-columns:minmax(130px,.75fr) minmax(0,1fr) 20px minmax(0,1fr);align-items:center;gap:9px;padding:9px 10px;border:1px solid var(--of-border);border-radius:10px;background:var(--of-surface-2);}
.activity-change-field{color:var(--of-heading);font-size:11.5px;font-weight:750;overflow-wrap:anywhere;}
.activity-change-value{min-width:0;padding:7px 8px;border:1px solid var(--of-border);border-radius:8px;background:var(--of-surface);}
.activity-change-value span{display:block;margin-bottom:2px;color:var(--of-muted);font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;}
.activity-change-value strong{display:block;color:var(--of-text);font-size:11.5px;font-weight:650;white-space:pre-wrap;overflow-wrap:anywhere;}
.activity-change-before{border-color:var(--of-danger-border);background:var(--of-danger-soft);}
.activity-change-after{border-color:var(--of-success-border);background:var(--of-success-soft);}
.activity-change-arrow{color:var(--of-muted);text-align:center;}
.activity-empty-detail{display:flex;align-items:center;gap:8px;padding:12px;border-radius:9px;color:var(--of-muted);background:var(--of-surface-2);font-size:12px;}
.activity-context-list{display:grid;gap:8px;margin:0;}
.activity-context-list>div{display:grid;grid-template-columns:92px 1fr;gap:10px;padding-bottom:8px;border-bottom:1px solid var(--of-border);}
.activity-context-list>div:last-child{padding-bottom:0;border-bottom:0;}
.activity-context-list dt{color:var(--of-muted);font-size:10.5px;font-weight:700;}
.activity-context-list dd{margin:0;color:var(--of-text);font-size:11.5px;overflow-wrap:anywhere;}
.activity-metadata-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.activity-metadata-grid>div{min-width:0;padding:9px 10px;border:1px solid var(--of-border);border-radius:9px;background:var(--of-surface-2);}
.activity-metadata-grid span{display:block;color:var(--of-muted);font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;}
.activity-metadata-grid strong{display:block;margin-top:3px;color:var(--of-text);font-size:11.5px;font-weight:650;white-space:pre-wrap;overflow-wrap:anywhere;}
.activity-empty-state{display:grid;justify-items:center;gap:5px;color:var(--of-muted);}
.activity-empty-state>i{font-size:26px;}
.activity-empty-state h3{margin:3px 0 0;color:var(--of-heading);font-size:15px;}
.activity-empty-state p{margin:0;font-size:12px;}
@media(max-width:991.98px){.activity-change-row{grid-template-columns:1fr;}.activity-change-arrow{transform:rotate(90deg);}.activity-metadata-grid{grid-template-columns:1fr 1fr;}.activity-detail-heading{flex-direction:column;}}
@media(max-width:575.98px){.activity-metadata-grid{grid-template-columns:1fr;}.activity-detail-panel{padding:14px 12px;}.activity-detail-section{padding:12px;}}
@media(prefers-reduced-motion:reduce){.activity-detail-toggle .bi-chevron-down{transition:none;}}

/* RC54.117 — Dashboard Studio & role-based personalization */
.dashboard-personalized{ --dashboard-active-accent:var(--of-primary); }
.dashboard-personalized[data-dashboard-accent="success"]{ --dashboard-active-accent:var(--of-success); }
.dashboard-personalized[data-dashboard-accent="info"]{ --dashboard-active-accent:var(--of-info); }
.dashboard-personalized[data-dashboard-accent="warning"]{ --dashboard-active-accent:var(--of-warning); }
.dashboard-personalized[data-dashboard-accent="danger"]{ --dashboard-active-accent:var(--of-danger); }
.dashboard-personalized[data-dashboard-accent="secondary"]{ --dashboard-active-accent:var(--of-muted); }
.dashboard-personalized .dashboard-hero{ border-top:3px solid color-mix(in srgb,var(--dashboard-active-accent) 78%,var(--of-border)); }
.dashboard-personalized .dashboard-soft-badge:first-child{ color:color-mix(in srgb,var(--dashboard-active-accent) 76%,var(--of-heading)); border-color:color-mix(in srgb,var(--dashboard-active-accent) 24%,var(--of-border)); background:color-mix(in srgb,var(--dashboard-active-accent) 8%,var(--of-surface)); }
.dashboard-view-controls{ display:grid; gap:8px; justify-items:end; }
.dashboard-view-picker{ display:flex; align-items:center; gap:7px; min-width:min(100%,440px); }
.dashboard-view-picker .form-select{ min-width:220px; }
.dashboard-configurable-grid>.dashboard-widget-slot{ min-width:0; }
.dashboard-widget-slot[data-widget-size="medium"] .dashboard-kpi-card,
.dashboard-widget-slot[data-widget-size="large"] .dashboard-kpi-card,
.dashboard-widget-slot[data-widget-size="full"] .dashboard-kpi-card{ min-height:170px; }

.dashboard-studio-page{ display:grid; gap:16px; min-width:0; }
.dashboard-studio-header{ margin-bottom:0!important; }
.dashboard-studio-summary-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.dashboard-studio-summary-grid>article{ min-width:0; padding:14px 15px; border:1px solid var(--of-border); border-radius:13px; background:var(--of-surface); box-shadow:var(--of-shadow-sm); }
.dashboard-studio-summary-grid span,.dashboard-studio-summary-grid strong,.dashboard-studio-summary-grid small{ display:block; }
.dashboard-studio-summary-grid span{ color:var(--of-muted); font-size:var(--of-type-support); font-weight:650; }
.dashboard-studio-summary-grid strong{ margin-top:4px; color:var(--of-heading); font-size:1.15rem; line-height:1.2; overflow-wrap:anywhere; }
.dashboard-studio-summary-grid small{ margin-top:3px; color:var(--of-muted); font-size:var(--of-type-support); }
.dashboard-studio-toolbar{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px; border:1px solid var(--of-border); border-radius:13px; background:var(--of-surface); }
.dashboard-studio-search-wrap,.dashboard-studio-widget-search{ position:relative; flex:1 1 320px; max-width:520px; }
.dashboard-studio-search-wrap>i,.dashboard-studio-widget-search>i{ position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--of-muted); pointer-events:none; }
.dashboard-studio-search-wrap .form-control,.dashboard-studio-widget-search .form-control{ padding-left:34px; }
.dashboard-studio-layout-card{ --studio-accent:var(--of-primary); overflow:hidden; border-top:3px solid var(--studio-accent); }
.dashboard-studio-layout-card[data-layout-accent="success"]{ --studio-accent:var(--of-success); }
.dashboard-studio-layout-card[data-layout-accent="info"]{ --studio-accent:var(--of-info); }
.dashboard-studio-layout-card[data-layout-accent="warning"]{ --studio-accent:var(--of-warning); }
.dashboard-studio-layout-card[data-layout-accent="danger"]{ --studio-accent:var(--of-danger); }
.dashboard-studio-layout-card[data-layout-accent="secondary"]{ --studio-accent:var(--of-muted); }
.dashboard-studio-layout-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.dashboard-studio-layout-icon{ width:44px; height:44px; display:grid; place-items:center; border-radius:12px; color:var(--studio-accent); background:color-mix(in srgb,var(--studio-accent) 10%,var(--of-surface)); border:1px solid color-mix(in srgb,var(--studio-accent) 20%,var(--of-border)); }
.dashboard-studio-layout-badges{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; }
.dashboard-studio-layout-name{ margin:14px 0 2px; color:var(--of-heading); font-size:1rem; font-weight:780; }
.dashboard-studio-layout-meta{ margin:0; color:var(--of-muted); font-size:var(--of-type-support); }
.dashboard-studio-mini-layout{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; margin-top:14px; padding:8px; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface-2); }
.dashboard-studio-mini-layout span{ min-height:31px; display:grid; place-items:center; border:1px solid color-mix(in srgb,var(--studio-accent) 16%,var(--of-border)); border-radius:7px; color:var(--studio-accent); background:var(--of-surface); }
.dashboard-studio-mini-layout span[data-size="medium"]{ grid-column:span 2; }
.dashboard-studio-mini-layout span[data-size="large"]{ grid-column:span 3; }
.dashboard-studio-mini-layout span[data-size="full"]{ grid-column:1/-1; }
.dashboard-studio-assignment-summary{ display:flex; flex-wrap:wrap; gap:6px 12px; margin-top:12px; color:var(--of-muted); font-size:var(--of-type-support); }
.dashboard-studio-assignment-summary span{ display:inline-flex; align-items:center; gap:5px; }
.dashboard-studio-layout-actions{ display:flex; flex-wrap:wrap; gap:6px; border-top:1px solid var(--of-border); }
.dashboard-studio-layout-actions form{ margin:0; }
.dashboard-studio-no-results{ min-height:180px; display:grid; place-items:center; align-content:center; gap:8px; border:1px dashed var(--of-border); border-radius:13px; color:var(--of-muted); background:var(--of-surface); text-align:center; }
.dashboard-studio-no-results i{ font-size:1.5rem; }

.dashboard-studio-modal .modal-dialog{ --bs-modal-width:min(1180px,calc(100vw - 32px)); }
.dashboard-studio-modal .modal-body{ padding:0; }
.dashboard-studio-editor{ min-width:0; }
.dashboard-studio-editor-grid{ display:grid; grid-template-columns:minmax(0,1.45fr) minmax(300px,.7fr); min-height:600px; }
.dashboard-studio-controls{ min-width:0; padding:18px; border-right:1px solid var(--of-border); }
.dashboard-studio-panel{ padding:0 0 18px; margin:0 0 18px; border-bottom:1px solid var(--of-border); }
.dashboard-studio-panel:last-child{ margin-bottom:0; border-bottom:0; }
.dashboard-studio-panel-heading{ display:flex; align-items:flex-start; gap:10px; margin-bottom:12px; }
.dashboard-studio-panel-heading h3{ margin:0; color:var(--of-heading); font-size:.92rem; font-weight:780; }
.dashboard-studio-panel-heading p{ margin:2px 0 0; color:var(--of-muted); font-size:var(--of-type-support); }
.dashboard-studio-step{ width:28px; height:28px; flex:0 0 28px; display:grid; place-items:center; border-radius:8px; color:var(--of-primary-text); background:var(--of-primary-soft); font-size:.72rem; font-weight:800; }
.dashboard-studio-default-switch{ padding:12px 12px 12px 44px; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface-2); }
.dashboard-studio-default-switch .form-check-input{ margin-left:-32px; }
.dashboard-studio-default-switch label span{ display:block; margin-top:2px; color:var(--of-muted); font-size:var(--of-type-support); font-weight:500; }
.dashboard-studio-widget-search{ max-width:none; margin-bottom:10px; }
.dashboard-studio-library{ display:grid; gap:12px; max-height:360px; overflow:auto; padding-right:3px; }
.dashboard-studio-library-title{ margin-bottom:6px; color:var(--of-muted); font-size:.7rem; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.dashboard-studio-library-items{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.dashboard-studio-library-item{ min-width:0; display:grid; grid-template-columns:auto 32px minmax(0,1fr); align-items:start; gap:8px; padding:9px; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface); cursor:pointer; }
.dashboard-studio-library-item:has(input:checked){ border-color:color-mix(in srgb,var(--of-primary) 30%,var(--of-border)); background:var(--of-primary-soft); }
.dashboard-studio-library-item .form-check-input{ margin-top:6px; }
.dashboard-studio-library-icon,.dashboard-studio-selected-icon{ width:32px; height:32px; display:grid; place-items:center; border-radius:8px; color:var(--of-primary-text); background:var(--of-primary-soft); }
.dashboard-studio-library-copy,.dashboard-studio-selected-copy{ min-width:0; }
.dashboard-studio-library-copy strong,.dashboard-studio-library-copy small,.dashboard-studio-selected-copy strong,.dashboard-studio-selected-copy small{ display:block; }
.dashboard-studio-library-copy strong,.dashboard-studio-selected-copy strong{ color:var(--of-heading); font-size:.8rem; }
.dashboard-studio-library-copy small,.dashboard-studio-selected-copy small{ margin-top:1px; color:var(--of-muted); font-size:.7rem; line-height:1.35; }
.dashboard-studio-selected{ display:grid; gap:7px; }
.dashboard-studio-selected-item{ display:grid; grid-template-columns:20px 32px minmax(0,1fr) 105px 34px; gap:8px; align-items:center; padding:8px; border:1px solid var(--of-border); border-radius:10px; background:var(--of-surface); }
.dashboard-studio-selected-item.is-dragging{ opacity:.5; border-color:var(--of-primary); }
.dashboard-studio-drag{ color:var(--of-muted); cursor:grab; }
.dashboard-studio-drag:active{ cursor:grabbing; }
.dashboard-studio-size{ min-width:0; }
.dashboard-studio-remove{ width:34px; height:34px; }
.dashboard-studio-empty{ padding:13px; border:1px dashed var(--of-border); border-radius:10px; color:var(--of-muted); background:var(--of-surface-2); text-align:center; font-size:var(--of-type-support); }
.dashboard-studio-multi{ min-height:124px; }
.dashboard-studio-preview-wrap{ min-width:0; padding:18px; background:var(--of-surface-2); }
.dashboard-studio-preview{ --preview-accent:var(--of-primary); position:sticky; top:12px; overflow:hidden; border:1px solid var(--of-border); border-top:3px solid var(--preview-accent); border-radius:14px; background:var(--of-surface); box-shadow:var(--of-shadow-sm); }
.dashboard-studio-preview[data-preview-accent="success"]{ --preview-accent:var(--of-success); }
.dashboard-studio-preview[data-preview-accent="info"]{ --preview-accent:var(--of-info); }
.dashboard-studio-preview[data-preview-accent="warning"]{ --preview-accent:var(--of-warning); }
.dashboard-studio-preview[data-preview-accent="danger"]{ --preview-accent:var(--of-danger); }
.dashboard-studio-preview[data-preview-accent="secondary"]{ --preview-accent:var(--of-muted); }
.dashboard-studio-preview-topbar{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 13px; border-bottom:1px solid var(--of-border); background:var(--of-surface-2); }
.dashboard-studio-preview-topbar span,.dashboard-studio-preview-topbar strong{ display:block; }
.dashboard-studio-preview-topbar span{ color:var(--of-muted); font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.dashboard-studio-preview-topbar strong{ margin-top:2px; color:var(--of-heading); font-size:.86rem; }
.dashboard-studio-preview-dot{ width:9px; height:9px; border-radius:50%; background:var(--preview-accent); box-shadow:0 0 0 4px color-mix(in srgb,var(--preview-accent) 12%,transparent); }
.dashboard-studio-preview-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; min-height:280px; padding:12px; align-content:start; }
.dashboard-studio-preview-widget{ min-width:0; min-height:74px; display:grid; place-items:center; align-content:center; gap:5px; padding:8px; border:1px solid var(--of-border); border-radius:9px; color:var(--of-muted); background:var(--of-surface-2); text-align:center; }
.dashboard-studio-preview-widget i{ color:var(--preview-accent); font-size:1rem; }
.dashboard-studio-preview-widget span{ max-width:100%; overflow:hidden; color:var(--of-heading); font-size:.68rem; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-studio-preview-widget[data-preview-size="medium"]{ grid-column:span 2; }
.dashboard-studio-preview-widget[data-preview-size="large"]{ grid-column:span 3; }
.dashboard-studio-preview-widget[data-preview-size="full"]{ grid-column:1/-1; }
.dashboard-studio-preview-note{ display:flex; gap:7px; padding:10px 12px; border-top:1px solid var(--of-border); color:var(--of-muted); background:var(--of-surface-2); font-size:.7rem; line-height:1.35; }
.dashboard-studio-form-footer{ position:sticky; bottom:0; z-index:4; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 18px; border-top:1px solid var(--of-border); background:color-mix(in srgb,var(--of-surface) 94%,transparent); backdrop-filter:blur(8px); }
.dashboard-studio-form-footer>span{ color:var(--of-muted); font-size:var(--of-type-support); }

@media (max-width:1199.98px){
    .dashboard-studio-summary-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
    .dashboard-studio-editor-grid{ grid-template-columns:1fr; }
    .dashboard-studio-controls{ border-right:0; border-bottom:1px solid var(--of-border); }
    .dashboard-studio-preview{ position:static; }
    .dashboard-view-controls{ justify-items:stretch; width:100%; }
}
@media (max-width:767.98px){
    .dashboard-studio-summary-grid{ grid-template-columns:1fr; }
    .dashboard-studio-toolbar{ align-items:stretch; flex-direction:column; }
    .dashboard-studio-search-wrap{ width:100%; max-width:none; flex-basis:auto; }
    .dashboard-studio-library-items{ grid-template-columns:1fr; }
    .dashboard-studio-selected-item{ grid-template-columns:18px 30px minmax(0,1fr) 34px; }
    .dashboard-studio-selected-item .dashboard-studio-size{ grid-column:3; }
    .dashboard-studio-selected-item .dashboard-studio-remove{ grid-column:4; grid-row:1/3; }
    .dashboard-studio-preview-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
    .dashboard-studio-preview-widget[data-preview-size="large"],.dashboard-studio-preview-widget[data-preview-size="full"]{ grid-column:1/-1; }
    .dashboard-studio-form-footer{ align-items:stretch; flex-direction:column; }
    .dashboard-studio-form-footer .btn{ width:100%; }
    .dashboard-view-picker{ align-items:stretch; flex-direction:column; min-width:0; width:100%; }
    .dashboard-view-picker .form-select{ min-width:0; width:100%; }
}
@media (prefers-reduced-motion:reduce){
    .dashboard-studio-selected-item{ scroll-behavior:auto; }
}
.dashboard-personalized .dashboard-section-kicker{ color:color-mix(in srgb,var(--dashboard-active-accent) 78%,var(--of-heading)); }
.dashboard-personalized .dashboard-trend-bar{ fill:var(--dashboard-active-accent); }
.dashboard-personalized .dashboard-trend-point:nth-of-type(even) .dashboard-trend-bar{ fill:color-mix(in srgb,var(--dashboard-active-accent) 76%,var(--of-accent)); }
.dashboard-personalized .dashboard-action>span{ color:color-mix(in srgb,var(--dashboard-active-accent) 82%,var(--of-heading)); background:color-mix(in srgb,var(--dashboard-active-accent) 11%,var(--of-surface)); }
.dashboard-personalized .dashboard-product-progress::-webkit-progress-value{ background:linear-gradient(90deg,var(--dashboard-active-accent),var(--of-accent)); }
.dashboard-personalized .dashboard-product-progress::-moz-progress-bar{ background:linear-gradient(90deg,var(--dashboard-active-accent),var(--of-accent)); }


/* RC54.117 Barcode Label Studio */
.barcode-studio-summary .card-body{display:flex;flex-direction:column;gap:.18rem}.barcode-studio-summary span{font-size:.76rem;color:var(--bs-secondary-color);text-transform:uppercase;letter-spacing:.055em;font-weight:700}.barcode-studio-summary strong{font-size:1.45rem;line-height:1.2}.barcode-studio-summary small{color:var(--bs-secondary-color)}
.barcode-scan-box{position:relative;display:flex;align-items:center}.barcode-scan-box>i{position:absolute;left:1rem;z-index:2;font-size:1.25rem;color:var(--bs-primary)}.barcode-scan-box>.form-control{padding-left:3rem;min-height:48px}.barcode-live-results{position:absolute;z-index:1050;left:0;right:0;top:calc(100% + 4px);background:var(--bs-body-bg);border:1px solid var(--bs-border-color);border-radius:.75rem;box-shadow:var(--of-shadow-lg);max-height:330px;overflow:auto}.barcode-live-result{width:100%;border:0;border-bottom:1px solid var(--bs-border-color);background:transparent;color:inherit;padding:.7rem .85rem;text-align:left;display:flex;justify-content:space-between;align-items:center;gap:1rem}.barcode-live-result:hover,.barcode-live-result:focus{background:var(--bs-tertiary-bg)}.barcode-live-result span{display:flex;min-width:0;flex-direction:column}.barcode-live-result small{color:var(--bs-secondary-color)}.barcode-live-result code{white-space:nowrap}
.barcode-queue-list{max-height:470px;overflow:auto}.barcode-queue-item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:.7rem;align-items:center;padding:.8rem 1rem;border-bottom:1px solid var(--bs-border-color)}.barcode-queue-item:last-child{border-bottom:0}.barcode-queue-item code{font-size:.72rem}.barcode-qty-control{display:flex;align-items:center;border:1px solid var(--bs-border-color);border-radius:.65rem;overflow:hidden}.barcode-qty-control button{width:32px;height:34px;border:0;background:var(--bs-tertiary-bg);color:inherit;font-weight:700}.barcode-qty-control input{width:54px;height:34px;text-align:center;border:0;border-left:1px solid var(--bs-border-color);border-right:1px solid var(--bs-border-color);background:var(--bs-body-bg);color:inherit}.barcode-guidance-card{border-style:dashed}.barcode-guidance-icon{width:42px;height:42px;border-radius:12px;display:inline-grid;place-items:center;background:color-mix(in srgb,var(--bs-success) 12%,transparent);color:var(--bs-success);font-size:1.2rem}
.barcode-template-manager{--bs-offcanvas-width:min(620px,96vw)}.barcode-template-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem .85rem}.barcode-template-card{overflow:hidden}.barcode-mini-preview{width:min(100%,230px);margin-inline:auto;border:1px dashed var(--bs-border-color);border-radius:.6rem;padding:.65rem;text-align:center;background:var(--of-surface);color:var(--of-heading)}.barcode-mini-name{font-size:.78rem;font-weight:700}.barcode-mini-bars{height:34px;margin:.35rem auto;background:repeating-linear-gradient(90deg,var(--of-heading) 0 2px,transparent 2px 4px,var(--of-heading) 4px 5px,transparent 5px 8px,var(--of-heading) 8px 11px,transparent 11px 13px)}.barcode-mini-code{font-size:.64rem;letter-spacing:.05em}
@media(max-width:575.98px){.barcode-template-options{grid-template-columns:1fr}.barcode-queue-item{grid-template-columns:minmax(0,1fr) auto}.barcode-queue-item>[data-remove-label]{grid-column:2}.barcode-qty-control{grid-row:2;grid-column:1/2;width:max-content}}


/* Opening Stock simple workspace */
.opening-stock-simple-note{display:flex;gap:14px;align-items:flex-start;padding:16px 18px;border:1px solid var(--bs-border-color);border-radius:16px;background:var(--bs-tertiary-bg)}
.opening-stock-simple-note-icon{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:12px;background:color-mix(in srgb,var(--bs-primary) 12%,transparent);color:var(--bs-primary);font-size:1.05rem}
.opening-stock-help summary,.opening-stock-history-card summary{cursor:pointer;list-style:none}.opening-stock-help summary::-webkit-details-marker,.opening-stock-history-card summary::-webkit-details-marker{display:none}
.opening-stock-preview-card{border-color:color-mix(in srgb,var(--bs-primary) 28%,var(--bs-border-color))}
.opening-stock-preview-metrics{display:flex;flex-wrap:wrap;gap:28px;text-align:right}.opening-stock-preview-metrics>div{min-width:92px}.opening-stock-preview-metrics span{display:block;color:var(--bs-secondary-color);font-size:.75rem;margin-bottom:2px}.opening-stock-preview-metrics strong{font-size:1rem}
.opening-stock-simple-row{padding:18px;border-bottom:1px solid var(--bs-border-color);transition:background-color .18s ease,border-color .18s ease}.opening-stock-simple-row:last-child{border-bottom:0}.opening-stock-simple-row.is-changed{background:color-mix(in srgb,var(--bs-warning) 7%,var(--bs-body-bg));box-shadow:inset 3px 0 0 color-mix(in srgb,var(--bs-warning) 75%,var(--bs-border-color))}
.opening-stock-field-label{display:block;color:var(--bs-secondary-color);font-size:.76rem;font-weight:600;margin-bottom:5px}.opening-stock-readonly-value,.opening-stock-change-value{font-size:1.05rem;font-weight:700;min-height:38px;display:flex;align-items:center}
.opening-stock-cost-editor{padding:14px;border:1px dashed color-mix(in srgb,var(--bs-primary) 28%,var(--bs-border-color));border-radius:12px;background:color-mix(in srgb,var(--bs-primary) 3%,var(--bs-body-bg))}
.opening-stock-row-details summary{cursor:pointer;color:var(--bs-secondary-color);font-size:.8rem;font-weight:600;display:inline-flex;align-items:center;gap:6px}.opening-stock-row-details summary:hover{color:var(--bs-body-color)}
.opening-stock-save-bar{position:sticky;bottom:12px;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 16px;border:1px solid var(--bs-border-color);border-radius:16px;background:color-mix(in srgb,var(--bs-body-bg) 94%,transparent);box-shadow:var(--of-shadow-md);backdrop-filter:blur(12px)}
.opening-stock-entry-list{display:grid;gap:12px}.opening-stock-entry-row{padding:16px;border:1px solid var(--bs-border-color);border-radius:14px;background:var(--bs-body-bg)}
.opening-stock-line-title{font-size:.95rem}
@media (max-width:767.98px){.opening-stock-preview-metrics{width:100%;justify-content:space-between;text-align:left;gap:12px}.opening-stock-preview-metrics>div{min-width:0;flex:1}.opening-stock-save-bar{position:static;align-items:stretch;flex-direction:column}.opening-stock-save-bar .d-flex{width:100%}.opening-stock-save-bar .btn{flex:1}.opening-stock-simple-row{padding:16px 14px}.opening-stock-summary-row .fs-3{font-size:1.55rem!important}}

/* Phase 20 Hotfix 2 — application workspace width / Invoice Studio full-width hardening */
.app-workspace,
.app-content{
    min-width:0;
}
.app-content{
    width:100%;
    max-width:100%;
}
@media (min-width:992px){
    .app-workspace{
        width:calc(100% - var(--of-sidebar-width));
        max-width:calc(100% - var(--of-sidebar-width));
        flex:0 0 calc(100% - var(--of-sidebar-width));
    }
}
@media (max-width:991.98px){
    .app-workspace{
        width:100%;
        max-width:100%;
        flex:0 0 100%;
    }
}

/* Database Blueprint + Operations workspace refresh */
.blueprint-hero,.ops-health-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:24px;border:1px solid var(--of-border);border-radius:20px;background:linear-gradient(135deg,color-mix(in srgb,var(--of-primary) 5%,var(--of-surface)) 0%,var(--of-surface) 58%,color-mix(in srgb,var(--of-primary) 3%,var(--of-surface)) 100%);box-shadow:var(--of-shadow-sm)}
.blueprint-hero-copy,.ops-health-hero-copy{min-width:0;max-width:760px}.blueprint-hero-actions,.ops-health-hero-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;flex:none}.blueprint-eyebrow,.ops-health-eyebrow,.blueprint-section-kicker,.ops-section-kicker{display:inline-flex;align-items:center;gap:6px;margin-bottom:7px;color:var(--of-primary-text);font-size:11px;font-weight:800;letter-spacing:.065em;text-transform:uppercase}.blueprint-source,.ops-last-checked{display:inline-flex;align-items:center;gap:7px;color:var(--of-muted);font-size:12px;font-weight:650}.blueprint-source{padding:7px 10px;border:1px solid var(--of-border);border-radius:10px;background:var(--of-surface)}
.blueprint-metric-card,.ops-health-metric{height:100%;display:flex;align-items:center;gap:12px;padding:15px;border:1px solid var(--of-border);border-radius:16px;background:var(--of-surface);box-shadow:var(--of-shadow-sm);min-width:0}.blueprint-metric-icon,.ops-health-metric-icon{width:40px;height:40px;flex:0 0 40px;display:grid;place-items:center;border-radius:12px;background:var(--of-primary-soft);color:var(--of-primary-text);font-size:16px}.blueprint-metric-icon.is-success{background:var(--of-success-soft);color:var(--of-success-text)}.blueprint-metric-icon.is-info{background:color-mix(in srgb,var(--of-info) 10%,var(--of-surface));color:var(--of-info-text)}.blueprint-metric-icon.is-muted{background:var(--of-surface-2);color:var(--of-muted)}.blueprint-metric-card>div,.ops-health-metric>div{min-width:0}.blueprint-metric-card small,.ops-health-metric small{display:block;color:var(--of-muted);font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.035em}.blueprint-metric-card strong,.ops-health-metric strong{display:block;color:var(--of-heading);font-size:18px;font-weight:750;line-height:1.2;margin:2px 0}.blueprint-metric-card div>span,.ops-health-metric div>span{display:block;color:var(--of-muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.blueprint-section-card,.ops-section-card,.ops-settings-card{border-color:var(--of-border);border-radius:18px;overflow:hidden;box-shadow:var(--of-shadow-sm)}.blueprint-section-head,.ops-section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid var(--of-border);background:color-mix(in srgb,var(--of-surface-2) 70%,var(--of-surface))}.blueprint-section-head h2,.ops-section-head h2{color:var(--of-heading)}.blueprint-count-pill,.ops-count-chip,.ops-storage-summary{display:inline-flex;align-items:center;gap:6px;flex:none;padding:6px 9px;border-radius:999px;border:1px solid var(--of-border);background:var(--of-surface);color:var(--of-muted);font-size:11px;font-weight:750}.blueprint-module-card{height:100%;display:flex;gap:12px;padding:14px;border:1px solid var(--of-border);border-radius:14px;background:var(--of-surface);transition:border-color .18s ease,background .18s ease,transform .18s ease}.blueprint-module-card.is-enabled:hover{border-color:color-mix(in srgb,var(--of-primary) 35%,var(--of-border));transform:translateY(-1px)}.blueprint-module-card.is-disabled{background:var(--of-surface-2);opacity:.78}.blueprint-module-icon{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;border-radius:11px;background:var(--of-primary-soft);color:var(--of-primary-text);font-size:15px}.blueprint-module-card.is-disabled .blueprint-module-icon{background:var(--of-surface);color:var(--of-muted)}.blueprint-module-copy{min-width:0;flex:1}.blueprint-module-copy strong{font-size:13px;color:var(--of-heading)}.blueprint-module-copy p{margin:5px 0 0;color:var(--of-muted);font-size:11.5px;line-height:1.45}.blueprint-status-chip,.blueprint-architecture-badge,.ops-mini-status,.ops-number-chip{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border-radius:999px;border:1px solid var(--of-border);font-size:10px;font-weight:800;line-height:1;padding:5px 7px}.blueprint-status-chip.is-success,.ops-mini-status.is-success,.ops-number-chip.is-success,.ops-storage-summary.is-success{color:var(--of-success-text);border-color:color-mix(in srgb,var(--of-success) 28%,var(--of-border));background:var(--of-success-soft)}.blueprint-status-chip.is-muted,.ops-mini-status.is-neutral,.ops-number-chip.is-neutral{color:var(--of-muted);background:var(--of-surface-2)}
.blueprint-map-head{align-items:flex-end}.blueprint-legend{display:flex;align-items:center;flex-wrap:wrap;gap:12px;color:var(--of-muted);font-size:11px}.blueprint-legend span{display:inline-flex;align-items:center;gap:5px}.blueprint-dot{width:7px;height:7px;border-radius:50%;background:var(--of-primary)}.blueprint-dot.is-normalized{background:var(--of-info)}.blueprint-dot.is-platform{background:var(--of-muted)}.blueprint-map-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) 220px auto;gap:10px;align-items:center;padding:12px 16px;border-bottom:1px solid var(--of-border);background:var(--of-surface)}.blueprint-search{position:relative;margin:0}.blueprint-search>i{position:absolute;left:13px;top:50%;transform:translateY(-50%);z-index:2;color:var(--of-muted);font-size:13px}.blueprint-search .form-control{padding-left:36px}.blueprint-filter{min-width:0}.blueprint-visible-count{display:flex;align-items:baseline;gap:5px;padding:0 4px;color:var(--of-muted);font-size:11px}.blueprint-visible-count strong{color:var(--of-heading);font-size:14px}.blueprint-table-wrap{max-height:620px}.blueprint-table{min-width:760px}.blueprint-table thead th{position:sticky;top:0;z-index:2;background:var(--of-surface-2);color:var(--of-muted);font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;border-bottom-color:var(--of-border)}.blueprint-table td{vertical-align:middle}.blueprint-table-code,.blueprint-target-route{font-size:11px;color:var(--of-primary-text);background:var(--of-primary-soft);border-radius:7px;padding:4px 6px}.blueprint-target-name{color:var(--of-heading);font-size:12px;font-weight:700;margin-bottom:4px}.blueprint-target-route{display:inline-block;color:var(--of-muted);background:var(--of-surface-2)}.blueprint-architecture-badge.is-application{color:var(--of-success-text);border-color:color-mix(in srgb,var(--of-success) 25%,var(--of-border));background:var(--of-success-soft)}.blueprint-architecture-badge.is-normalized{color:var(--of-info-text);border-color:color-mix(in srgb,var(--of-info) 25%,var(--of-border));background:color-mix(in srgb,var(--of-info) 9%,var(--of-surface))}.blueprint-architecture-badge.is-platform{color:var(--of-muted);background:var(--of-surface-2)}.blueprint-open-link{display:inline-flex;align-items:center;gap:5px}.blueprint-empty-state,.ops-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:5px;padding:30px;color:var(--of-muted)}.blueprint-empty-state i,.ops-empty-state i{font-size:22px;color:var(--of-primary-text)}.blueprint-empty-state strong,.ops-empty-state strong{color:var(--of-heading);font-size:13px}.blueprint-empty-state span,.ops-empty-state span{font-size:11.5px}
.ops-health-hero.is-healthy{background:linear-gradient(135deg,color-mix(in srgb,var(--of-success) 7%,var(--of-surface)),var(--of-surface) 68%)}.ops-health-hero.is-critical{background:linear-gradient(135deg,color-mix(in srgb,var(--of-danger) 7%,var(--of-surface)),var(--of-surface) 68%)}.ops-overall-status{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;font-size:11px;font-weight:800;border:1px solid var(--of-border)}.ops-overall-status.is-healthy{color:var(--of-success-text);background:var(--of-success-soft);border-color:color-mix(in srgb,var(--of-success) 28%,var(--of-border))}.ops-overall-status.is-attention{color:var(--of-warning-text);background:color-mix(in srgb,var(--of-warning) 10%,var(--of-surface));border-color:color-mix(in srgb,var(--of-warning) 32%,var(--of-border))}.ops-overall-status.is-critical{color:var(--of-danger);background:color-mix(in srgb,var(--of-danger) 8%,var(--of-surface));border-color:color-mix(in srgb,var(--of-danger) 30%,var(--of-border))}.ops-health-metric.is-healthy .ops-health-metric-icon{background:var(--of-success-soft);color:var(--of-success-text)}.ops-health-metric.is-attention .ops-health-metric-icon{background:color-mix(in srgb,var(--of-warning) 10%,var(--of-surface));color:var(--of-warning-text)}.ops-health-metric.is-critical .ops-health-metric-icon{background:color-mix(in srgb,var(--of-danger) 8%,var(--of-surface));color:var(--of-danger)}.ops-health-metric.is-neutral .ops-health-metric-icon{background:var(--of-surface-2);color:var(--of-muted)}.ops-attention-panel,.ops-ready-panel{display:flex;align-items:flex-start;gap:14px;padding:16px 18px;border-radius:16px;border:1px solid color-mix(in srgb,var(--of-warning) 28%,var(--of-border));background:color-mix(in srgb,var(--of-warning) 7%,var(--of-surface))}.ops-attention-icon{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;border-radius:12px;background:color-mix(in srgb,var(--of-warning) 14%,var(--of-surface));color:var(--of-warning-text);font-size:17px}.ops-attention-copy{min-width:0;flex:1}.ops-recommendation-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 24px;padding-left:20px;color:var(--of-heading);font-size:12px}.ops-recommendation-list li::marker{color:var(--of-warning-text);font-weight:800}.ops-ready-panel{align-items:center;border-color:color-mix(in srgb,var(--of-success) 28%,var(--of-border));background:var(--of-success-soft);color:var(--of-success-text)}.ops-ready-panel>i{font-size:22px}.ops-ready-panel>div{display:flex;flex-direction:column;gap:2px}.ops-ready-panel span{font-size:11.5px;color:var(--of-muted)}.ops-section-head>.bi{font-size:18px;color:var(--of-primary-text)}.ops-section-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:var(--of-primary-soft);color:var(--of-primary-text)}.ops-health-table th,.ops-health-table td{padding:11px 14px;border-color:var(--of-border);font-size:12px}.ops-health-table tbody th{color:var(--of-muted);font-weight:700;width:34%}.ops-health-table code{font-size:11px;color:var(--of-heading);background:var(--of-surface-2);border-radius:6px;padding:3px 5px}.ops-mini-status.is-warning,.ops-number-chip.is-warning{color:var(--of-warning-text);border-color:color-mix(in srgb,var(--of-warning) 30%,var(--of-border));background:color-mix(in srgb,var(--of-warning) 10%,var(--of-surface))}.ops-mini-status.is-danger,.ops-number-chip.is-danger,.ops-storage-summary.is-danger{color:var(--of-danger);border-color:color-mix(in srgb,var(--of-danger) 28%,var(--of-border));background:color-mix(in srgb,var(--of-danger) 8%,var(--of-surface))}.ops-workload-name,.ops-disk-name{display:inline-flex;align-items:center;gap:8px;color:var(--of-heading);font-weight:700}.ops-workload-name i,.ops-disk-name i{color:var(--of-primary-text)}.ops-workload-summary{display:flex;gap:16px;justify-content:flex-end;padding:10px 14px;border-top:1px solid var(--of-border);background:var(--of-surface-2);color:var(--of-muted);font-size:11px}.ops-workload-summary strong{color:var(--of-heading)}
@media (max-width:991.98px){.blueprint-hero,.ops-health-hero{flex-direction:column}.blueprint-hero-actions,.ops-health-hero-actions{width:100%;justify-content:flex-start}.blueprint-map-toolbar{grid-template-columns:1fr 200px}.blueprint-visible-count{grid-column:1/-1}.ops-recommendation-list{grid-template-columns:1fr}}
@media (max-width:767.98px){.blueprint-hero,.ops-health-hero{padding:18px}.blueprint-hero-actions,.ops-health-hero-actions{display:grid;grid-template-columns:1fr;width:100%}.blueprint-hero-actions .btn,.ops-health-hero-actions .btn{width:100%}.blueprint-section-head,.ops-section-head{align-items:flex-start;flex-direction:column}.blueprint-map-toolbar{grid-template-columns:1fr}.blueprint-filter{width:100%}.blueprint-visible-count{grid-column:auto}.blueprint-legend{width:100%}.blueprint-open-link span{display:none}.ops-health-table th,.ops-health-table td{padding:10px 12px}.ops-attention-panel{padding:14px}.ops-recommendation-list{padding-left:18px}}
