/* E1 unified chrome. Matches the approved home design on every logged-in page.
   Scope: only layout and navigation; no application content or modal logic changes.
   Colors: #004D43, #00A67E, #00D6B5 and #E6FBF6. */
body.e1-app-page {
    --e1-deep:#004D43;
    --e1-jade:#00A67E;
    --e1-aqua:#00D6B5;
    --e1-fog:#E6FBF6;
    background:#F5FCFA;
}
.e1-global-shell {
    display:grid;
    grid-template-columns:241px minmax(0,1fr);
    max-width:2100px;
    margin:0 auto;
    width:100%;
    min-width:0;
    min-height:calc(100vh - 73px);
    align-items:stretch;
}
.e1-global-nav-sprite {
    width:0;height:0;overflow:hidden;position:absolute;pointer-events:none;
}
.e1-global-main {min-width:0;width:100%;}
.e1-global-sidebar {
    position:sticky;
    top:0;align-self:start;
    z-index:30;
    min-height:calc(100vh - 73px);
    max-height:100vh;
    overflow-y:auto;
    padding:18px 15px 28px 19px;
    border-right:1px solid #E1EEE7;
    background:linear-gradient(180deg,#FAFEFC,#F2FBF7);
    scrollbar-width:thin;
    scrollbar-color:#B4DCCD transparent;
}
.e1-sidebar-product {
    display:flex;align-items:center;
    gap:12px;
    min-height:61px;
    margin:1px 5px 17px;
    text-decoration:none;
    border-radius:12px;
    color:#004D43;
    font-size:22px;
    font-weight:850;
}
.e1-sidebar-product img {
    display:block;
    width:49px;height:49px;
    object-fit:contain;
    filter:drop-shadow(0 4px 5px rgba(0,82,61,.13));
}
.e1-sidebar-product span {color:#004D43;font-size:22px;font-weight:850;letter-spacing:-.45px;}
.e1-sidebar-product:hover span {color:#00876B;}
.e1-sidebar-product:focus-visible {outline:2px solid #00A67E;outline-offset:3px;}
.e1-global-sidebar .e1-home-menu a {
    width:100%;
    min-height:45px;
    border-radius:13px;
    gap:15px;
    padding:9px 12px;
    color:#183B32;
    font-size:14px;
    font-weight:600;
}
.e1-global-sidebar .e1-home-menu a img,
.e1-global-sidebar .e1-home-menu a svg {
    display:block;flex:0 0 22px;
    width:22px;height:22px;
    object-fit:contain;
}
.e1-global-sidebar .e1-home-menu a svg {
    fill:none;
    stroke:#005E4A;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.e1-global-sidebar .e1-home-menu a.is-current {
    color:#FFFFFF;
    font-weight:760;
    background:linear-gradient(112deg,#004D43 0%,#007C65 68%,#00A67E 100%);
    box-shadow:0 5px 10px rgba(0,76,65,.12);
}
.e1-global-sidebar .e1-home-menu a.is-current svg {
    stroke:#FFFFFF;
}
.e1-global-sidebar .e1-home-menu a.is-current img {
    filter:brightness(0) invert(1);
}
.e1-global-sidebar .e1-home-menu a:hover:not(.is-current) {
    background:#E8F9F1;color:#006956;
}
.e1-global-sidebar .e1-home-menu-divider {
    margin:18px 8px 14px;
    background:#D9EAE2;
}
.e1-global-sidebar .e1-home-menu a:focus-visible {
    outline:2px solid #00A67E;outline-offset:2px;
}

/* Only one sidebar is responsible for the entire page grid.
   Dashboard's own content no longer creates an extra 241px left column. */
body.e1-home-page .e1-home-layout {
    display:block;
    grid-template-columns:none;
    width:100%;
    max-width:none;
    margin:0;
}
body.e1-home-page .e1-home-workspace {width:100%;min-width:0;}

/* CRM still owns its board/cards/forms, but not a duplicate navigation rail. */
.e1-global-main main.container {
    width:100%;
    min-width:0;
}
.e1-global-main main.container.crm-wide-container {
    width:100%;
    max-width:none;
    min-width:0;
    padding:12px 80px 32px 8px !important;
}
.e1-global-main .crm-wide-container > .crm-shell {
    display:flex;
    min-height:calc(100vh - 95px);
    width:100%;
    min-width:0;
    margin:0 !important;
    overflow:visible;
}
.e1-global-main .crm-shell .crm-main-area {
    display:block;
    flex:1 1 auto;
    min-width:0;
    width:100%;
}
.e1-global-main .crm-main-area .deal-board-wrapper,
.e1-global-main .crm-main-area .contacts-list-panel,
.e1-global-main .crm-main-area .crm-calendar-panel {
    min-width:0;
}

/* Same account control and same gradient on every page. */
.e1-home-account-menu > summary {
    display:flex;align-items:center;justify-content:center;
    width:33px;height:35px;
    font-size:27px;line-height:1;
    color:#FFFFFF;
    border-radius:9px;
    border:1px solid rgba(255,255,255,.16);
    background:rgba(255,255,255,.09);
    transition:background .15s ease;
}
.e1-home-account-menu > summary:hover,
.e1-home-account-menu[open] > summary {
    background:rgba(255,255,255,.20);
}
.e1-home-account-menu > summary span {
    display:inline-block;
    transform:translateY(-4px);
    letter-spacing:-.08em;
}
.e1-home-header .crm-task-notify-popover {
    z-index:1000;
}

/* All 5 requested details must match at every screen width. */
.e1-home-quicksearch-label kbd {display:none !important;}
.e1-home-header .e1-home-quicksearch-results {
    z-index:1000;
}
.e1-global-main > main.container:not(.crm-wide-container):not(.e1-home-container) {
    max-width:1420px;
    margin-left:auto;
    margin-right:auto;
}
@media(max-width:1420px) {
    .e1-global-shell {grid-template-columns:218px minmax(0,1fr);}
    .e1-global-sidebar {padding:16px 11px 24px;}
    .e1-global-sidebar .e1-home-menu a {gap:10px;padding:9px 11px;}
}
@media(max-width:1050px) {
    .e1-global-shell {grid-template-columns:185px minmax(0,1fr);}
    .e1-global-sidebar {padding:14px 9px 20px;}
    .e1-global-sidebar .e1-home-menu a {font-size:12px;gap:8px;padding:8px 9px;}
    .e1-sidebar-product {margin-left:5px;margin-bottom:10px;}
    .e1-sidebar-product img {width:39px;height:39px;}
    .e1-sidebar-product span {font-size:20px;}
}
@media(max-width:850px) {
    .e1-global-main main.container.crm-wide-container {
        padding:8px 16px 25px !important;
    }
    .e1-global-main .crm-wide-container > .crm-shell {
        display:block;
    }
}
@media(max-width:720px) {
    .e1-global-shell {
        display:block;
        min-height:calc(100vh - 100px);
    }
    .e1-global-sidebar {
        position:relative;top:auto;z-index:20;
        min-height:0;max-height:none;
        padding:9px 12px;
        border-right:0;
        border-bottom:1px solid #DDEFE6;
        overflow:visible;
    }
    .e1-sidebar-product {
        min-height:43px;margin:0 0 6px 4px;gap:7px;
    }
    .e1-sidebar-product img {width:35px;height:35px;}
    .e1-sidebar-product span {font-size:17px;}
    .e1-global-sidebar .e1-home-menu {
        display:flex;flex-direction:row;flex-wrap:wrap;gap:4px;
    }
    .e1-global-sidebar .e1-home-menu a {
        width:auto;min-height:34px;
        padding:7px 9px;font-size:11px;gap:5px;
    }
    .e1-global-sidebar .e1-home-menu a img,
    .e1-global-sidebar .e1-home-menu a svg {
        width:15px;height:15px;flex-basis:15px;
    }
    .e1-global-sidebar .e1-home-menu-divider {margin:7px 3px;}
    .e1-global-main main.container.crm-wide-container {
        padding:8px 12px 22px !important;
    }
    .e1-global-main .crm-main-area {
        padding:18px 12px;
    }
}
@media(prefers-reduced-motion:reduce) {
    .e1-global-sidebar a,.e1-home-account-menu > summary {
        transition:none !important;
    }
}
