/* Approved company list: navy glass, original notification/action controls. */
body .sidebar .company-item {
    box-sizing:border-box;min-height:58px;margin-bottom:6px;padding:10px 9px;
    border:1px solid #7898b25e;border-left:4px solid #718da580;border-radius:11px;
    background:radial-gradient(ellipse at 12% 0,#9fc4de12,transparent 75%),linear-gradient(125deg,#284154,#182e40);
    box-shadow:inset 0 1px #d4e6f117,0 2px 5px #030e1a14;
    color:#e4edf6;transition:background .15s,border-color .15s,box-shadow .15s;
}
body .sidebar .company-item.ready-to-send {
    border-left-color:#6bd3ae;border-top-color:#6bd3ae4d;border-bottom-color:#6bd3ae4d;
    background:linear-gradient(90deg,#6bd3ae14,transparent 32%),linear-gradient(125deg,#284154,#182e40);
    box-shadow:inset 0 1px #d4e6f117,0 2px 5px #030e1a14;
}
body .sidebar .company-item.all-sent {
    border-left-color:#efa2a3;border-top-color:#efa2a34d;border-bottom-color:#efa2a34d;
    background:linear-gradient(90deg,#efa2a312,transparent 32%),linear-gradient(125deg,#284154,#182e40);
    box-shadow:inset 0 1px #d4e6f117,0 2px 5px #030e1a14;
}
body .sidebar .company-item:hover {
    background:linear-gradient(125deg,#304d63,#203b50)!important;border-color:#9dbbd08c!important;
    box-shadow:inset 0 1px #e1edf526,0 2px 6px #030e1a26;
}
body .sidebar .company-item.active-company {
    background:linear-gradient(125deg,#304d63,#203b50)!important;border-color:#e7cd97!important;
    box-shadow:inset 0 0 0 1px #e7cd9726,inset 0 1px #fff2d22b;
}
body .sidebar .company-item:is(.ready-to-send,.all-sent):hover{background:linear-gradient(125deg,#304d63,#203b50)!important;border-color:#9dbbd08c!important}
body .sidebar .company-item:is(.ready-to-send,.all-sent).active-company{background:linear-gradient(125deg,#304d63,#203b50)!important;border-color:#e7cd97!important}
body .sidebar .company-item.ready-to-send:is(:hover,.active-company){border-left-color:#6bd3ae!important}
body .sidebar .company-item.all-sent:is(:hover,.active-company){border-left-color:#efa2a3!important}
body .sidebar .company-item .company-checkbox{margin-right:8px;flex-shrink:0}
body .sidebar .company-item .company-info{min-width:0}
body .sidebar .company-item .company-name-row{min-width:0}
body .sidebar .company-item .company-name{font-size:13px;font-weight:650;color:#edf4fa;line-height:1.45}
body .sidebar .company-item .company-ceo{color:#b7cbdb;font-size:11px;line-height:1.6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
body .sidebar .company-item .company-ceo-row{gap:7px;min-width:0}
body .sidebar .company-item .company-actions-mini{align-items:center;flex-shrink:0;gap:2px;margin-left:3px}
/* Keep M, C, inBox, pin and hover-delete styling/handlers from the existing UI. */
body .sidebar .company-item .btn-delete-mini{flex-shrink:0}
body .sidebar .company-item:focus-within .btn-delete-mini{opacity:1}
/* Native checkbox behavior, including multi-select and indeterminate select-all. */
body .sidebar :is(.bulk-task-check,#companyCheckAll) {
    appearance:none;-webkit-appearance:none;box-sizing:border-box;display:inline-block;
    width:14px;height:14px;min-width:14px;min-height:14px;flex:0 0 14px;
    margin:0;vertical-align:middle;border:1.5px solid #9bb9ce;border-radius:50%;
    background:#102a3d80;box-shadow:inset 0 1px 2px #030e1a33;cursor:pointer;
}
body .sidebar :is(.bulk-task-check,#companyCheckAll):checked {
    border-color:#efd5a2;background:#efd5a2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='m3.5 7 2.3 2.4 4.7-4.8' fill='none' stroke='%23253747' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px 12px no-repeat;box-shadow:inset 0 1px #fff5dd80;
}
body .sidebar #companyCheckAll:indeterminate {
    border-color:#efd5a2;background:#efd5a2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7h6' stroke='%23253747' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/12px 12px no-repeat;
}
body .sidebar :is(.bulk-task-check,#companyCheckAll):focus-visible{outline:2px solid #c3dcf8;outline-offset:3px}
@media(prefers-reduced-motion:reduce){body .sidebar .company-item{transition:none}}

/* Search, native filters and sort controls share the company cards' glass. */
body .sidebar .search-wrap:has(#companySearch),
body .sidebar :is(#filterManager,#filterType,#filterPayment,#sortByName,#sortByDate) {
    box-sizing:border-box;min-width:0;min-height:32px;border:1px solid #7898b25e;border-radius:8px;
    background:radial-gradient(ellipse at 12% 0,#9fc4de12,transparent 75%),linear-gradient(125deg,#284154,#182e40);
    box-shadow:inset 0 1px #d4e6f117,0 2px 5px #030e1a14;color:#dce8f4;
    font-size:12px;font-weight:550;transition:background .15s,border-color .15s,box-shadow .15s;
    color-scheme:dark;
}
body .sidebar .search-wrap:has(#companySearch){min-height:35px;padding:0 11px;gap:8px}
body .sidebar .search-wrap #companySearch{box-sizing:border-box;background:transparent!important;border:0!important;box-shadow:none!important;min-height:33px;width:100%;padding:6px 0;color:#e4edf6;font-size:12px;font-weight:400;border-radius:0}
body .sidebar #companySearch::placeholder{color:#a8bdce;opacity:1}
body .sidebar .search-wrap:has(#companySearch)>i{color:#a8bdce;font-size:13px}
body .sidebar :is(#filterManager,#filterType,#filterPayment){appearance:none;-webkit-appearance:none;padding:6px 25px 6px 9px;cursor:pointer;text-align:center;text-overflow:ellipsis;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23b7cbdb' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),linear-gradient(125deg,#284154,#182e40);background-size:12px 12px,cover;background-position:right 9px center,center;background-repeat:no-repeat}
body .sidebar :is(#filterManager,#filterType,#filterPayment) option{background:#182e40;color:#e4edf6}
body .sidebar :is(.filter-select-wrap,.sort-filter-wrap){padding:0;gap:7px;margin-top:6px}
body .sidebar #filterManagerWrap{padding:0;background:transparent;border:0;box-shadow:none;margin-top:6px}
body .sidebar :is(#sortByName,#sortByDate){gap:6px;padding:6px 8px}
body .sidebar :is(#sortByName,#sortByDate)>i{font-size:12px;color:inherit}
body .sidebar .search-wrap:has(#companySearch):hover,
body .sidebar :is(#filterManager,#filterType,#filterPayment,#sortByName,#sortByDate):hover{border-color:#9dbbd08c;box-shadow:inset 0 1px #e1edf526,0 2px 6px #030e1a26;color:#edf4fa}
body .sidebar :is(#sortByName,#sortByDate).active{background:linear-gradient(125deg,#f0d8a7,#d5b67f);color:#263747;border-color:#efd5a2;box-shadow:inset 0 1px #fff5dd80,0 2px 5px #030e1a26;font-weight:650}
body .sidebar .search-wrap:has(#companySearch):focus-within{border-color:#e7cd97;box-shadow:0 0 0 2px #e7cd971c}
body .sidebar :is(#filterManager,#filterType,#filterPayment,#sortByName,#sortByDate):focus-visible{outline:2px solid #c3dcf8;outline-offset:2px}
@media(prefers-reduced-motion:reduce){body .sidebar .search-wrap:has(#companySearch),body .sidebar :is(#filterManager,#filterType,#filterPayment,#sortByName,#sortByDate){transition:none}}

/* One glass card for the existing summary toggle and refresh action. */
body .sidebar #emailSummaryToggleWrap .email-summary-card {
    box-sizing:border-box;width:100%;min-height:52px;padding:4px 6px 4px 9px;
    border:1px solid #7898b25e;border-left:4px solid #718da580;border-radius:11px;
    background:radial-gradient(ellipse at 12% 0,#9fc4de12,transparent 75%),linear-gradient(125deg,#284154,#182e40);
    box-shadow:inset 0 1px #d4e6f117,0 2px 5px #030e1a14;
}
body .sidebar #emailSummaryToggleWrap .email-summary-card:has([data-enabled=true]){border-left-color:#6bd3ae}
body .sidebar #btnEmailSummaryToggle.nav-item {
    width:auto;min-width:0;min-height:40px;margin:0;padding:7px 5px;gap:9px;
    background:transparent!important;border:0!important;box-shadow:none!important;
    color:#a8bdce!important;font-size:12px!important;font-weight:550;transform:none!important;
}
body .sidebar #btnEmailSummaryToggle.nav-item[data-enabled=true]{color:#e4edf6!important}
body .sidebar #btnEmailSummaryToggle>i{font-size:16px;color:#a8bdce!important;text-shadow:none!important;flex-shrink:0}
body .sidebar #btnEmailSummaryToggle[data-enabled=true]>i{color:#9dd3bd!important}
body .sidebar #btnEmailSummaryToggle>span{min-width:0;white-space:nowrap}
body .sidebar #emailSummaryToggleWrap .email-summary-refresh {
    display:grid;place-items:center;width:30px;min-height:30px;padding:6px!important;
    border:1px solid #7898b24d!important;border-radius:7px!important;
    background:#102a3d40!important;color:#b7cbdb!important;box-shadow:inset 0 1px #d4e6f117;
}
body .sidebar #emailSummaryToggleWrap .email-summary-refresh:hover{border-color:#e7cd9780!important;color:#e7cd97!important;background:#e7cd9712!important}
body .sidebar #emailSummaryToggleWrap .email-summary-card:hover{border-color:#9dbbd08c}
body .sidebar #emailSummaryToggleWrap .email-summary-card:has([data-enabled=true]):hover{border-left-color:#6bd3ae}
body .sidebar #emailSummaryToggleWrap .email-summary-refresh:focus-visible{outline:2px solid #c3dcf8;outline-offset:2px}
/* Match the outer edges of Settings / Logout in the inset robot sidebar. */
body.saesol-theme .sidebar #emailSummaryToggleWrap .email-summary-card{width:calc(100% - 10px);margin-left:5px;margin-right:5px}
