﻿/* ==========================================================================
   erp-shell.css  (sh-v2, 31 Oct 2026)  -  the shell of the approved preview.

   Loaded by Site.master straight after erp.css and scoped to .app.sh2, so
   erp.css is untouched and removing the <link> brings the old shell back.
     * full-height sidebar headed by the product brand and its menu button
     * a light top bar: menu search, company / branch / year pills, theme,
       bell, user
     * the page wash of the dashboard (periwinkle - lavender - peach)
   Same element IDs and classes as before, so erp.js, the fly-out menu, the
   menu search, the bell and the crumb trail keep working unchanged.
   Dark theme: html[data-theme=dark] below (erp-theme.js only darkens
   <style> blocks, not linked files, so the dark values are written here).
   Interface only - no business rule lives here.
   ========================================================================== */

.app.sh2 {
    --sh-ink: #0e1240; --sh-ink-2: #384070; --sh-ink-3: #6a719a;
    --sh-line: #e3e7fb; --sh-card: #ffffff; --sh-soft: #eef1ff;
    --sh-brand: #4b4fe0; --sh-brand-2: #7b5cf5;
    --sh-wash: #ffffff;              /* sh-v2a: white shell (1 Nov 2026) */
    --sh-side: #ffffff;
    --sh-shadow: 0 8px 20px -16px rgba(60, 80, 180, .6);
    --sidebar-w: 264px;
    --sidebar-w-collapsed: 72px;
    --header-h: 68px;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "side head" "side main" "side foot";
    background: var(--sh-wash);
    color: var(--sh-ink-2);
}
html[data-theme=dark] .app.sh2 {
    --sh-ink: #e8eaff; --sh-ink-2: #c3c8ee; --sh-ink-3: #9096c4;
    --sh-line: #2c3160; --sh-card: #1a1d3d; --sh-soft: #23275080;
    --sh-brand: #8f93ff; --sh-brand-2: #a98bff;
    --sh-wash: linear-gradient(180deg, #11132b 0%, #15143a 55%, #1d1630 100%);
    --sh-side: rgba(20, 22, 48, .96);
    --sh-shadow: 0 8px 20px -16px rgba(0, 0, 0, .8);
}
.app.sh2 > .app-body { display: contents; }
.app.sh2 > .app-header { grid-area: head; }
.app.sh2 .app-sidebar { grid-area: side; }
.app.sh2 .app-main { grid-area: main; }
.app.sh2 > .app-footer { grid-area: foot; background: transparent; border-top: 1px solid var(--sh-line); color: var(--sh-ink-3); }

/* ---------------------------------------------------------------- sidebar */
.app.sh2 .app-sidebar {
    display: flex; flex-direction: column;
    background: var(--sh-side);
    border-inline-end: 1px solid var(--sh-line);
    box-shadow: 6px 0 30px -24px rgba(60, 80, 180, .5);
    overflow-y: auto; overflow-x: hidden;
    position: relative; z-index: 41;
}
.app.sh2 .sh-brand {
    position: sticky; top: 0; z-index: 2;
    display: flex; align-items: center; gap: 12px;
    padding: 16px 14px 12px 18px; min-height: var(--header-h);
    background: var(--sh-side);
}
html[dir=rtl] .app.sh2 .sh-brand { padding: 16px 18px 12px 14px; }
.app.sh2 .sh-brand .brand-mark { width: 40px; height: 48px; flex: none; color: inherit; }
.app.sh2 .sh-brand .brand-mark svg,
.app.sh2 .sh-brand .brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.app.sh2 .sh-brand .brand-text { min-width: 0; flex: 1 1 auto; }
.app.sh2 .sh-brand .brand-name { font-size: 26px; line-height: 1; font-weight: 700; color: var(--sh-ink); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; }
.app.sh2 .sh-brand .brand-name .acc { background: linear-gradient(180deg, #8b5cf6, #4b2fd6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.app.sh2 .sh-brand .brand-slogan { display: block; font-size: 11px; line-height: 1.3; color: var(--sh-ink-3); margin-top: 5px; white-space: normal; }
.app.sh2 .sh-burger { width: 38px; height: 38px; flex: none; color: var(--sh-ink); border-radius: 10px; margin-inline-start: auto; }
.app.sh2 .sh-burger:hover { background: var(--sh-soft); color: var(--sh-brand); }
.app.sh2 .sh-burger-top { display: none; }

.app.sh2 .nav-list { padding: 4px 12px 18px; }
.app.sh2 .nav-item { margin-bottom: 3px; }
.app.sh2 .nav-link {
    gap: 12px; padding: 9px 12px; border-radius: 12px;
    color: var(--sh-ink); font-size: 14px; font-weight: 400;
}
.app.sh2 .nav-link:hover { background: var(--sh-soft); }
.app.sh2 .nav-list > .nav-item > .nav-link .nav-icon { width: 24px; height: 24px; opacity: .95; }
.app.sh2 .nav-sub { padding-inline-start: 14px; }
.app.sh2 .nav-sub .nav-link { font-size: 13px; padding: 7px 10px; }
.app.sh2 .nav-caret { opacity: .55; }
/* the screen on show: the brand gradient, white text */
.app.sh2 .nav-link.is-active,
.app.sh2 .nav-folder.has-active > .nav-toggle {
    background: linear-gradient(90deg, #4b4fe0, #7b5cf5);
    color: #fff; font-weight: 400; box-shadow: 0 12px 24px -12px rgba(75, 79, 224, .8);
}
.app.sh2 .nav-folder.has-active.open > .nav-toggle { box-shadow: 0 10px 20px -14px rgba(75, 79, 224, .8); }
.app.sh2 .nav-link.is-active::before { display: none; }
.app.sh2 .nav-link.is-active .nav-icon,
.app.sh2 .nav-folder.has-active > .nav-toggle .nav-icon { filter: brightness(1.15); box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); border-radius: 6px; }

/* the narrow rail (collapsed): the brand keeps only its menu button */
.app.sh2.is-icons-only .sh-brand { justify-content: center; padding: 14px 6px 10px; }
.app.sh2.is-icons-only .sh-brand .brand-mark,
.app.sh2.is-icons-only .sh-brand .brand-text { display: none; }
.app.sh2.is-icons-only .sh-burger { margin: 0; }
.app.sh2.is-icons-only .nav-list { padding-inline: 10px; }
@media (min-width: 1024px) {
    .app.sh2.is-collapsed .sh-brand { justify-content: center; padding: 14px 6px 10px; }
    .app.sh2.is-collapsed .sh-brand .brand-mark,
    .app.sh2.is-collapsed .sh-brand .brand-text { display: none; }
    .app.sh2.is-collapsed .sh-burger { margin: 0; }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .app.sh2:not(.is-collapsed) .sh-brand { justify-content: center; padding: 14px 6px 10px; }
    .app.sh2:not(.is-collapsed) .sh-brand .brand-mark,
    .app.sh2:not(.is-collapsed) .sh-brand .brand-text { display: none; }
    .app.sh2:not(.is-collapsed) .sh-burger { margin: 0; }
}

/* ---------------------------------------------------------------- top bar */
.app.sh2 > .app-header {
    height: var(--header-h); gap: 10px; padding: 0 20px;
    background: transparent; border-bottom: 0; position: relative;
}
.app.sh2 .menu-search { flex: 1 1 auto; max-width: 560px; min-width: 0; }
/* sh-v2b: one frame only - the search box itself, no outer frame around it */
.app.sh2 .ms-box { height: 46px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.app.sh2 .ms-input { height: 42px; border: 1px solid var(--sh-line); border-radius: 12px; background: var(--sh-card); box-shadow: var(--sh-shadow);
    font-size: 13.5px; color: var(--sh-ink); padding-inline-start: 38px; }
.app.sh2 .ms-input:focus { border-color: #b9bdf3; background: var(--sh-card); box-shadow: 0 0 0 3px rgba(75,79,224,.12); }
.app.sh2 .ms-icon { inset-inline-start: 13px; color: var(--sh-ink-3); }
/* rp-v1b: "Auto-hide menu" switch after the search box */
.app.sh2 .sh-autofold { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 42px; padding: 0 4px; cursor: pointer; user-select: none;
    font-size: 12.5px; color: var(--sh-ink-2); white-space: nowrap; margin: 0; }
.app.sh2 .sh-autofold input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.app.sh2 .sh-af-sw { width: 34px; height: 20px; border-radius: 10px; background: #cfd3e6; position: relative; flex: none; transition: background .15s; }
.app.sh2 .sh-af-sw::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.app.sh2 .sh-autofold input:checked + .sh-af-sw { background: linear-gradient(90deg, var(--sh-brand), var(--sh-brand-2)); }
.app.sh2 .sh-autofold input:checked + .sh-af-sw::after { inset-inline-start: 17px; }
.app.sh2 .sh-autofold input:focus-visible + .sh-af-sw { outline: 2px solid rgba(75,79,224,.35); outline-offset: 2px; }
@media (max-width: 1280px) { .app.sh2 .sh-af-txt { display: none; } }
@media (max-width: 1023px) { .app.sh2 .sh-autofold { display: none; } }
.app.sh2 .ms-kbd { background: var(--sh-soft); border: 1px solid var(--sh-line); border-radius: 6px; color: var(--sh-ink-3); }
.app.sh2 .hdr-spacer { flex: 0 1 8px; }

.app.sh2 .sh-pill,
.app.sh2 .scope-chips .chip {
    height: 38px; max-width: 280px; padding: 0 12px; gap: 8px;
    background: var(--sh-card); border: 1px solid var(--sh-line); border-radius: 11px;
    box-shadow: var(--sh-shadow); color: var(--sh-ink); font-size: 12px;   /* lc-v1: smaller scope labels */
}
.app.sh2 .scope-chips { gap: 10px; }
.app.sh2 .scope-chips .chip b { color: var(--sh-ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.app.sh2 .sh-pi { width: 16px; height: 16px; flex: none; color: var(--sh-brand); }
.app.sh2 .sh-year .sh-pi { color: var(--sh-brand-2); }
.app.sh2 .app-company { display: inline-flex; align-items: center; border-inline-start: 0; padding-inline-start: 10px; }
.app.sh2 .app-company .co-logo { width: 32px; height: 32px; border-radius: 8px; background: transparent; border: 0; }
.app.sh2 .app-company .co-label { text-transform: none; letter-spacing: 0; font-size: 10.5px; color: var(--sh-ink-3); }
.app.sh2 .app-company .co-name { font-size: 12px; color: var(--sh-ink); }

.app.sh2 > .app-header .icon-btn { width: 44px; height: 44px; border-radius: 12px; color: var(--sh-brand); }
.app.sh2 > .app-header .icon-btn svg { width: 22px; height: 22px; }
.app.sh2 > .app-header .icon-btn:hover { background: var(--sh-card); box-shadow: var(--sh-shadow); }
.app.sh2 #btnNotify .badge { top: 3px; inset-inline-end: 3px; min-width: 18px; height: 18px; border: 2px solid var(--sh-card); font-size: 10.5px; }

.app.sh2 .user-btn { height: 46px; padding: 0 8px; border-radius: 12px; color: var(--sh-ink); }
.app.sh2 .user-btn:hover { background: var(--sh-card); box-shadow: var(--sh-shadow); }
.app.sh2 .avatar { width: 40px; height: 40px; font-size: 14px; background: linear-gradient(135deg, #4b4fe0, #7b5cf5); }
.app.sh2 .user-btn .who { font-weight: 500; font-size: 13.5px; }
.app.sh2 .user-btn .who small { font-weight: 400; color: var(--sh-ink-3); }
html[data-theme=dark] .app.sh2 .dropdown { background: var(--sh-card); border-color: var(--sh-line); }

/* ---------------------------------------------------- breadcrumb and tabs */
.app.sh2 .breadcrumb { background: transparent; border-bottom: 0; height: 26px; padding: 0 22px; color: var(--sh-ink-3); }
.app.sh2 .breadcrumb .current { color: var(--sh-ink); }
.app.sh2 .tab-bar { background: transparent; border-bottom: 1px solid var(--sh-line); padding: 0 18px; gap: 4px; }
.app.sh2 .tab { border-radius: 10px 10px 0 0; color: var(--sh-ink-3); border-bottom-width: 2px; }
.app.sh2 .tab:hover { background: rgba(255, 255, 255, .6); color: var(--sh-ink); }
.app.sh2 .tab.is-active { background: var(--sh-card); color: var(--sh-ink); border-bottom-color: var(--sh-brand); }
html[data-theme=dark] .app.sh2 .tab:hover { background: rgba(255, 255, 255, .06); }
.app.sh2 .tab-host { background: transparent; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1439px) {
    .app.sh2 { --sidebar-w: 248px; }
    .app.sh2 .user-btn .who { display: none; }
    .app.sh2 .sh-brand .brand-name { font-size: 24px; }
    .app.sh2 .app-company .co-label { display: none; }
}
@media (max-width: 1279px) {
    .app.sh2 .app-company .co-label { display: none; }
    .app.sh2 .sh-pill, .app.sh2 .scope-chips .chip { max-width: 210px; }
}
@media (max-width: 1023px) {
    .app.sh2 .app-company .co-text { display: none; }
}
@media (max-width: 767px) {
    .app.sh2 { --header-h: 58px; }
    .app.sh2 .sh-burger-top { display: inline-flex; }
    .app.sh2 .app-sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 45; width: 280px; background: #fff; }   /* the drawer: solid, full height (the brand is inside) */
    html[data-theme=dark] .app.sh2 .app-sidebar { background: #15173a; }
    .app.sh2 .sh-brand { background: transparent; }
    .app.sh2 .sh-brand .brand-mark, .app.sh2 .sh-brand .brand-text { display: block; }
    .app.sh2 .sh-brand .brand-text { display: flex; }
    .app.sh2 .menu-search { flex: 0 0 auto; }
    .app.sh2 .hdr-spacer { flex: 1 1 auto; }
    .app.sh2 > .app-header { padding: 0 10px; gap: 6px; }
    .app.sh2 .ms-box { height: 40px; }
    .app.sh2 > .app-header .icon-btn { width: 40px; height: 40px; }
    .app.sh2 .app-company { height: 40px; padding: 0 6px; }
}

/* fn-v1: regular menu text and smooth type. Only weights that have a real
   font file are used (Roboto 400/500/700, Cairo 400/600/700): a weight with
   no file (600 or 800 for Roboto) is faked by the browser and looks rough. */
html, body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
.app.sh2 .nav-link, .app.sh2 .nav-toggle, .app.sh2 .nav-sub .nav-link,
.app.sh2 .nav-folder.has-active > .nav-toggle, .app.sh2 .nav-link.is-active { font-weight: 400; }

/* rp-v1e: the detailed hint of the "Keep menu open" switch, on hover or focus */
.app.sh2 .sh-autofold { position: relative; }
.app.sh2 .sh-af-tip { position: absolute; top: calc(100% + 8px); inset-inline-start: -12px; z-index: 80; width: 320px;
    padding: 12px 14px; border-radius: 12px; background: #0e1240; color: #e8eaff; font-size: 12.5px; line-height: 1.5; font-weight: 400;
    white-space: pre-line; box-shadow: 0 18px 40px -16px rgba(14,18,64,.6); opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s; pointer-events: none; }
.app.sh2 .sh-af-tip b { display: block; font-weight: 500; color: #fff; margin-bottom: 4px; }
.app.sh2 .sh-af-tip::before { content: ""; position: absolute; top: -6px; inset-inline-start: 22px; width: 12px; height: 12px; background: #0e1240; transform: rotate(45deg); border-radius: 2px; }
.app.sh2 .sh-autofold:hover .sh-af-tip, .app.sh2 .sh-autofold input:focus-visible ~ .sh-af-tip { opacity: 1; visibility: visible; transform: none; transition-delay: .25s; }
.app.sh2 > .app-header { z-index: 30; }   /* rp-v1e: the switch hint opens over the tab bar */

/* ed-v1 (0735): the edition ribbon - a corner band at the top right (top left
   in Arabic) over the shell; it never takes a click. And the licence warning. */
.app.sh2 > .app-header { padding-inline-end: 88px; }
.ed-rib { position: fixed; top: 0; right: 0; width: 96px; height: 96px; overflow: hidden; pointer-events: none; z-index: 60; }
.ed-rib span { position: absolute; top: 19px; right: -40px; width: 156px; transform: rotate(45deg); text-align: center; padding: 6px 0 5px;
    font-size: 10.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: #fff; line-height: 1.2;
    box-shadow: 0 6px 14px -6px rgba(20, 20, 60, .45); }
.ed-rib small { display: block; font-size: 9.5px; font-weight: 400; letter-spacing: .02em; text-transform: none; opacity: .92; margin-top: 1px; }
html[dir="rtl"] .ed-rib { right: auto; left: 0; }
html[dir="rtl"] .ed-rib span { right: auto; left: -40px; transform: rotate(-45deg); letter-spacing: 0; }
.ed-rib.std span { background: linear-gradient(90deg, #0b8a7f, #14b8a6); }
.ed-rib.pro span { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.ed-rib.ent span { background: linear-gradient(90deg, #6d28d9, #a855f7); }
.ed-rib.demo span { background: repeating-linear-gradient(135deg, #e8590c 0 10px, #f0782f 10px 20px); }
.ed-rib.none span { background: linear-gradient(90deg, #5d6178, #8a8ea6); }
.ed-rib.ro span { background: linear-gradient(90deg, #b42318, #e5484d); }
.app.sh2 .ed-warn { max-width: 280px; padding: 6px 12px; border-radius: 10px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: #fff4e0; color: #8a5a00; border: 1px solid #f5d9a6; flex: 0 1 auto; min-width: 0; }
.app.sh2 .ed-warn.ro { background: #fde6de; color: #b42318; border-color: #f7c3b5; }
@media (max-width: 760px) {
    .app.sh2 > .app-header { padding-inline-end: 64px; }
    .ed-rib { width: 72px; height: 72px; }
    .ed-rib span { top: 12px; right: -46px; width: 150px; font-size: 9px; }
    html[dir="rtl"] .ed-rib span { left: -46px; }
    .app.sh2 .ed-warn { display: none; }
}

/* lc-v1b: company | branch | financial year as one flat line of text in the
   top bar - no boxes, borders, shadows or icons, shown in full. */
.app.sh2 .app-company.sh-pill,
.app.sh2 .scope-chips .chip.sh-pill {
    height: auto; max-width: none; padding: 0; gap: 0;
    background: none; border: 0; border-radius: 0; box-shadow: none;
    font-size: 13px; color: var(--sh-ink); white-space: nowrap;
}
.app.sh2 .app-company .co-logo,
.app.sh2 .app-company .co-label,
.app.sh2 .scope-chips .sh-pi { display: none; }
.app.sh2 .app-company { padding-inline-start: 0; }
.app.sh2 .app-company .co-text { display: block; min-width: 0; }
.app.sh2 .app-company .co-name { font-size: 13px; font-weight: 600; color: var(--sh-ink); overflow: hidden; text-overflow: ellipsis; }
.app.sh2 .scope-chips { gap: 0; }
.app.sh2 .scope-chips .chip.sh-pill b { font-weight: 500; overflow: visible; }
.app.sh2 .scope-chips .chip.sh-pill::before {
    content: "|"; margin-inline: 10px; color: var(--sh-ink-3); font-weight: 400;
}
/* the header's own gap (10px; 6px on small screens) stands in for the space
   before the first bar, so company | branch | year are evenly spaced */
.app.sh2 .app-company.sh-pill + .scope-chips .chip.sh-pill:first-of-type::before { margin-inline-start: 0; }

/* tb-v2 (2 Nov 2026): a soft shadow under the top bar only - no block, no
   border, same 68px height; everything in the bar stays as it is. */
.app.sh2 > .app-header { box-shadow: 0 12px 18px -14px rgba(60, 80, 180, .45); }
html[data-theme=dark] .app.sh2 > .app-header { box-shadow: 0 12px 18px -14px rgba(0, 0, 0, .75); }

/* ---------------------------------------------------------------- dm-v1
   (migration 0795) A demo company only: the edition the visitor chose to
   try, in the top bar with the way back to the choice, and one line across
   the shell straight after choosing. Interface only. */
.app.sh2 .scope-chips .dm-pill { display: inline-flex; align-items: center; gap: 8px; }
.app.sh2 .dm-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: linear-gradient(90deg, #6d28d9, #a855f7); }
.app.sh2 .dm-dot.std { background: linear-gradient(90deg, #0b8a7f, #14b8a6); }
.app.sh2 .dm-dot.pro { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.app.sh2 .dm-change { color: var(--sh-brand); font-weight: 600; text-decoration: none; margin-inline-start: 4px; padding-inline-start: 10px; border-inline-start: 1px solid var(--sh-line); }
.app.sh2 .dm-change:hover, .app.sh2 .dm-change:focus-visible { text-decoration: underline; }
.app.sh2 .dm-ready { display: flex; align-items: center; gap: 14px; margin: 6px 22px 8px; padding: 10px 14px; border-radius: 12px;
                     background: var(--sh-soft); border: 1px solid var(--sh-line); color: var(--sh-ink); font-size: 13.5px; }
.app.sh2 .dm-ready[hidden] { display: none; }
.app.sh2 .dm-ready span { flex: 1 1 auto; min-width: 0; }
.app.sh2 .dm-ready a { color: var(--sh-brand); font-weight: 600; text-decoration: none; white-space: nowrap; }
.app.sh2 .dm-ready a:hover, .app.sh2 .dm-ready a:focus-visible { text-decoration: underline; }
.app.sh2 .dm-ready-x { border: 0; background: none; color: var(--sh-ink-3); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
@media (max-width: 767px) {
    .app.sh2 .scope-chips .dm-pill b { display: none; }
    .app.sh2 .dm-ready { flex-wrap: wrap; margin: 6px 12px; }
}

/* ==========================================================================
   sh-v3 (11 Nov 2026, 0799) - approved from the previews:
     * the menu search heads the main menu, before Dashboard (Ctrl+K as
       before; on the narrow rail a magnifier opens it beside the rail)
     * the top bar starts with the company: logo (Professional and
       Enterprise) or initials, name, and the branch and year under it
     * the menu open / close button sits just before the theme button
     * DEMO EDITION badge in the top bar - demo companies only; the corner
       edition ribbon is no longer drawn
   Scoped to .app.sh2.sh3 (Site.master). Same element IDs as before, so
   erp.js and erp-menu-search.js work unchanged. Interface only.
   ========================================================================== */

/* ---------------------------------------- sidebar: brand, search, menu */
.app.sh2.sh3 .app-sidebar { overflow: visible; }                  /* the menu list scrolls, not the whole sidebar */
.app.sh2.sh3 .app-sidebar > .nav-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.app.sh2.sh3 .sh-brand { position: static; padding-bottom: 6px; }
.app.sh2.sh3 .sh-search { flex: none; position: relative; z-index: 5; padding: 4px 12px 10px; }
.app.sh2.sh3 .sh-search .menu-search { display: block; width: 100%; max-width: none; margin: 0; flex: none; position: relative; }
.app.sh2.sh3 .sh-search .ms-box { display: flex; align-items: center; position: relative; width: 100%; height: 40px; box-sizing: border-box; }
.app.sh2.sh3 .sh-search .ms-input { width: 100%; box-sizing: border-box; height: 40px; border-radius: 11px; box-shadow: none;
    background: var(--sh-soft); border: 1px solid transparent; font-size: 13px; }
.app.sh2.sh3 .sh-search .ms-input:focus { background: var(--sh-card); border-color: #b9bdf3; box-shadow: 0 0 0 3px rgba(75,79,224,.12); }
.app.sh2.sh3 .sh-search .ms-kbd { font-size: 10.5px; }
.app.sh2.sh3 .sh-search .ms-open { display: none; width: 46px; height: 40px; margin: 0 auto; border-radius: 11px; color: var(--sh-brand); background: var(--sh-soft);
    align-items: center; justify-content: center; }
.app.sh2.sh3 .sh-search .ms-pop { top: calc(100% + 6px); inset-inline-start: 0; width: max(100%, 380px); max-height: calc(100vh - 170px); overflow-y: auto; }

/* the narrow rail: a magnifier; it opens the box beside the rail */
.app.sh2.sh3.is-icons-only .sh-search { padding: 4px 10px 10px; }
.app.sh2.sh3.is-icons-only .sh-search .ms-box { display: none; }
.app.sh2.sh3.is-icons-only .sh-search .ms-open { display: inline-flex; }
.app.sh2.sh3.is-icons-only .sh-search .menu-search.is-open .ms-box { display: flex; position: absolute; top: 0; inset-inline-start: calc(100% + 12px); width: 360px; z-index: 70; }
.app.sh2.sh3.is-icons-only .sh-search .menu-search.is-open .ms-input { background: var(--sh-card); border-color: #b9bdf3; box-shadow: 0 16px 40px -18px rgba(30, 34, 110, .55); }
.app.sh2.sh3.is-icons-only .sh-search .ms-pop { top: 48px; inset-inline-start: calc(100% + 12px); width: 360px; }
@media (min-width: 1024px) {
    .app.sh2.sh3.is-collapsed .sh-search { padding: 4px 10px 10px; }
    .app.sh2.sh3.is-collapsed .sh-search .ms-box { display: none; }
    .app.sh2.sh3.is-collapsed .sh-search .ms-open { display: inline-flex; }
    .app.sh2.sh3.is-collapsed .sh-search .menu-search.is-open .ms-box { display: flex; position: absolute; top: 0; inset-inline-start: calc(100% + 12px); width: 360px; z-index: 70; }
    .app.sh2.sh3.is-collapsed .sh-search .menu-search.is-open .ms-input { background: var(--sh-card); border-color: #b9bdf3; box-shadow: 0 16px 40px -18px rgba(30, 34, 110, .55); }
    .app.sh2.sh3.is-collapsed .sh-search .ms-pop { top: 48px; inset-inline-start: calc(100% + 12px); width: 360px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .app.sh2.sh3:not(.is-collapsed) .sh-search { padding: 4px 10px 10px; }
    .app.sh2.sh3:not(.is-collapsed) .sh-search .ms-box { display: none; }
    .app.sh2.sh3:not(.is-collapsed) .sh-search .ms-open { display: inline-flex; }
    .app.sh2.sh3:not(.is-collapsed) .sh-search .menu-search.is-open .ms-box { display: flex; position: absolute; top: 0; inset-inline-start: calc(100% + 12px); width: 340px; z-index: 70; }
    .app.sh2.sh3:not(.is-collapsed) .sh-search .ms-pop { top: 48px; inset-inline-start: calc(100% + 12px); width: 340px; }
}

/* ------------------------------------------------ top bar: the company */
.app.sh2.sh3 > .app-header { gap: 12px; padding: 0 18px 0 22px; }
.app.sh2.sh3 .sh-co { display: flex; align-items: center; gap: 12px; min-width: 44px; flex: 0 1 auto; }
.app.sh2.sh3 .sh-co-logo { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--sh-card); border: 1px solid var(--sh-line);
    box-shadow: var(--sh-shadow); display: grid; place-items: center; overflow: hidden; }
.app.sh2.sh3 .sh-co-logo img { max-width: 36px; max-height: 36px; object-fit: contain; display: block; }
.app.sh2.sh3 .sh-co-logo .ini { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px;
    letter-spacing: .02em; background: linear-gradient(135deg, #4b4fe0, #7b5cf5); }
.app.sh2.sh3 .sh-co-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.app.sh2.sh3 .sh-co-name { font-size: 15px; font-weight: 700; color: var(--sh-ink); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.app.sh2.sh3 .sh-co-scope { display: flex; align-items: center; gap: 6px; min-width: 0; }
.app.sh2.sh3 .sh-co-scope .chip { height: 22px; max-width: 230px; padding: 0 8px; gap: 5px; border: 0; border-radius: 7px; box-shadow: none;
    background: var(--sh-soft); color: var(--sh-ink-2); font-size: 11.5px; display: inline-flex; align-items: center; }
.app.sh2.sh3 .sh-co-scope .chip b { font-weight: 500; color: var(--sh-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app.sh2.sh3 .sh-co-scope .chip .sh-pi { width: 13px; height: 13px; }
.app.sh2.sh3 .sh-co-scope .k { color: var(--sh-ink-3); font-weight: 400; white-space: nowrap; }

/* DEMO EDITION: big, orange, demo companies only */
.app.sh2.sh3 .sh-demo { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 12px; border-radius: 12px; flex: none;
    background: repeating-linear-gradient(135deg, #e8590c 0 12px, #f0782f 12px 24px); color: #fff; box-shadow: 0 10px 22px -12px rgba(232, 89, 12, .9); }
.app.sh2.sh3 .sh-demo .w { font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.app.sh2.sh3 .sh-demo .ed { font-size: 12px; font-weight: 500; white-space: nowrap; opacity: .95; }
.app.sh2.sh3 .sh-demo small { font-size: 11px; opacity: .9; white-space: nowrap; }
.app.sh2.sh3 .sh-demo a { height: 28px; padding: 0 10px; border-radius: 8px; background: rgba(255, 255, 255, .95); color: #b4410a; font-size: 12px; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.app.sh2.sh3 .sh-demo a:hover, .app.sh2.sh3 .sh-demo a:focus-visible { background: #fff; }
html[dir=rtl] .app.sh2.sh3 .sh-demo { padding: 0 12px 0 6px; }
html[dir=rtl] .app.sh2.sh3 .sh-demo .w { letter-spacing: 0; }
.app.sh2.sh3 .ed-rib { display: none; }

/* the tools: keep-open switch, menu open / close, theme, bell */
.app.sh2.sh3 .hdr-spacer { flex: 1 1 auto; }
.app.sh2.sh3 .sh-tools { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.app.sh2.sh3 .sh-tools .sh-autofold { margin-inline-end: 6px; }
/* sh-v3b: the menu button sits at the very left of the menu, before the logo;
   the top-bar one only on a phone (the menu is a drawer there) */
.app.sh2.sh3 .sh-burger-top { display: none; }
.app.sh2 .sh-brand .sh-burger-lead { margin-inline-start: -6px; margin-inline-end: 2px; order: -1; }
@media (max-width: 767px) {
    .app.sh2.sh3 .sh-burger-top { display: inline-flex; }
}
.app.sh2.is-icons-only .sh-brand .sh-burger-lead { margin: 0; }
@media (min-width: 1024px) { .app.sh2.is-collapsed .sh-brand .sh-burger-lead { margin: 0; } }
@media (min-width: 768px) and (max-width: 1023px) { .app.sh2:not(.is-collapsed) .sh-brand .sh-burger-lead { margin: 0; } }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1279px) {
    .app.sh2.sh3 .sh-co-name { max-width: 240px; }
    .app.sh2.sh3 .sh-demo .ed, .app.sh2.sh3 .sh-demo small { display: none; }
}
@media (max-width: 1023px) {
    .app.sh2.sh3 .sh-co-scope .k { display: none; }
    .app.sh2.sh3 .sh-co-scope .chip { max-width: 150px; }
}
@media (max-width: 767px) {
    .app.sh2.sh3 > .app-header { padding: 0 10px; gap: 8px; }
    .app.sh2.sh3 .sh-co-scope { display: none; }
    .app.sh2.sh3 .sh-co-name { max-width: 140px; font-size: 13.5px; }
    .app.sh2.sh3 .sh-co-logo { width: 36px; height: 36px; }
    .app.sh2.sh3 .sh-co { min-width: 36px; gap: 8px; }
    /* a phone in the demo: logo + badge, the name is in the user menu */
    .app.sh2.sh3 .sh-co:has(~ .sh-demo) .sh-co-text { display: none; }
    .app.sh2.sh3 .sh-demo { height: 32px; padding: 0 10px; }
    .app.sh2.sh3 .sh-demo a { display: none; }
    /* the drawer: the search is always open at its top */
    .app.sh2.sh3 .app-sidebar { overflow-y: auto; }
    .app.sh2.sh3 .app-sidebar > .nav-list { overflow: visible; }
    .app.sh2.sh3 .sh-search .menu-search, .app.sh2.sh3 .sh-search .menu-search.is-open { position: relative; }
    .app.sh2.sh3 .sh-search .ms-box,
    .app.sh2.sh3 .sh-search .menu-search.is-open .ms-box { display: flex; position: relative; inset: auto; top: auto; width: 100%; }
    .app.sh2.sh3 .sh-search .ms-open { display: none !important; }
    .app.sh2.sh3 .sh-search .ms-pop { position: absolute; top: calc(100% + 6px); inset-inline: 0; width: auto; }
}

/* dark */
html[data-theme=dark] .app.sh2.sh3 .sh-co-logo { background: #23264a; }
html[data-theme=dark] .app.sh2.sh3 .sh-search .ms-input:focus { background: var(--sh-card); }
