/* safeSALE v249 – additive navigation and mobile view, never saved designer geometry.
 * The feature is activated by JS only after a complete original shell was found.
 */
:root { --ss249-css-ready:1; }
body[data-ss249="ready"] .nav.ss249-nav {
  display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:12px!important;
  padding:8px 18px!important;min-height:60px;max-width:100%;
}
body[data-ss249="ready"] .ss249-nav .brand.safesale-brand {
  flex:0 0 auto!important;flex-basis:auto!important;margin-right:auto;gap:8px;
}
body[data-ss249="ready"] .ss249-menu {
  display:flex;flex-wrap:nowrap;gap:4px;align-items:center;min-width:0;
}
body[data-ss249="ready"] .ss249-menu[hidden],body[data-ss249="ready"] .ss249-backdrop[hidden],
body[data-ss249="ready"] .ss249-toggle[hidden] {display:none!important;}
body[data-ss249="ready"] .ss249-menu > a,
body[data-ss249="ready"] .ss249-menu > details > summary {
  display:flex;align-items:center;gap:6px;min-height:40px;padding:9px 10px;border-radius:7px;
  font-size:13px;line-height:20px;white-space:nowrap;color:#fff;font-weight:650;text-decoration:none!important;
}
body[data-ss249="ready"] .ss249-menu > details.nav-gear > summary {width:auto;height:auto;border:0;background:none;}
body[data-ss249="ready"] .ss249-menu > a:hover,
body[data-ss249="ready"] .ss249-menu > details > summary:hover,
body[data-ss249="ready"] .ss249-menu > details[open] > summary {background:#ffffff18;}
body[data-ss249="ready"] .ss249-menu > a[aria-current="page"],
body[data-ss249="ready"] .ss249-menu > .ss249-current-group > summary {background:#ffffff22;box-shadow:inset 0 -2px #8bbcff;}
body[data-ss249="ready"] .ss249-menu .nav-dropdown-menu {
  top:calc(100% + 5px);left:0;right:auto;min-width:218px;width:max-content;
  max-width:min(360px,calc(100vw - 16px));max-height:var(--ss249-menu-height,70vh);
  overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
  transform:translateX(var(--ss249-menu-shift,0px))!important;
}
body[data-ss249="ready"] .ss249-menu :is(.nav-gear,.nav-user) > .nav-dropdown-menu {right:0;left:auto;}
body[data-ss249="ready"] .ss249-menu .nav-dropdown-menu a {white-space:normal;line-height:1.4;min-height:40px;}
body[data-ss249="ready"] .ss249-menu .nav-dropdown-menu a[aria-current="page"] {background:#eaf2ff;color:#164f9c!important;}
body[data-ss249="ready"] .ss249-menu a[data-mail246-nav] [data-mail246-unread]:not([hidden]) {
  display:inline-flex;align-items:center;justify-content:center;margin-left:5px;min-width:19px;min-height:19px;
  padding:0 5px;border-radius:20px;background:#d72f43;color:#fff;font-size:11px;line-height:19px;
}
body[data-ss249="ready"] .ss249-menu :is(a,summary,button):focus-visible,
body[data-ss249="ready"] .ss249-toggle:focus-visible {outline:3px solid #eab840;outline-offset:2px;}
.ss249-drawer-head,.ss249-gear-label,.ss249-mobile-title,.ss249-backdrop,
.ss249-tools-toggle,.ss249-chat-switch {display:none!important;}
body[data-ss249="ready"] .ss249-icon-button {
  display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;
  min-width:44px;min-height:44px;padding:0;border:1px solid #ffffff4a;border-radius:8px;
  background:#ffffff10;color:#fff;font-family:inherit;font-size:24px;line-height:1;cursor:pointer;
}
/* Compact desktop subnavigation, drawer at tablet/handset widths. */
@media (max-width:1150px) {
  body[data-ss249="ready"] .nav.ss249-nav {min-height:60px;padding:8px 12px!important;gap:10px!important;}
  body[data-ss249="ready"] .ss249-nav .brand {margin-right:0!important;}
  body[data-ss249="ready"] .ss249-nav .safesale-brand-logo {width:40px;height:30px;}
  body[data-ss249="ready"] .ss249-nav .safesale-brand-text {font-size:22px;}
  body[data-ss249="ready"] .ss249-mobile-title {display:block!important;margin-left:auto;color:#c5d6eb;font-size:12px;letter-spacing:.07em;}
  body[data-ss249="ready"] .nav.ss249-drawer-open {z-index:120100!important;}
  body[data-ss249="ready"] .ss249-nav .ss249-backdrop:not([hidden]) {
    display:block!important;position:fixed;inset:0;background:#14253e99;z-index:120101;
  }
  body[data-ss249="ready"] .ss249-menu:not([hidden]) {
    display:flex;flex-direction:column;align-items:stretch;gap:4px;
    position:fixed;top:0;bottom:0;left:0;width:min(370px,calc(100vw - 30px));
    height:100vh;height:100dvh;max-height:100dvh;padding:8px 12px max(18px,env(safe-area-inset-bottom));
    padding-top:max(8px,env(safe-area-inset-top));overflow-x:hidden;overflow-y:auto;
    background:#fff;color:#172033;z-index:120102;box-shadow:8px 0 40px #0c1d3840;
    overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  }
  body[data-ss249="ready"] .ss249-drawer-head {
    display:flex!important;align-items:center;justify-content:space-between;gap:12px;
    padding:4px 2px 12px;margin-bottom:6px;border-bottom:1px solid #dde6f2;font-size:20px;flex:none;
  }
  body[data-ss249="ready"] .ss249-drawer-head .ss249-icon-button {color:#243e60;background:#f1f5fb;border-color:#d7e1ee;}
  body[data-ss249="ready"] .ss249-menu > a,
  body[data-ss249="ready"] .ss249-menu > details > summary {
    width:100%;min-height:48px;font-size:16px;line-height:1.35;padding:12px;color:#1c3554;
    white-space:normal;overflow-wrap:anywhere;flex:none;
  }
  body[data-ss249="ready"] .ss249-menu > details {flex:none;}
  body[data-ss249="ready"] .ss249-menu > details > summary::after {margin-left:auto;font-size:14px;}
  body[data-ss249="ready"] .ss249-menu > details.nav-gear > summary::after {display:block;}
  body[data-ss249="ready"] .ss249-gear-label {display:inline!important;}
  body[data-ss249="ready"] .ss249-menu > a:hover,
  body[data-ss249="ready"] .ss249-menu > details > summary:hover,
  body[data-ss249="ready"] .ss249-menu > details[open] > summary {background:#f0f5fc;}
  body[data-ss249="ready"] .ss249-menu > a[aria-current="page"],
  body[data-ss249="ready"] .ss249-menu > .ss249-current-group > summary {background:#eaf2ff;box-shadow:inset 3px 0 #2f6fed;}
  body[data-ss249="ready"] .ss249-menu .nav-dropdown-menu {
    position:static!important;top:auto!important;left:auto!important;right:auto!important;
    transform:none!important;width:100%;max-width:100%;min-width:0;max-height:none;
    padding:2px 0 6px 9px;margin:0;border:0;border-left:2px solid #e3ebf5;border-radius:0;
    box-shadow:none;overflow:visible;background:#fff;
  }
  body[data-ss249="ready"] .ss249-menu .nav-dropdown-menu::before {display:none;}
  body[data-ss249="ready"] .ss249-menu .nav-dropdown-menu a {
    font-size:15px;min-height:46px;padding:12px;color:#233e60!important;
  }
  body[data-ss249="ready"] .ss249-menu .nav-dropdown-section-title {font-size:11px;padding-top:10px;}
}
/* Shared handset layout. Tables remain tables and retain their original column indices. */
@media (max-width:760px) {
  body[data-ss249="ready"] .wrap {padding:10px!important;margin:0!important;max-width:100%;min-width:0;}
  body[data-ss249="ready"] .wrap :is(.card,.section-title,.split-head,form,fieldset) {min-width:0;max-width:100%;}
  body[data-ss249="ready"] .wrap :is(.split-head,.section-title) {gap:10px;flex-wrap:wrap;}
  body[data-ss249="ready"] .wrap .split-head>div {min-width:0;max-width:100%;}
  body[data-ss249="ready"] .wrap :is(h1,h2,h3,label,.muted,.small) {overflow-wrap:anywhere;}
  body[data-ss249="ready"] .wrap h1 {font-size:24px;line-height:1.2;margin-top:4px;}
  body[data-ss249="ready"] .wrap h2 {font-size:20px;line-height:1.25;}
  body[data-ss249="ready"] .wrap .card {padding:12px;}
  body[data-ss249="ready"] .wrap :is(.form-grid,.form-grid-2,.form-grid-3,.ss249-form-stack) {
    grid-template-columns:minmax(0,1fr)!important;gap:12px!important;
  }
  body[data-ss249="ready"] .wrap :is(.form-grid,.form-grid-2,.form-grid-3,.ss249-form-stack) > * {min-width:0!important;max-width:100%;}
  body[data-ss249="ready"] .wrap .ss249-form-stack > * {grid-column:auto!important;}
  body[data-ss249="ready"] .wrap :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea) {
    font-size:16px!important;min-height:44px!important;line-height:1.35;max-width:100%;box-sizing:border-box;
  }
  body[data-ss249="ready"] .wrap :is(.btn,.safesale-crm-dial,.ss218-tabs button,.ss242-tab) {
    min-height:44px!important;font-size:14px;line-height:1.35;padding:10px 12px!important;
    white-space:normal;overflow-wrap:anywhere;touch-action:manipulation;
  }
  body[data-ss249="ready"] .wrap :is(.btn,.ss218-tabs button):disabled {opacity:.55;}
  body[data-ss249="ready"] .wrap :is(.ss239-toolbar,.ss-columns-toolbar,.ss239-filters,.ss239-bulkbar,.ss218-tabs) {gap:8px;min-width:0;max-width:100%;}
  body[data-ss249="ready"] .wrap .ss239-filters > label {min-width:0!important;flex:1 1 135px;}
  body[data-ss249="ready"] .wrap .ss239-filters > label.ss239-search {flex-basis:100%;}
  body[data-ss249="ready"] .wrap .ss239-pager {flex-wrap:wrap;justify-content:flex-start;}
  body[data-ss249="ready"] .wrap :is(.ss239-bulkbar select,.ss239-toolbar input) {min-width:0!important;max-width:100%;}
  body[data-ss249="ready"] .wrap .ss249-tools-toggle {
    display:inline-flex!important;align-items:center;gap:8px;margin:8px 0;min-height:44px;font-size:14px;
  }
  body[data-ss249="ready"] .wrap .ss249-foldable:not(.ss249-tools-open) {display:none!important;}
  body[data-ss249="ready"] .wrap .ss249-foldable.ss249-tools-open {
    border:1px solid #d6e2f3;background:#f6f9ff;border-radius:9px;padding:10px!important;margin:0 0 10px;
    flex-wrap:wrap;
  }
  body[data-ss249="ready"] .ss239-dialog {
    width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);
  }
  body[data-ss249="ready"] :is(.ss239-dialog-body,.ss239-dialog-head) {padding:12px;}
  body[data-ss249="ready"] :is(.ss239-dialog input,.ss239-dialog select,.ss239-dialog textarea) {font-size:16px;min-height:44px;}
  body[data-ss249="ready"] .ss239-dialog .btn {min-height:44px;padding:10px 12px;}
  body[data-ss249="ready"] :is(.ss239-edit-fields,.ss239-column-options) {grid-template-columns:minmax(0,1fr);}
  body[data-ss249="ready"] .ss240-choice-move {width:36px;height:36px;min-width:36px;}
  body[data-ss249="ready"] .ss240-order-choice {min-height:46px;}
  body[data-ss249="ready"] .ss240-order-choice .ss240-column-grip {top:10px;}
  body[data-ss249="ready"] .wrap :is(.ss220-table-scroll,.ss218-scroll,.ss239-scroll,.ss240-scroll,.contact-table-wrap,.lead-import-preview) {
    min-width:0;max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
  }
  body[data-ss249="ready"] .wrap :is(.chat-modal-backdrop,#salesActivityModal,#offerAcceptanceProofModal) {padding:8px!important;}
  body[data-ss249="ready"] .wrap :is(.chat-new-modal,.task-popup) {
    width:min(100%,calc(100vw - 16px));max-height:calc(100dvh - 16px);overflow:auto;padding:14px;
  }
  /* Do not overwrite the administrator's stored x/y/width/height, even on small windows. */
  body[data-ss249="ready"]:not(.lead-section-inline-designing) .lead-section-layout-host.is-free-layout {
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;height:auto!important;gap:12px!important;
  }
  body[data-ss249="ready"]:not(.lead-section-inline-designing) .lead-section-layout-host.is-free-layout > .lead-section-layout-item {
    position:relative!important;left:auto!important;top:auto!important;width:auto!important;height:auto!important;
    min-width:0!important;max-width:100%!important;
  }
  .ss249-kpis {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
  body[data-ss249="ready"] .ss249-kpis .metric {font-size:clamp(19px,6vw,28px);overflow-wrap:anywhere;}
  body[data-ss249="ready"] .ss249-kpis .muted {font-size:12px;line-height:1.35;}
  /* Keep the compact v231 header fields usable rather than shrinking their text. */
  body[data-ss249="ready"] #offerBuilderForm .ss231-head .ss231-field :is(input,select) {
    font-size:16px!important;min-height:44px!important;height:auto!important;
  }
  body[data-ss249="ready"] .ss231-headerbar .ss223-type-label select {font-size:16px;min-height:44px;height:auto;}
  body[data-ss249="ready"] .ss231-headerbar .btn {min-height:44px!important;}
  /* Existing chat pane becomes a single master/detail view; no conversation node is replaced. */
  body[data-ss249="ready"] .wrap.chat-full-wrap {padding:0!important;margin:0;}
  body[data-ss249="ready"] .chat-shell[data-ss249-chat] {
    display:flex;flex-direction:column;height:calc(100vh - var(--ss220-nav-height,60px));
    height:calc(100dvh - var(--ss220-nav-height,60px));min-height:240px;overflow:hidden;
  }
  body[data-ss249="ready"] .chat-shell[data-ss249-chat] > :is(.chat-sidebar,.chat-main) {
    flex:1;min-height:0;max-height:none;overflow:hidden;width:100%;
  }
  body[data-ss249="ready"] .chat-shell[data-ss249-chat="thread"] > .chat-sidebar,
  body[data-ss249="ready"] .chat-shell[data-ss249-chat="list"] > .chat-main {display:none!important;}
  body[data-ss249="ready"] .chat-shell[data-ss249-chat] .chat-thread-list {max-height:none;min-height:0;}
  body[data-ss249="ready"] .chat-shell[data-ss249-chat] .chat-messages {min-height:0;padding:12px;}
  body[data-ss249="ready"] .chat-shell[data-ss249-chat] .chat-main-head {flex-wrap:wrap;gap:6px;padding:8px;}
  body[data-ss249="ready"] .chat-shell[data-ss249-chat] .chat-head-person {flex:1 1 160px;}
  body[data-ss249="ready"] .ss249-chat-switch {
    display:flex!important;flex:none;align-items:center;min-height:44px;padding:10px 12px!important;
    margin:0;border-radius:0!important;background:#fff;font-size:14px;text-align:left;
  }
  body[data-ss249="ready"] .chat-head-icon {min-width:40px;min-height:40px;}
  body[data-ss249="ready"] .chat-filter-tabs a {min-height:40px;font-size:12px;padding:12px 9px;}
}
@media print {
  body[data-ss249="ready"] .ss249-nav, .ss249-tools-toggle,.ss249-chat-switch {display:none!important;}
  body[data-ss249="ready"] .wrap .ss249-foldable {display:none!important;}
}

body[data-ss249="ready"] .ss249-notice-dot {display:inline-block;width:8px;height:8px;min-width:8px;border-radius:50%;background:#e94b5f;box-shadow:0 0 0 2px #ffffff26;}
body[data-ss249="ready"] .ss249-notice-dot[hidden]{display:none!important;}
body[data-ss249="ready"] .ss249-toggle {position:relative;}
body[data-ss249="ready"] .ss249-toggle-notice {position:absolute;top:5px;right:5px;}
@media (max-width:760px) {
  body[data-ss249="ready"] .chat-composer > input {flex:1;min-width:0;}
  body[data-ss249="ready"] .chat-composer > .btn {flex:none;white-space:nowrap!important;}
  body[data-ss249="ready"] .ss-mail246 :is(button,.ssm-link,.ssm-settings) {min-height:44px;padding:10px 12px;font-size:14px;}
  body[data-ss249="ready"] .ssm-compose {width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:12px;}
  body[data-ss249="ready"] .ssm-compose .ssm-form-grid {grid-template-columns:minmax(0,1fr);}
  body[data-ss249="ready"] .ssm-compose :is(input:not([type=checkbox]),select,textarea) {font-size:16px;min-height:44px;}
  body[data-ss249="ready"] .pipeline-wrap {min-width:0;max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;}
  body[data-ss249="ready"] .pipeline-col {min-width:230px;}
  body[data-ss249="ready"] .pipeline-board {grid-template-columns:repeat(7,minmax(230px,1fr))!important;min-width:1670px!important;}
  body[data-ss249="ready"] .pipeline-col-head h3 {font-size:16px;}
}

@media(max-width:760px){
 body[data-ss249="ready"] .wrap .ss239-table input[type="checkbox"]{width:24px;height:24px;min-width:24px;}
}
