@font-face{font-family:CircularStd;font-style:normal;font-weight:400;src:url("../assets/fonts/CircularStd-Book.woff") format("woff")}
@font-face{font-family:CircularStd;font-style:normal;font-weight:500;src:url("../assets/fonts/CircularStd-Medium.woff") format("woff")}
@font-face{font-family:CircularStd;font-style:normal;font-weight:700;src:url("../assets/fonts/CircularStd-Bold.woff") format("woff")}
@font-face{font-family:CircularStd;font-style:normal;font-weight:800;src:url("../assets/fonts/CircularStd-Black.woff") format("woff")}

:root{
  --crm-bg:#eef3f8;
  --crm-surface:rgba(255,255,255,.94);
  --crm-surface-strong:#fff;
  --crm-surface-soft:#f7faff;
  --crm-text:#152235;
  --crm-muted:#617089;
  --crm-line:rgba(19,36,61,.1);
  --crm-shadow:0 22px 52px rgba(16,28,45,.08);
  --crm-shadow-strong:0 32px 80px rgba(9,20,36,.16);
  --crm-radius-xl:28px;
  --crm-radius-lg:22px;
  --crm-radius-md:18px;
  --crm-radius-sm:14px;
  --crm-primary:#0f6fff;
  --crm-primary-rgb:15,111,255;
  --crm-success:#0cb068;
  --crm-warning:#f59e0b;
  --crm-danger:#ef4444;
  --crm-info:#06b6d4;
  --crm-sidebar-width:288px;
  --crm-content-max:1480px;
}

/* =========================================================
   Base Layout And Theme System
   ========================================================= */
*{box-sizing:border-box}
html{min-height:100%;background:var(--crm-bg,#eef3f8)}

@keyframes crm-spin{
  to{transform:rotate(360deg)}
}

body.crm-body{
  position:relative;
  min-height:100vh;
  overflow-x:hidden;
  font-family:var(--crm-body-font,CircularStd,"Segoe UI",sans-serif);
  background: #F4F4F7;
}

body.crm-body::before{
  content:none;
}

body.crm-body::after{
  content:none;
}

body.crm-body.density-compact{--crm-control-height:48px;--crm-gap:14px}
body.crm-body.density-airy{--crm-control-height:56px;--crm-gap:22px}
h1,h2,h3,h4,h5,h6{font-family:var(--crm-heading-font,CircularStd,"Segoe UI",sans-serif)}
a{color:var(--crm-primary);text-decoration:none}
a:hover{color:rgba(var(--crm-primary-rgb),.82)}
h1,h2,h3,h4,h5,h6{color:var(--crm-text)}
p,.helper,.metric-footnote,.card-kicker,.page-eyebrow,.server_time,.modal-date,.modal-text p,.memo-note,.countdown,.time-ago,.mg-5{color:var(--crm-muted)}


h1, h2, h3, h4, h5, h6 {
  font-family: sans-serif;
  font-size: 16px;
  font-weight: 529;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: rgb(87, 87, 90);
}


.overlay{
  position:fixed;
  inset:0;
  z-index:1090;
  background:rgba(7,18,31,.34);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
}

.overlay.show{opacity:1;pointer-events:auto}

/* =========================================================
   Sidebar Navigation
   ========================================================= */
.sidebar{
  position:fixed;
  inset:0;
  width:var(--crm-sidebar-width);
  height:calc(100vh - 10px);
  z-index:1100;
  overflow-y:hidden!important;
  overflow-x:hidden;
  scrollbar-width:none;
  -ms-overflow-style:none;
  box-shadow: 0 2px 2px -1px rgba(25, 24, 34, 0.1), 0 1px 3px 0 rgba(25, 24, 34, 0.08);
}

.sidebar::-webkit-scrollbar{display:none}

.sidebar-panel{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:12px;
  height:100%;
  padding:12px 14px 16px;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  border-radius:0;
  background:linear-gradient(180deg,var(--crm-sidebar-bg) 0%,rgba(var(--crm-sidebar-surface-rgb,22,34,54),.98) 100%);
  box-shadow:0 18px 42px rgba(2,9,19,.18);
}

.sidebar-panel::before{
 
}

body.crm-body.sidebar-style-glass .sidebar-panel{
  background:linear-gradient(180deg,rgba(var(--crm-sidebar-bg-rgb),.92) 0%,rgba(var(--crm-sidebar-surface-rgb,22,34,54),.94) 100%);
}

body.crm-body.sidebar-style-light .sidebar-panel{
  color:var(--crm-text);
  background:linear-gradient(180deg,rgba(255,255,255,.98) 0%,rgba(var(--crm-surface-rgb,255,255,255),.94) 100%);
  box-shadow:0 16px 34px rgba(16,28,45,.1);
}

body.crm-body.sidebar-style-light .sidebar-panel::before{
  border-color:rgba(var(--crm-line-rgb,217,228,239),.7);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:0;
  color:#fff;
}

.brand:hover{color:#fff}

.brand-mark{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  flex-shrink:0;
  overflow:hidden;
  border-radius:16px;
  color:#fff;
  box-shadow:0 12px 24px rgba(var(--crm-primary-rgb),.22);
}

.brand-mark img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#fff;
}

.brand-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.brand-copy strong{
  font-size:1rem;
  line-height:1.2;
  color:var(--crm-brand-title-color,#ffffff);
}

.brand-copy small{
  font-size:.78rem;
  letter-spacing:.04em;
  color:var(--crm-brand-tagline-color,#cbd5e1);
}

.metismenu,
.metismenu ul{
  list-style:none;
  margin:10px 0;
  padding:0;
}

.metismenu ul li{
  margin:5px 0;
}

.sidebar-top{
  position:relative;
  top:auto;
  z-index:3;
  display:grid;
  gap:6px;
  padding-top:0;
  padding-bottom:2px;
  background:transparent;
}

.sidebar-mobile-close{
  display:none;
  width:38px;
  height:38px;
  margin-left:auto;
  border:0;
  border-radius:12px;
  background:rgba(255,255,255,.12);
  color:#fff;
}

body.crm-body.sidebar-style-glass .sidebar-top{
  background:transparent;
}

body.crm-body.sidebar-style-light .sidebar-top{
  background:transparent;
}

.sidebar-search{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  padding:0 14px;
  overflow:hidden;
  border-radius:18px;
  background:rgba(255,255,255,.06);
	border: 1px solid #919191;
  transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

body.crm-body.sidebar-style-light .sidebar-search{
  background:rgba(var(--crm-primary-rgb),.05);
  border-color:rgba(var(--crm-line-rgb,217,228,239),.7);
}

.sidebar-search:focus-within{
  border-color:rgba(var(--crm-primary-rgb),.38);
  box-shadow:0 0 0 3px rgba(var(--crm-primary-rgb),.08);
}

.sidebar-search input{
  width:100%;
  min-width:0;
  min-height:auto;
  margin:0;
  padding:0;
  border:0!important;
  outline:none!important;
  border-radius:0!important;
  background:transparent!important;
  color:inherit;
  box-shadow:none!important;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
}

.sidebar-search input::placeholder{
  color:var(--crm-sidebar-muted,rgba(220,230,247,.62));
}

.sidebar-search input::-webkit-search-decoration,
.sidebar-search input::-webkit-search-cancel-button,
.sidebar-search input::-webkit-search-results-button,
.sidebar-search input::-webkit-search-results-decoration{
  -webkit-appearance:none;
  appearance:none;
}

.sidebar-context{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:4px 4px 2px;
  font-size:.77rem;
  color:rgba(214,222,242,.7);
}

.sidebar-context strong{
  display:block;
  margin-top:2px;
  color:#fff;
}

body.crm-body.sidebar-style-light .sidebar-context{
  color:rgba(97,112,137,.84);
}

body.crm-body.sidebar-style-light .sidebar-context strong{
  color:var(--crm-text);
}

.metismenu{
  display:grid;
  gap:14px;
  flex:1;
  overflow:hidden;
  padding-right:4px;
}

.menu-cluster{
  padding:14px;
  border-radius:24px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
  overflow:hidden;
}

body.crm-body.sidebar-style-light .menu-cluster{
  background:rgba(var(--crm-primary-rgb),.04);
  border-color:rgba(var(--crm-line-rgb,217,228,239),.72);
}

.menu-section{
  margin:0;
  padding:0 2px;
}

.menu-section span{
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.18em;
  color:var(--crm-sidebar-muted,rgba(220,230,247,.56));
}

.menu-entity{margin-bottom:6px}

.menu-cluster-list{
  list-style:none;
  display:grid;
  gap:6px;
  margin:12px 0 0;
  padding:0;
}

.menu-entity>a,
.nav-submenu a{
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 14px;
  color:var(--crm-sidebar-text);
  text-decoration:none;
}

body.crm-body.sidebar-style-light .menu-entity>a,
body.crm-body.sidebar-style-light .nav-submenu a{
  color:var(--crm-text);
}

.menu-entity>a,
.nav-submenu a{
  min-height:52px;
  border-radius:18px;
  transform:none!important;
}

.menu-entity>a:hover,
.menu-entity.mm-active>a,
.nav-submenu a:hover,
.nav-submenu li.mm-active>a{
  background:linear-gradient(135deg,rgba(var(--crm-sidebar-hover-rgb),.28),rgba(255,255,255,.08));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
}

body.crm-body.sidebar-style-light .menu-entity>a:hover,
body.crm-body.sidebar-style-light .menu-entity.mm-active>a,
body.crm-body.sidebar-style-light .nav-submenu a:hover,
body.crm-body.sidebar-style-light .nav-submenu li.mm-active>a{
  color:#5b5b5b;
  background:linear-gradient(135deg,rgba(var(--crm-primary-rgb),.14),rgba(255,255,255,.88));
  box-shadow:inset 0 0 0 1px rgba(var(--crm-primary-rgb),.14);
}

.menu-icon{
  display:grid;
  place-items:center;
  flex-shrink:0;
  width:40px;
  height:40px;
  border-radius:14px;
}

.menu-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}

.menu-title{
  font-family:var(--crm-sidebar-font,CircularStd,"Segoe UI",sans-serif);
  font-size:.95rem;
  font-weight:600;
  line-height:1.15;
}

.menu-copy small{
  font-size:.74rem;
  color:var(--crm-sidebar-muted,rgba(220,230,247,.64));
}

body.crm-body.sidebar-style-light .menu-copy small{
  color:rgba(97,112,137,.84);
}

.nav-group>a::after{
  content:"\f078";
  font-family:"Font Awesome 6 Free";
  font-weight:900;
  font-size:.75rem;
  margin-left:auto;
  transition:transform .18s ease;
}

.nav-group.mm-active>a::after{
  transform:rotate(180deg);
}

.nav-group>a>span:last-child:not(.menu-icon){
  margin-right:auto;
}

.nav-submenu{
  display:none;
  padding:8px 0 6px;
}

.nav-submenu.mm-show{display:block}

.nav-submenu a{
  min-height:44px;
  margin-left:12px;
  padding-left:18px;
}

.submenu-dot{
  width:8px;
  height:8px;
  flex-shrink:0;
  border-radius:999px;
  background:rgba(var(--crm-sidebar-hover-rgb),.56);
}

.sidebar-footer{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
  padding:14px 4px 0;
  border-top:1px solid rgba(255,255,255,.08);
  font-size:.78rem;
  color:rgba(214,222,242,.68);
  align-items:flex-end;
  margin-top:auto;
}

.sidebar-footer strong{
  display:block;
  margin-top:4px;
}

/* =========================================================
   Header And Content Shell
   ========================================================= */
.sidebar-panel,
.notification-menu,
.filter-panel,
.modal-content-panel{
  scrollbar-width:thin;
  scrollbar-color:rgba(var(--crm-primary-rgb),.36) transparent;
}

.sidebar-panel::-webkit-scrollbar,
.notification-menu::-webkit-scrollbar,
.filter-panel::-webkit-scrollbar,
.modal-content-panel::-webkit-scrollbar{
  width:10px;
  height:10px;
}

.sidebar-panel::-webkit-scrollbar-thumb,
.notification-menu::-webkit-scrollbar-thumb,
.filter-panel::-webkit-scrollbar-thumb,
.modal-content-panel::-webkit-scrollbar-thumb{
  border:2px solid transparent;
  border-radius:999px;
  background:rgba(var(--crm-primary-rgb),.34);
  background-clip:padding-box;
}

.header{
  position:relative;
  top:auto;
  z-index:1080;
  margin-left:calc(var(--crm-sidebar-width) + 34px);
  padding:20px 24px 0 8px;
}

.header-content{
  margin:0 auto;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:18px 24px;
  border-radius:28px;
  border:1px solid rgba(255,255,255,.68);
  max-width:calc(var(--crm-content-max) + 44px);
  background:#fefefe;
  box-shadow: 0 2px 2px -1px rgba(25, 24, 34, 0.1), 0 1px 3px 0 rgba(25, 24, 34, 0.08);
}

.header-left,
.header-right{display:flex;align-items:center;gap:14px}

.header-right{margin-left:auto;flex-wrap:wrap;justify-content:flex-end}

.page-intro h1{
  margin:0;
  font-size:clamp(1.6rem,2.6vw,2.2rem);
  letter-spacing:-.04em;
}

.menu-toggle,
.quick-search-btn,
.icon-button,
.header-pill{
  min-height:52px;
  padding:0 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border-radius:18px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
  background:rgba(255,255,255,.9);
  color:var(--crm-text);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.menu-toggle:hover,
.quick-search-btn:hover,
.icon-button:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(12,21,35,.06);
  border-color:rgba(var(--crm-primary-rgb),.22);
}

.menu-toggle{width:52px;padding:0}
.quick-search-btn{padding:0 18px;font-weight:600}
.quick-search-btn kbd{
  padding:6px 8px;
  border-radius:10px;
  background:rgba(18,34,56,.06);
  color:var(--crm-muted);
  font-family:inherit;
  font-size:.78rem;
}

.header-pill{font-size:.92rem}
.icon-button{position:relative;width:52px;padding:0}

.notification-badge{
  position:absolute;
  top:8px;
  right:8px;
  min-width:18px;
  height:18px;
  padding:0 4px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:var(--crm-danger);
  color:#fff;
  font-size:.68rem;
  font-weight:700;
}


.notification_dropdown .dropdown-toggle::after{display:none;}

.header-profile .nav-link{
  display:flex;
  align-items:center;
  gap:12px;
  padding:0;
  color:var(--crm-text);
}

.avatar-frame{
  width:50px;
  height:50px;
  flex-shrink:0;
  overflow:hidden;
  border-radius:18px;
  box-shadow:0 10px 22px rgba(12,21,35,.08);
}

.avatar-frame img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.header-info span,
.header-info small{display:block}
.header-info span{font-weight:700;color:var(--crm-text)}
.header-info small{font-size:.78rem;color:var(--crm-muted)}

.dropdown-menu{
     top: 50px !important;
  padding:10px;
  border:1px solid rgba(20,32,51,.08);
  border-radius:20px;
  box-shadow:0 18px 34px rgba(8,18,31,.12);
}

.dropdown-item{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  border-radius:14px;
  color:var(--crm-text);
  font-weight:600;
}

.dropdown-item:hover,
.dropdown-item:focus{
  background:rgba(var(--crm-primary-rgb),.08);
  color:var(--crm-primary);
}

.notification-menu{
  width:min(440px,calc(100vw - 36px));
  max-height:70vh;
  overflow:auto;
}

.main,
.wrap{
  position:relative;
  max-width:var(--crm-content-max);
  margin:0 auto;
  margin-left:calc(var(--crm-sidebar-width) + 34px);
  padding:24px 24px 32px 8px;
  padding-bottom:34px;
}

.wrap{padding-top:28px}

body.crm-body .main.crm-legacy-page,
body.crm-body .wrap.crm-legacy-page{
  display:grid;
  gap:20px;
     padding-bottom: 100px !important;
}

body.crm-body .crm-legacy-page > .card:last-child,
body.crm-body .crm-legacy-page > .sub-card:last-child{
  margin-bottom:0;
}

body.crm-body .crm-legacy-page .full.actions{
  display:flex;
  align-items: end;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

body.crm-body .crm-legacy-page .full.actions > div{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

body.crm-body .crm-legacy-page .helper:empty{
  display:none;
}

body.crm-body .profile-photo{
  position:relative;
  width:min(180px, 100%);
  aspect-ratio:1;
  border-radius:28px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
  background:center/cover no-repeat rgba(var(--crm-primary-rgb),.08);
  box-shadow:var(--crm-shadow);
  overflow:hidden;
}

body.crm-body .profile-photo::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,transparent 35%,rgba(7,18,31,.46) 100%);
  pointer-events:none;
}

body.crm-body .update-photo{
  position:absolute;
  inset:auto 14px 14px;
  z-index:2;
}

body.crm-body .update-photo label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 16px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  color:var(--crm-text);
  font-size:.82rem;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 14px 28px rgba(7,18,31,.18);
}

body.crm-body .update-photo input{
  display:none;
}

body.crm-body .logo-preview{
  display:block;
  width:auto;
  max-width:180px;
  max-height:96px;
  padding:12px;
  border-radius:20px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
  background:#fff;
  object-fit:contain;
}

body.crm-body .crm-auto-table-wrap{
  width:100%;
}

/* =========================================================
   Shared Cards, Forms, Buttons, And Tables
   ========================================================= */
.card,
.sub-card,
.invDash-cardss{
  width:100%;
  border-radius:var(--crm-radius-xl);
  border:1px solid rgba(255,255,255,.72);
  background:var(--crm-surface);
  box-shadow: 0 2px 2px -1px rgba(25, 24, 34, 0.1), 0 1px 3px 0 rgba(25, 24, 34, 0.08);
}

.card{margin-bottom:24px;padding:22px}
.card-header,.card .card-header{padding:0 0 18px;margin-bottom:18px;border-bottom:1px solid var(--crm-line);background:transparent}
.card-footer{padding:18px 0 0;border-top:1px solid var(--crm-line);background:transparent}
.card-title{margin:0}
.card h2,.card h3,.card .h3{margin-bottom:8px}
.card .h3,.form-grid .full>.h3{display:flex;align-items:center;gap:10px;font-size:1.08rem}

.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px}
.crm-auto-form-grid{display:grid;gap:16px}

.field,.full{display:flex;flex-direction:column;gap:8px}
.full{grid-column:1 / -1}
.label,label{font-size:.88rem;font-weight:600;color:var(--crm-text)}

.input,
input[type="text"],
input[type="password"],
input[type="password_hash"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="file"],
input[type="search"],
textarea,
select{
  width:100%;
  min-height:52px;
  padding:13px 16px;
  border-radius:18px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
  background:rgba(255,255,255,.92);
  color:var(--crm-text);
  font-size:.95rem;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.input:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="password_hash"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="file"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus{
  outline:none;
  border-color:rgba(var(--crm-primary-rgb),.34);
  box-shadow:0 0 0 4px rgba(var(--crm-primary-rgb),.08);
}

body.crm-body.card-style-soft .card,
body.crm-body.card-style-soft .sub-card,
body.crm-body.card-style-soft .invDash-card{
  box-shadow:0 12px 26px rgba(19,36,61,.06);
}

body.crm-body.card-style-glass .card,
body.crm-body.card-style-glass .sub-card,
body.crm-body.card-style-glass .invDash-card{
  background:rgba(var(--crm-surface-rgb,255,255,255),.78);
  border-color:rgba(255,255,255,.9);
}

.card h2,.card h3,.card .h3{margin-bottom:8px}
.card .h3,.form-grid .full>.h3{display:flex;align-items:center;gap:10px;font-size:1.08rem}

.form-grid>[class*="col-"]{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
}

.form-grid>.col-md-6{grid-column:span 1}
.form-grid>.col-md-12{grid-column:1 / -1}

.input,
input[type="text"],
input[type="password"],
input[type="password_hash"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="file"],
input[type="search"],
textarea,
select,
.form-control,
.form-select{
  min-height:var(--crm-control-height);
  border-radius:var(--crm-control-radius,18px);
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
}

input[type="color"]{
  min-height:58px;
  padding:8px;
  border-radius:18px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
  background:#fff;
}

/* =========================================================
   Custom Fields
   ========================================================= */
.custom-fields-section,
.crm-custom-fields-display{
  width:100%;
  padding:22px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
  border-radius:var(--crm-radius-lg);
  background:rgba(255,255,255,.88);
}

.custom-fields-section-head{
  margin-bottom:18px;
}

.custom-fields-section-copy{
  margin:0;
  color:var(--crm-muted);
  font-size:.92rem;
}

.custom-fields-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px 20px;
}

.custom-field{
  min-width:0;
}

.custom-field-choice-group{
  display:flex;
  flex-wrap:wrap;
  gap:12px 18px;
  padding:4px 0;
}

.custom-field-choice{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-weight:500;
  color:var(--crm-text);
}

.custom-field-choice input{
  width:auto;
  min-height:0;
  margin:0;
}

.crm-custom-fields-display-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
}

.crm-custom-field-display{
  min-width:0;
  padding:16px 18px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
  border-radius:18px;
  background:rgba(248,250,252,.92);
}

.crm-custom-field-label{
  margin-bottom:8px;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--crm-muted);
}

.crm-custom-field-value{
  color:var(--crm-text);
  line-height:1.6;
  word-break:break-word;
}

.crm-custom-field-empty{
  color:var(--crm-muted);
}

.btn.btn-secondary,
.btn-secondary,
.dt-buttons .btn,
.buttons-copy,
.buttons-html5,
.buttons-print{
  color:var(--crm-text)!important;
  background:rgba(255,255,255,.92)!important;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84)!important;
}

.btn.btn-secondary:hover,
.btn-secondary:hover,
.dt-buttons .btn:hover,
.buttons-copy:hover,
.buttons-html5:hover,
.buttons-print:hover{
  color:var(--crm-primary)!important;
  background:rgba(var(--crm-primary-rgb),.08)!important;
  border-color:rgba(var(--crm-primary-rgb),.22)!important;
}

.btn-sm{
  min-height:40px!important;
  padding:0 14px!important;
  border-radius:14px!important;
  font-size:.82rem!important;
}

body.crm-body.button-style-solid .btn.primary,
body.crm-body.button-style-solid .btn.btn-primary,
body.crm-body.button-style-solid .btn-primary{
  background:var(--crm-primary)!important;
}

body.crm-body.button-style-soft .btn.primary,
body.crm-body.button-style-soft .btn.btn-primary,
body.crm-body.button-style-soft .btn-primary{
  color:var(--crm-primary)!important;
  background:rgba(var(--crm-primary-rgb),.12)!important;
  box-shadow:none;
}

.dataTables_wrapper .dt-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.fc-button-group > .fc-button{text-transform:capitalize;}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:600;
}

.filter-panel{
  width:min(560px,calc(100vw - 48px));
  padding:16px;
  border-radius:24px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.8);
  box-shadow:var(--crm-shadow-strong);
}

.accordion-item{
  border-bottom:1px solid rgba(var(--crm-line-rgb,217,228,239),.44);
}

.accordion-item:last-child{border-bottom:0}

.accordion-header{
  padding:12px 14px;
  border-radius:16px;
  background:rgba(19,36,61,.04);
}

.accordion-header:hover{
  background:rgba(var(--crm-primary-rgb),.08);
}

.accordion-body{
  padding:14px 6px 8px;
}

#customRange{
  gap:16px;
  flex-wrap:wrap;
}

.summary{
  margin-top:6px;
  padding:14px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  border:1px dashed rgba(var(--crm-line-rgb,217,228,239),.94);
  border-radius:18px;
  background:rgba(255,255,255,.72);
}

.sum-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border-radius:16px;
  background:#fff;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.66);
}

.sum-item.total{
  background:rgba(var(--crm-primary-rgb),.08);
  border-color:rgba(var(--crm-primary-rgb),.14);
}

.money{font-weight:800}

.inputs-wrapper{
  display:flex;
  gap:20px;
  flex-wrap:wrap;
}

.inputs-wrapper .field{
  flex:1 1 280px;
  width:auto!important;
}

.sub-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:22px;
  font-weight:700;
}

.sub-header .sub-delete{color:#ef4444}
.sub-header .sub-delete:hover{color:#dc2626}

#assignedCount{
  display:inline-flex;
  align-items:center;
  min-width:230px;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.82);
  background:rgba(255,255,255,.86);
}

/* =========================================================
   Settings Page
   ========================================================= */
.settings-shell{display:grid;gap:24px}
.settings-hero{
  position:relative;
  overflow:hidden;
  padding:28px;
  border-radius:30px;
  color:#fff;
  background:linear-gradient(135deg,#0f172a 0%,#183253 52%,var(--crm-primary) 100%);
  box-shadow:0 18px 42px rgba(9,20,36,.16);
}

.settings-hero h2{
	
	color:#fff;
}

.settings-hero p{max-width:720px;color:rgba(255,255,255,.8)}
.settings-layout{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:20px}
.settings-section{grid-column:span 6;padding:24px;border:1px solid rgba(255,255,255,.76);border-radius:var(--crm-radius-xl);background:var(--crm-surface);margin: 10px 0;box-shadow: 0 2px 2px -1px rgba(25, 24, 34, 0.1), 0 1px 3px 0 rgba(25, 24, 34, 0.08);   }
.settings-section.full{grid-column:span 12}
.settings-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.settings-section-head h3{margin-bottom:6px;font-size:1.18rem}
.settings-badge{min-height:34px;padding:0 12px;display:inline-flex;align-items:center;border-radius:999px;background:rgba(var(--crm-primary-rgb),.12);color:var(--crm-primary);font-size:.78rem;font-weight:700}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px}
.settings-field{display:flex;flex-direction:column;gap:8px;min-width:0}
.settings-field.full{grid-column:1 / -1}
.settings-field small{font-size:.78rem}
.color-input-shell{display:flex;align-items:center;gap:12px}
.color-chip{width:44px;height:44px;flex-shrink:0;border-radius:16px;border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);background:var(--chip,#fff)}
.range-shell{display:flex;align-items:center;gap:12px}
.range-output{min-width:72px;padding:8px 10px;text-align:center;border-radius:14px;background:rgba(var(--crm-primary-rgb),.10);color:var(--crm-primary);font-size:.82rem;font-weight:700}
.settings-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.settings-preview-tile{min-width:0;padding:16px;border-radius:18px;background:rgba(19,36,61,.04);border:1px solid rgba(var(--crm-line-rgb,217,228,239),.66)}
.settings-preview-tile strong{display:block;margin-bottom:6px}
.settings-preview-tile small{display:block;overflow-wrap:anywhere;word-break:break-word}
.upload-preview{display:flex;align-items:center;gap:12px;margin-top:10px}
.upload-preview img{max-height:70px;padding:10px;border-radius:18px;background:rgba(19,36,61,.04);border:1px solid rgba(var(--crm-line-rgb,217,228,239),.66)}
.upload-preview img.favicon-preview{max-height:44px}

/* =========================================================
   SaaS Admin Surfaces
   ========================================================= */
.saas-shell .settings-hero p{max-width: 100%;
    line-height: 1.5;}
.saas-flash{border-color:rgba(var(--crm-primary-rgb),.16)}
.saas-flash-success{box-shadow:0 12px 26px rgba(15,111,255,.08)}
.saas-flash-error{border-color:rgba(209,67,67,.16);box-shadow:0 12px 26px rgba(209,67,67,.08)}
.saas-cell-title{font-weight:700;color:var(--crm-text)}
.saas-inline-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.saas-inline-list span{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.72);
  background:rgba(var(--crm-primary-rgb),.08);
  color:var(--crm-text);
  font-size:.76rem;
  font-weight:700;
}
.saas-log-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.saas-log-card p{margin-bottom:0}

@media (max-width:960px){
  .settings-section{grid-column:span 12}
  .settings-preview-grid{grid-template-columns:1fr}
}

@media (max-width:760px){
  .custom-fields-grid,
  .crm-custom-fields-display-grid,
  .settings-grid,
  .saas-log-grid,
  .summary{grid-template-columns:1fr}
}

/* =========================================================
   Dashboard Widgets And Analytics Surfaces
   ========================================================= */
.dashboard-shell{
  display:grid;
  gap:22px;
}

.dashboard-hero{
  padding:28px;
  border-radius:30px;
  border:1px solid rgba(255,255,255,.78);
  background:linear-gradient(135deg,#0f172a 0%,#183252 52%,var(--crm-primary) 100%);
  color:#fff;
  box-shadow:0 18px 40px rgba(9,20,36,.16);
}

.dashboard-hero .card-kicker,
.dashboard-hero p{
  color:rgba(255,255,255,.82);
}

.dashboard-hero h2{
  margin:8px 0 12px;
  color:#fff;
  font-size:clamp(1.8rem,3vw,2.45rem);
  letter-spacing:-.04em;
}

.dashboard-hero p{
  max-width:760px;
  line-height:1.7;
}

.dashboard-metrics{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
}

.metric-card{
  padding:22px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.76);
  background:var(--crm-surface);
  box-shadow:0 12px 24px rgba(12,21,35,.06);
}

.metric-label{
  margin-bottom:10px;
  color:var(--crm-muted);
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.metric-value{
  margin-bottom:8px;
  color:var(--crm-text);
  font-size:clamp(1.8rem,3vw,2.5rem);
  font-weight:800;
  letter-spacing:-.05em;
  line-height:1;
}

.metric-footnote{
  font-size:.9rem;
  line-height:1.55;
}

.dashboard-grid{
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:20px;
}

.dashboard-grid > *{
  min-width:0;
}

.span-12{grid-column:span 12}
.span-8{grid-column:span 8}
.span-6{grid-column:span 6}
.span-4{grid-column:span 4}

.card-headline{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.card-kicker{
  display:inline-flex;
  margin-bottom:8px;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.card-headline h3{
  margin:0;
  font-size:1.2rem;
  letter-spacing:-.03em;
}

.chart-card,
.insight-card{
  min-height:100%;
}

.server_time{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:.86rem;
}

.upcoming_jobs{
  display:grid;
  gap:6px;
  padding:16px 18px;
  border-radius:20px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
  background:rgba(255,255,255,.86);
  color:var(--crm-text);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.upcoming_jobs:hover{
  transform:translateY(-1px);
  border-color:rgba(var(--crm-primary-rgb),.22);
  box-shadow:0 14px 28px rgba(12,21,35,.08);
  color:var(--crm-primary);
}

.upcoming_jobs strong{
  color:inherit;
  font-size:1rem;
}

.upcoming_jobs span{
  color:var(--crm-muted);
  font-size:.88rem;
  line-height:1.5;
}

.uploads{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:14px;
}

.uploads li{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:16px;
  border-radius:20px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
  background:rgba(255,255,255,.84);
}

.uploads li > i{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  flex-shrink:0;
  border-radius:14px;
  background:rgba(var(--crm-primary-rgb),.08);
  color:var(--crm-primary);
}

.uploads a{
  color:var(--crm-text);
  font-weight:700;
}

.uploads a:hover{
  color:var(--crm-primary);
}

.memo-card{
  display:grid;
  gap:8px;
  padding:18px;
  margin-bottom:14px;
  border-radius:22px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
  background:rgba(255,255,255,.84);
}

.memo-title{
  color:var(--crm-text);
  font-size:1rem;
  font-weight:700;
}

.memo-note{
  line-height:1.7;
}

.memo-created_by,
.memo-date{
  font-size:.82rem;
  color:var(--crm-muted);
}

.empty-state{
  min-height:200px;
  display:grid;
  place-content:center;
  justify-items:center;
  gap:12px;
  padding:24px;
  text-align:center;
  border-radius:24px;
  border:1px dashed rgba(var(--crm-line-rgb,217,228,239),.92);
  background:rgba(255,255,255,.78);
}

.empty-state i{
  width:56px;
  height:56px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:rgba(var(--crm-primary-rgb),.1);
  color:var(--crm-primary);
  font-size:1.2rem;
}

.empty-state p{
  margin:0;
  max-width:420px;
  line-height:1.65;
}

.empty-state.compact{
  min-height:140px;
}

#dashboardStatusChart,
#subDashboardStatusChart{
  min-height:380px;
}

.apexcharts-canvas,
.apexcharts-svg{
  max-width:100%;
}

.invDash-container{
  min-height:460px;
}

.invDash-card{
  position:relative;
  display:grid;
  gap:18px;
  min-height:460px;
  padding:22px;
}

.invDash-filters{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.invDash-filters select{
  min-width:120px;
  width:30%;
}

.invDash-total{
  font-size:1.1rem;
  font-weight:800;
  color:var(--crm-text);
}

.invDash-chart{
  min-height:320px;
}

.invDash-loader{
  position:absolute;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  border-radius:inherit;
  background:rgba(248,251,255,.7);
}

.invDash-loader-circle{
  width:42px;
  height:42px;
  border-radius:999px;
  border:4px solid rgba(var(--crm-primary-rgb),.16);
  border-top-color:var(--crm-primary);
  animation:crm-spin .8s linear infinite;
}

.map-container{
  overflow:hidden;
  min-height:420px;
  border-radius:24px;
  background:rgba(19,36,61,.06);
}

.map-container #map{
  width:100%;
  min-height:420px;
}

.map-popup{
  max-width:280px;
  position:relative;
  display:grid;
  gap:10px;
  padding:10px 4px 4px;
}

.popup-close{
  position:absolute;
  top:0;
  right:0;
  width:30px;
  height:30px;
  border:0;
  border-radius:10px;
  background:rgba(19,36,61,.06);
  color:var(--crm-text);
}

.map-popup-title{
  padding-right:36px;
  color:var(--crm-text);
  font-weight:800;
}

.map-popup-desc,
.map-popup-status{
  color:var(--crm-muted);
  line-height:1.6;
}

@media (max-width:1180px){
  .span-8,
  .span-6,
  .span-4{
    grid-column:span 12;
  }
}

.sidebar-nav-shell{
  flex:1 1 auto;
  min-height:0;
}

@media (max-width:760px){
  .dashboard-hero,
  .metric-card,
  .invDash-card{
    padding:20px;
  }

  .dashboard-grid,
  .dashboard-metrics{
    gap:16px;
  }

  .card-headline{
    flex-direction:column;
    align-items:flex-start;
  }

  .map-container,
  .map-container #map{
    min-height:320px;
  }
}

/* =========================================================
   Stabilization And Responsive Fixes
   ========================================================= */

body.crm-body .nav-submenu a::before{
  content:none!important;
}

body.crm-body .submenu-line{
  position:relative;
  width:18px;
  height:2px;
  flex-shrink:0;
  border-radius:999px;
  background:rgba(var(--crm-sidebar-hover-rgb),.22);
  overflow:hidden;
}

body.crm-body .submenu-line::after{
  content:"";
  position:absolute;
  inset:0;
  transform:scaleX(.35);
  transform-origin:left center;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--crm-primary),var(--crm-secondary,#14b8a6));
  transition:transform .18s ease;
}

body.crm-body .nav-submenu a:hover .submenu-line::after,
body.crm-body .nav-submenu li.mm-active .submenu-line::after{
  transform:scaleX(1);
}

body.crm-body .header,
body.crm-body .main,
body.crm-body .wrap{
  width:auto;
  max-width:min(var(--crm-content-max), calc(100vw - var(--crm-sidebar-width) - 52px));
}

body.crm-body .header-content{
  max-width:100%;
}

body.crm-body .table-responsive{
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}

body.crm-body .table-responsive .table{
  min-width:720px;
}

body.crm-body .dataTables_wrapper{
  overflow-x:auto;
}

body.crm-body .dataTables_wrapper .dataTables_filter input{
  width:min(280px,100%);
}

body.crm-body .attachment-uploader{
  display:grid;
  gap:16px;
  padding:18px;
  border-radius:24px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.82);
  background:rgba(255,255,255,.78);
}

body.crm-body .attachment-uploader-copy strong{
  display:block;
  margin-bottom:6px;
  font-size:1rem;
  color:var(--crm-text);
}

body.crm-body .attachment-dropzone,
body.crm-body .dropzone{
  min-height:180px;
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:14px;
  padding:18px;
  border:1.5px dashed rgba(var(--crm-primary-rgb),.26);
  border-radius:22px;
  background:
    linear-gradient(180deg,rgba(var(--crm-primary-rgb),.05),rgba(255,255,255,.94));
}

body.crm-body .dropzone .dz-message{
  width:100%;
  margin:0;
  padding:28px 18px;
  text-align:center;
  color:var(--crm-muted);
  font-weight:600;
}

body.crm-body .dropzone .dz-message::before{
  content:"\f0ee";
  display:grid;
  place-items:center;
  width:56px;
  height:56px;
  margin:0 auto 14px;
  border-radius:18px;
  background:rgba(var(--crm-primary-rgb),.10);
  color:var(--crm-primary);
  font-family:"Font Awesome 6 Free";
  font-size:1.15rem;
  font-weight:900;
}

body.crm-body .dropzone .dz-preview{
  position:relative;
  width:140px;
  margin:0;
  overflow:hidden;
  border-radius:20px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.72);
  background:#fff;
  box-shadow:0 14px 28px rgba(19,36,61,.08);
}

body.crm-body .dropzone .dz-preview .dz-image{
  width:100%;
  height:104px;
  overflow:hidden;
  background:rgba(19,36,61,.04);
}

body.crm-body .dropzone .dz-preview .dz-image img{
  width:100%;
  height:100%;
  object-fit:cover;
}

body.crm-body .dropzone .dz-preview .dz-details{
  padding:12px;
}

body.crm-body .dropzone .dz-preview .dz-filename,
body.crm-body .dropzone .dz-preview .dz-size{
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--crm-text);
}

body.crm-body .dropzone .dz-remove{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0 12px 12px;
  min-height:34px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(239,68,68,.12);
  color:#ef4444;
  font-size:.78rem;
  font-weight:700;
  text-decoration:none;
}

body.crm-body .dropzone .dz-success-mark,
body.crm-body .dropzone .dz-error-mark,
body.crm-body .dropzone .dz-progress{
  display:none!important;
}

body.crm-body input[type="checkbox"],
body.crm-body input[type="radio"]{
  width:18px;
  height:18px;
  min-height:18px;
  margin:0;
  padding:0;
  flex:0 0 18px;
  accent-color:var(--crm-primary);
  box-shadow:none!important;
}

body.crm-body .people,
body.crm-body .custom-field-choice-group,
body.crm-body .crm-choice-set{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

body.crm-body label.person,
body.crm-body .custom-field-choice,
body.crm-body .crm-choice{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:12px 14px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.82);
  border-radius:16px;
  background:rgba(255,255,255,.86);
  color:var(--crm-text);
  font-weight:600;
  cursor:pointer;
}

body.crm-body label.person:hover,
body.crm-body .custom-field-choice:hover,
body.crm-body .crm-choice:hover{
  border-color:rgba(var(--crm-primary-rgb),.22);
  box-shadow:0 12px 22px rgba(12,21,35,.05);
}

body.crm-body label.person input:checked + span,
body.crm-body .crm-choice input:checked + span{
  color:var(--crm-primary);
}

/* =========================================================
   Job Detail Gallery And Activity
   ========================================================= */
body.crm-body .crm-detail-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 22px;
}

body.crm-body .crm-detail-tab{
  min-height:46px;
  padding:0 16px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.82);
  border-radius:16px;
  background:rgba(255,255,255,.84);
  color:var(--crm-text);
  font-weight:700;
}

body.crm-body .crm-detail-tab.is-active{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg,var(--crm-primary),var(--crm-secondary,#14b8a6));
  box-shadow:0 16px 30px rgba(var(--crm-primary-rgb),.24);
}

body.crm-body .crm-detail-panel[hidden]{
  display:none!important;
}

body.crm-body .job-media-groups{
  display:grid;
  gap:18px;
}

body.crm-body .job-media-group{
  display:grid;
  gap:12px;
}

body.crm-body .job-media-group h3{
  margin:0;
  font-size:1rem;
}

body.crm-body .job-media-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:14px;
}

body.crm-body .job-media-card{
  display:grid;
  gap:10px;
  min-height:100%;
  padding:14px;
  border-radius:20px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.82);
  background:rgba(255,255,255,.84);
  color:var(--crm-text);
  text-decoration:none;
  box-shadow:0 12px 22px rgba(12,21,35,.05);
}

body.crm-body .job-media-card:hover{
  color:var(--crm-primary);
  border-color:rgba(var(--crm-primary-rgb),.2);
  box-shadow:0 18px 30px rgba(12,21,35,.08);
}

body.crm-body .job-media-thumb{
  display:block;
  width:100%;
  aspect-ratio:4 / 3;
  overflow:hidden;
  border-radius:16px;
  background:rgba(19,36,61,.06);
}

body.crm-body .job-media-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

body.crm-body .job-media-icon{
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:rgba(var(--crm-primary-rgb),.1);
  color:var(--crm-primary);
  font-size:1.35rem;
}

body.crm-body .job-media-name{
  display:block;
  font-weight:700;
  line-height:1.45;
  word-break:break-word;
}

body.crm-body .job-media-meta,
body.crm-body .crm-lightbox-meta,
body.crm-body .job-activity-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  color:var(--crm-muted);
  font-size:.82rem;
}

body.crm-body .job-media-meta span,
body.crm-body .crm-lightbox-meta span,
body.crm-body .job-activity-meta span{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

body.crm-body .crm-lightbox-caption{
  display:grid;
  gap:10px;
}

body.crm-body .crm-lightbox-caption strong{
  display:block;
  font-size:1rem;
  color:#fff;
}

body.crm-body .job-activity-timeline{
  display:grid;
  gap:14px;
}

body.crm-body .job-activity-item{
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  gap:14px;
  padding:18px;
  border-radius:22px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.82);
  background:rgba(255,255,255,.86);
}

body.crm-body .job-activity-icon{
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:rgba(var(--crm-primary-rgb),.1);
  color:var(--crm-primary);
}

body.crm-body .job-activity-content{
  display:grid;
  gap:10px;
}

body.crm-body .job-activity-head{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}

body.crm-body .job-activity-head strong{
  color:var(--crm-text);
}

body.crm-body .job-activity-head span{
  color:var(--crm-muted);
  font-size:.82rem;
  text-transform:capitalize;
}

body.crm-body .job-activity-content p{
  margin:0;
  color:var(--crm-text);
  line-height:1.65;
}

/* =========================================================
   Header Notification Menus
   ========================================================= */
body.crm-body .notification-menu-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 10px 14px;
  border-bottom:1px solid rgba(var(--crm-line-rgb,217,228,239),.7);
  margin-bottom:10px;
}

body.crm-body .notification-menu-head strong{
  color:var(--crm-text);
}

body.crm-body .notification-message-item{
  align-items:flex-start;
  white-space:normal;
}

body.crm-body .notification-message-copy{
  display:grid;
  gap:4px;
}

body.crm-body .notification-message-copy strong,
body.crm-body .notification-message-copy span,
body.crm-body .notification-message-copy small{
  white-space:normal;
}

body.crm-body .notification-message-copy small,
body.crm-body .notification-message-copy span{
  color:var(--crm-muted);
}

/* =========================================================
   Messaging Workspace
   ========================================================= */
body.crm-body .crm-message-shell{
  display:grid;
  grid-template-columns:minmax(290px,360px) minmax(0,1fr) minmax(280px,340px);
  gap:20px;
}

body.crm-body .crm-message-sidebar,
body.crm-body .crm-message-main,
body.crm-body .crm-message-compose-panel{
  display:flex;
  flex-direction:column;
  gap:18px;
}

body.crm-body .crm-message-workspace .card{
  min-height:0;
}

body.crm-body .crm-message-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

body.crm-body .crm-message-panel-head h3{
  margin:4px 0 0;
}

body.crm-body .crm-message-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(var(--crm-primary-rgb),.08);
  color:var(--crm-primary);
  font-size:.82rem;
  font-weight:700;
}

body.crm-body .crm-message-search{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:50px;
  padding:0 14px;
  border-radius:18px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.78);
  background:#fff;
  box-shadow:0 14px 28px rgba(9,20,36,.05);
}

body.crm-body .crm-message-search input{
  width:100%;
  border:0!important;
  outline:none!important;
  background:transparent!important;
  box-shadow:none!important;
}

body.crm-body .crm-message-thread-groups{
  display:grid;
  gap:18px;
  min-height:0;
}

body.crm-body .crm-message-group{
  display:grid;
  gap:12px;
}

body.crm-body .crm-message-group-label{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--crm-muted);
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}

body.crm-body .crm-message-thread-list{
  display:grid;
  gap:12px;
  min-height:0;
}

body.crm-body .crm-message-thread-card{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
}

body.crm-body .crm-message-thread{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border-radius:22px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.74);
  background:rgba(255,255,255,.92);
  color:var(--crm-text);
  box-shadow:0 12px 22px rgba(12,21,35,.04);
  text-decoration:none;
  min-width:0;
}

body.crm-body .crm-message-thread:hover,
body.crm-body .crm-message-thread.is-active{
  color:var(--crm-text);
  border-color:rgba(var(--crm-primary-rgb),.22);
  box-shadow:0 16px 28px rgba(12,21,35,.07);
}

body.crm-body .crm-message-thread.is-unread{
  background:rgba(var(--crm-primary-rgb),.08);
}

body.crm-body .crm-message-thread-avatar,
body.crm-body .crm-message-bubble-avatar,
body.crm-body .crm-message-chat-avatar,
body.crm-body .crm-message-participant-avatar{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  overflow:hidden;
  border-radius:999px;
  background:linear-gradient(135deg,rgba(var(--crm-primary-rgb),.92),rgba(var(--crm-secondary-rgb,20,184,166),.82));
  color:#fff;
  font-weight:700;
  line-height:1;
  text-align:center;
  padding:0;
  box-shadow:0 10px 22px rgba(15,111,255,.18);
}

body.crm-body .crm-message-thread-avatar{width:52px;height:52px;font-size:1rem;line-height: 52px;}
body.crm-body .crm-message-bubble-avatar{width:38px;height:38px;font-size:.88rem;margin-top:8px}
body.crm-body .crm-message-chat-avatar{width:50px;height:50px;font-size:1rem}
body.crm-body .crm-message-participant-avatar{width:38px;height:38px;font-size:.85rem;line-height: 38px;}

body.crm-body .crm-message-thread-avatar img,
body.crm-body .crm-message-bubble-avatar img,
body.crm-body .crm-message-chat-avatar img,
body.crm-body .crm-message-participant-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

body.crm-body .crm-message-thread-copy{
  display:grid;
  gap:4px;
  min-width:0;
}

body.crm-body .crm-message-thread-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
}

body.crm-body .crm-message-thread-head strong{
  min-width:0;
}

body.crm-body .crm-message-thread-time{
  justify-self:end;
  white-space:nowrap;
  font-size:.76rem;
}

body.crm-body .crm-message-thread strong{
  color:var(--crm-text);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

body.crm-body .crm-message-thread span,
body.crm-body .crm-message-thread small,
body.crm-body .crm-message-thread time{
  color:var(--crm-muted);
}

body.crm-body .crm-message-thread span,
body.crm-body .crm-message-thread small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body.crm-body .crm-message-thread-meta{
  display:grid;
  justify-items:end;
  gap:8px;
  min-width:max-content;
}

body.crm-body .crm-message-pin-indicator{
  color:var(--crm-primary);
  font-size:.8rem;
}

body.crm-body .crm-message-pin-form{
  margin:0;
}

body.crm-body .crm-message-thread-pin-form{
  position:static;
  align-self:center;
}

body.crm-body .crm-message-toolbar-form{
  position:static;
}

body.crm-body .crm-message-pin-button,
body.crm-body .crm-message-toolbar-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:38px;
  padding:0 12px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.82);
  border-radius:14px;
  background:#fff;
  color:var(--crm-muted);
  transition:all .18s ease;
}

body.crm-body .crm-message-pin-button{
  width:38px;
  min-width:38px;
  padding:0;
}

body.crm-body .crm-message-pin-button:hover,
body.crm-body .crm-message-pin-button.is-pinned,
body.crm-body .crm-message-toolbar-btn:hover,
body.crm-body .crm-message-toolbar-btn.is-active{
  color:var(--crm-primary);
  border-color:rgba(var(--crm-primary-rgb),.26);
  background:rgba(var(--crm-primary-rgb),.08);
}

body.crm-body .crm-message-chat-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}

body.crm-body .crm-message-chat-title-row{
  display:flex;
  align-items:center;
  gap:14px;
}

body.crm-body .crm-message-chat-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

body.crm-body .crm-message-log{
  display:flex;
  flex-direction:column;
  gap:18px;
  min-height:420px;
  max-height:70vh;
  overflow:auto;
  padding:10px 4px 6px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.86),rgba(247,250,255,.9)),
    radial-gradient(circle at top left,rgba(var(--crm-primary-rgb),.08),transparent 46%);
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.66);
  border-radius:24px;
}

body.crm-body .crm-message-row{
  display:flex;
  align-items:flex-end;
  gap:12px;
}

body.crm-body .crm-message-row.is-self{
  justify-content:flex-end;
}

body.crm-body .crm-message-bubble{
  display:grid;
  gap:8px;
  align-self:flex-start;
  max-width:min(720px,92%);
  padding:16px;
  border-radius:20px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.76);
  background:rgba(255,255,255,.86);
}

body.crm-body .crm-message-bubble.is-self{
  align-self:flex-end;
  background:#6e6e6e;
  border-color:transparent;
}

body.crm-body .crm-message-bubble.is-self,
body.crm-body .crm-message-bubble.is-self *{
  color:#fff;
}

body.crm-body .crm-message-bubble-head{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

body.crm-body .crm-message-bubble-head span,
body.crm-body .crm-message-bubble time{
  font-size:.8rem;
  color:var(--crm-muted);
}

body.crm-body .crm-message-bubble.is-self time{
  color:rgba(255,255,255,.78);
}

body.crm-body .crm-message-bubble-body{
  line-height:1.7;
  word-break:break-word;
}

body.crm-body .crm-message-compose-form{
  display:grid;
  gap:16px;
}

body.crm-body .crm-message-detail-list{
  display:grid;
  gap:14px;
}

body.crm-body .crm-message-detail-card{
  display:grid;
  gap:14px;
  padding:16px;
  border-radius:20px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.74);
  background:rgba(255,255,255,.9);
}

body.crm-body .crm-message-participant-list{
  display:grid;
  gap:10px;
}

body.crm-body .crm-message-participant-chip{
  display:flex;
  align-items:center;
  gap:12px;
}

body.crm-body .crm-message-participant-chip span{
  display:block;
  font-weight:600;
  color:var(--crm-text);
}

body.crm-body .crm-message-participant-chip small{
  color:var(--crm-muted);
}

body.crm-body .crm-message-context-link{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:48px;
  padding:0 16px;
  border-radius:18px;
  background:rgba(var(--crm-primary-rgb),.08);
  color:var(--crm-primary);
  text-decoration:none;
}

@media (max-width:1180px){
  body.crm-body .crm-message-shell{
    grid-template-columns:1fr;
  }
}

body.crm-body.sidebar-menu-style-clean .menu-cluster,
body.crm-body.sidebar-menu-style-rail .menu-cluster{
  padding:0;
  background:transparent;
  border:0;
}

body.crm-body.sidebar-menu-style-clean .menu-cluster-list,
body.crm-body.sidebar-menu-style-rail .menu-cluster-list{
  margin-top:10px;
}

body.crm-body.sidebar-menu-style-clean .menu-section,
body.crm-body.sidebar-menu-style-rail .menu-section{
  padding:0 12px;
}

body.crm-body.sidebar-menu-style-clean .menu-entity>a,
body.crm-body.sidebar-menu-style-rail .menu-entity>a,
body.crm-body.sidebar-menu-style-clean .nav-submenu a,
body.crm-body.sidebar-menu-style-rail .nav-submenu a{
  background:transparent;
  box-shadow:none;
}

body.crm-body.sidebar-menu-style-clean .menu-copy small,
body.crm-body.sidebar-menu-style-rail .menu-copy small{
  display:none;
}

body.crm-body.sidebar-menu-style-rail .sidebar-panel{
  padding-left:14px;
  padding-right:14px;
}

body.crm-body.sidebar-menu-style-rail .menu-icon{
  width:34px;
  height:34px;
  border-radius:12px;
}

body.crm-body.sidebar-menu-style-rail .menu-title{
  font-size:.91rem;
}

body.crm-body.sidebar-style-light .sidebar-footer strong,
body.crm-body.sidebar-style-light .brand{
  color:var(--crm-text);
}

body.crm-body.sidebar-style-light .sidebar-footer,
body.crm-body.sidebar-style-light .brand-copy small{
  color:var(--crm-muted);
}

body.crm-body.sidebar-style-light .brand-copy strong{
  color:var(--crm-brand-title-color,var(--crm-text));
}

body.crm-body.sidebar-style-light .brand-copy small{
  color:var(--crm-brand-tagline-color,var(--crm-muted));
}

@media (max-width:1180px){
  body.crm-body .sidebar{
    width:min(348px, calc(100vw - 20px));
    inset:10px auto 10px 10px;
    transform:translateX(calc(-100% - 24px));
  }

  body.crm-body .sidebar.open{
    transform:translateX(0);
  }

  body.crm-body .sidebar-panel{
    height:calc(100vh - 20px);
    border-radius:28px;
  }

  body.crm-body .sidebar-top{
    position:relative;
    top:auto;
    padding-bottom:0;
    background:transparent!important;
  }

  body.crm-body .sidebar-mobile-close{
    display:inline-grid;
    place-items:center;
    color:#000;
  }

  body.crm-body .header,
  body.crm-body .main,
  body.crm-body .wrap{
    max-width:none;
    width:auto;
    margin-left:0!important;
    padding-left:18px;
    padding-right:18px;
  }

  body.crm-body .header{
    padding-top:14px;
  }
}

@media (max-width:760px){
  body.crm-body .header-left,
  body.crm-body .header-right{
    align-items:flex-start;
  }
  
  
  .header-right{justify-content: left;}

  body.crm-body .header-content{
    gap:12px;
  }

  body.crm-body .sidebar{
    width:min(92vw, 340px);
  }

  body.crm-body .table-responsive .table{
    min-width:620px;
  }

  body.crm-body .main,
  body.crm-body .wrap{
    padding-left:14px;
    padding-right:14px;
  }

  body.crm-body.role-subcontractor .header-right .quick-search-btn,
  body.crm-body.role-subcontractor .header-right .header-pill{
    display:none!important;
  }

  body.crm-body.role-subcontractor .header{
    padding-bottom:0;
    margin-bottom:0;
  }

  body.crm-body.role-subcontractor .main,
  body.crm-body.role-subcontractor .wrap{
    padding-bottom:calc(132px + env(safe-area-inset-bottom, 0px));
    margin-top:8px;
  }

  body.crm-body.role-subcontractor .header-content{
    border-radius:22px;
    padding:10px 12px 8px;
    gap:6px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
  }

  body.crm-body.role-subcontractor .page-intro h1{
    font-size:1.24rem;
    line-height:1.2;
  }

  body.crm-body.role-subcontractor .page-eyebrow{
    font-size:.72rem;
  }

  body.crm-body.role-subcontractor .main > .card,
  body.crm-body.role-subcontractor .wrap > .card,
  body.crm-body.role-subcontractor .main .card,
  body.crm-body.role-subcontractor .wrap .card,
  body.crm-body.role-subcontractor .main .sub-card,
  body.crm-body.role-subcontractor .wrap .sub-card{
    border-radius:20px;
    padding:14px;
  }

  body.crm-body.role-subcontractor .full.actions{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    margin-bottom:10px;
  }

  body.crm-body.role-subcontractor .full.actions > div{
    width:100%;
    display:grid;
    gap:10px;
  }

  body.crm-body.role-subcontractor .full.actions .btn{
    width:100%;
  }

  body.crm-body.role-subcontractor .filter-dropdown{
    width:100%;
  }

  body.crm-body.role-subcontractor .filter-dropdown > .btn{
    width:100%;
  }

  body.crm-body.role-subcontractor .filter-panel{
    position:fixed!important;
    left:12px!important;
    right:12px!important;
    top:74px!important;
    width:auto!important;
    max-height:calc(100vh - 160px)!important;
    border-radius:20px!important;
    z-index:1200!important;
  }

  body.crm-body.role-subcontractor .filter-panel #customRange,
  body.crm-body.role-subcontractor .filter-panel [style*="display: flex;gap: 41px;"]{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }

  body.crm-body.role-subcontractor .table-responsive{
    border-radius:16px;
  }

  body.crm-body.role-subcontractor .table-responsive .table{
    min-width:520px;
  }

  body.crm-body.role-subcontractor .dataTables_wrapper .dt-buttons{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    width:100%;
    margin-bottom:10px;
  }

  body.crm-body.role-subcontractor .dataTables_wrapper .dt-buttons .btn{
    width:100%;
  }

  body.crm-body.role-subcontractor .form-grid{
    grid-template-columns:1fr;
  }

  body.crm-body.role-subcontractor .crm-message-shell{
    grid-template-columns:1fr!important;
    gap:12px!important;
  }

  body.crm-body.role-subcontractor .crm-message-sidebar .card,
  body.crm-body.role-subcontractor .crm-message-main .card,
  body.crm-body.role-subcontractor .crm-message-compose-panel .card{
    padding:12px;
    border-radius:18px;
  }

  body.crm-body.role-subcontractor .crm-message-log{
    max-height:52vh;
    border-radius:18px;
    padding:10px 8px;
  }

  body.crm-body.role-subcontractor .dashboard-hero{
    padding:14px;
    border-radius:18px;
  }

  body.crm-body.role-subcontractor .dashboard-metrics{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  body.crm-body.role-subcontractor .metric-card{
    border-radius:16px;
    padding:12px;
  }

  body.crm-body.role-subcontractor .dashboard-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:12px;
  }

  body.crm-body.role-subcontractor .dashboard-grid [class*="span-"]{
    grid-column:auto!important;
  }

  body.crm-body.role-subcontractor .header-left{
    width:auto;
    min-width:0;
    justify-content:flex-start;
    align-items:flex-start;
    grid-column:1;
    grid-row:1;
  }

  body.crm-body.role-subcontractor #menuToggle{
    display:none!important;
  }

  body.crm-body.role-subcontractor .header-right{
    width:auto;
    margin-left:0;
    gap:6px;
    justify-content:flex-end;
    align-items:flex-start!important;
    flex-wrap:nowrap;
    grid-column:2;
    grid-row:1;
  }

  body.crm-body.role-subcontractor .header-left .page-intro,
  body.crm-body.role-tech .header-left .page-intro{
    max-width:58vw;
    overflow:hidden;
  }

  body.crm-body.role-subcontractor .header-left .page-intro h1,
  body.crm-body.role-tech .header-left .page-intro h1{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:100%;
    font-size:1.14rem!important;
  }

  body.crm-body.role-subcontractor .header-right .notification_dropdown,
  body.crm-body.role-tech .header-right .notification_dropdown{
    display:block!important;
    flex:0 0 auto;
  }

  body.crm-body.role-subcontractor .header-right .notification_dropdown .icon-button,
  body.crm-body.role-tech .header-right .notification_dropdown .icon-button{
    width:44px;
    min-width:44px;
    min-height:44px;
  }

  body.crm-body.role-subcontractor .page-intro{
    min-width:0;
  }

  body.crm-body.role-subcontractor .page-intro h1{
    margin:2px 0 0!important;
  }

  body.crm-body.role-subcontractor .header-right .icon-button{
    width:44px;
    min-height:44px;
  }

  body.crm-body.role-subcontractor .header-profile{
    display:none!important;
  }

  body.crm-body.role-subcontractor .notification_dropdown .dropdown-menu{
    width:min(94vw, 420px)!important;
    right:0!important;
    left:auto!important;
    max-height:58vh!important;
  }

  body.crm-body .header .notification_dropdown .dropdown-menu.notification-menu{
    position:fixed!important;
    top:70px!important;
    left:50%!important;
    right:auto!important;
    inset:auto!important;
    transform:translateX(-50%)!important;
    margin:0!important;
    width:min(88vw, 340px)!important;
    max-width:340px!important;
    max-height:60vh!important;
    overflow:auto!important;
    border-radius:16px!important;
    padding:8px!important;
    z-index:1300!important;
    left: 50% !important;
  }

  body.crm-body .header .notification_dropdown .dropdown-menu.notification-menu.show{
    display:block!important;
  }
}

/* =========================================================
   Subcontractor Mobile App Shell
   ========================================================= */
.crm-sub-mobile-nav{
  display:none;
}

.crm-sub-mobile-menu-sheet{
  display:none;
}

.crm-sub-mobile-quicklinks{
  display:none;
}

@media (max-width:760px){
  body.crm-body.role-subcontractor .crm-sub-mobile-quicklinks{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin:10px 14px 0;
  }

  body.crm-body.role-subcontractor .crm-sub-mobile-quicklinks a{
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:0 10px;
    border-radius:14px;
    border:1px solid rgba(var(--crm-line-rgb,217,228,239),.9);
    background:#fff;
    color:var(--crm-text);
    font-size:.78rem;
    font-weight:700;
    text-decoration:none;
  }

  body.crm-body.role-subcontractor .crm-sub-mobile-nav{
    position:fixed;
    left:50%;
    bottom:12px;
    transform:translateX(-50%);
    width:min(420px, calc(100vw - 20px));
    min-height:64px;
    z-index:1150;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
    padding:8px;
    border-radius:24px;
    border:1px solid rgba(var(--crm-line-rgb,217,228,239),.9);
    background:#0b1220;
    box-shadow:0 14px 32px rgba(4,10,21,.34);
  }

  body.crm-body.role-subcontractor .crm-sub-mobile-tab{
    min-height:48px;
    display:grid;
    place-items:center;
    gap:4px;
    border:0;
    border-radius:16px;
    background:transparent;
    color:rgba(236,242,255,.82);
    text-decoration:none;
    font-size:.72rem;
    font-weight:600;
  }

  body.crm-body.role-subcontractor .crm-sub-mobile-tab i{
    font-size:1rem;
  }

  body.crm-body.role-subcontractor .crm-sub-mobile-tab.is-active,
  body.crm-body.role-subcontractor .crm-sub-mobile-tab:hover{
    color:#fff;
    background:rgba(var(--crm-primary-rgb),.3);
  }

  body.crm-body.role-subcontractor .crm-sub-mobile-menu-sheet{
    position:fixed;
    inset:0;
    z-index:1160;
    padding:14px;
    background:rgba(3,8,18,.88);
  }

  body.crm-body.role-subcontractor .crm-sub-mobile-menu-sheet.is-open{
    display:block;
  }

  body.crm-body.role-subcontractor .crm-sub-mobile-menu-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:12px;
    padding:14px;
    border-radius:18px;
    background:#fff;
    border:1px solid rgba(var(--crm-line-rgb,217,228,239),.88);
  }

  body.crm-body.role-subcontractor .crm-sub-mobile-menu-head button{
    width:36px;
    height:36px;
    border:0;
    border-radius:12px;
    background:rgba(var(--crm-primary-rgb),.1);
    color:var(--crm-text);
  }

  body.crm-body.role-subcontractor .crm-sub-mobile-menu-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    max-height:calc(100vh - 140px);
    padding:2px;
    overflow:auto;
  }

  body.crm-body.role-subcontractor .crm-sub-mobile-menu-card{
    min-height:72px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:10px;
    border-radius:18px;
    text-align:center;
    font-weight:700;
    color:var(--crm-text);
    border:1px solid rgba(var(--crm-line-rgb,217,228,239),.88);
    background:#fff;
    text-decoration:none;
  }

  body.crm-body.role-subcontractor .toast-top-center{
    top:12px!important;
    transform:translateX(-50%)!important;
    z-index:1300!important;
  }
}

/* =========================================================
   Search Modal
   ========================================================= */
body.crm-body #searchModal{
  display:none;
  align-items:center;
  justify-content:center;
  padding:28px;
  background:rgba(7,16,28,.54);
}

body.crm-body #searchModal .crm-search-modal{
  width:min(1180px, calc(100vw - 36px));
  min-height:min(720px, calc(100vh - 56px));
  max-height:calc(100vh - 56px);
  margin:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:32px;
  border:1px solid rgba(255,255,255,.78);
  background:#f8fbff;
  box-shadow:0 24px 64px rgba(7,18,32,.2);
}

body.crm-body #searchModal .crm-search-header{
  display:flex;
  align-items:center;
  gap:16px;
  padding:22px;
  border-bottom:1px solid rgba(var(--crm-line-rgb,217,228,239),.88);
  background:rgba(255,255,255,.72);
}

body.crm-body #searchModal .crm-search-input-shell{
  flex:1;
  min-height:60px;
  display:flex;
  align-items:center;
  gap:14px;
  padding:0 20px;
  border-radius:22px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.92);
  background:rgba(255,255,255,.94);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}

body.crm-body #searchModal .crm-search-input-shell i{
  color:var(--crm-primary);
  font-size:1rem;
}

body.crm-body #searchModal .crm-search-input-shell input{
  width:100%;
  min-height:auto;
  padding:0;
  margin:0;
  border:0;
  background:transparent;
  box-shadow:none;
  font-size:1rem;
}

body.crm-body #searchModal .crm-search-input-shell input:focus{
  box-shadow:none;
  transform:none;
}

body.crm-body #searchModal .crm-search-close{
  width:52px;
  min-width:52px;
  height:52px;
  border:0;
  border-radius:18px;
  background:rgba(var(--crm-primary-rgb),.08);
  color:var(--crm-text);
}

body.crm-body #searchModal .crm-search-body{
  display:grid;
  grid-template-columns:minmax(248px, 280px) minmax(0,1fr);
  min-height:0;
  flex:1;
}

body.crm-body #searchModal .crm-search-sidebar{
  padding:20px 18px;
  border-right:1px solid rgba(var(--crm-line-rgb,217,228,239),.86);
  background:#f4f8fc;
  overflow:auto;
}

body.crm-body #searchModal .crm-search-sidebar-head{
  margin-bottom:16px;
  padding:0 4px;
}

body.crm-body #searchModal .crm-search-sidebar-head p{
  margin:0 0 4px;
  color:var(--crm-text);
  font-size:.96rem;
  font-weight:800;
  letter-spacing:-.02em;
}

body.crm-body #searchModal .crm-search-sidebar-head span{
  color:var(--crm-muted);
  font-size:.84rem;
  line-height:1.55;
}

body.crm-body #searchModal .crm-search-module-list{
  display:grid;
  gap:10px;
}

body.crm-body #searchModal .crm-search-module{
  width:100%;
  padding:13px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:0;
  border-radius:20px;
  background:transparent;
  color:var(--crm-text);
  text-align:left;
  cursor:pointer;
  transition:background .18s ease, box-shadow .18s ease, transform .18s ease;
}

body.crm-body #searchModal .crm-search-module:hover,
body.crm-body #searchModal .crm-search-module.active{
  background:rgba(var(--crm-primary-rgb),.1);
  box-shadow:inset 0 0 0 1px rgba(var(--crm-primary-rgb),.12);
  transform:translateX(3px);
}

body.crm-body #searchModal .crm-search-module-main{
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
}

body.crm-body #searchModal .crm-search-module i{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  flex-shrink:0;
  border-radius:15px;
  background:rgba(var(--crm-primary-rgb),.1);
  color:var(--crm-primary);
}

body.crm-body #searchModal .crm-search-module.active i{
  background:linear-gradient(135deg, var(--crm-primary), var(--crm-secondary,#14b8a6));
  color:#fff;
}

body.crm-body #searchModal .crm-search-module-label{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.95rem;
  font-weight:700;
}

body.crm-body #searchModal .crm-search-module-count{
  min-width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(var(--crm-primary-rgb),.12);
  color:var(--crm-primary);
  font-size:.76rem;
  font-weight:700;
}

body.crm-body #searchModal .crm-search-stage{
  min-height:0;
  padding:24px;
  display:flex;
  flex-direction:column;
  gap:14px;
  overflow:auto;
  background:#f8fbff;
}

body.crm-body #searchModal .crm-search-stage > a{
  color:inherit;
  text-decoration:none;
}

body.crm-body #searchModal .crm-search-welcome,
body.crm-body #searchModal .crm-search-state,
body.crm-body #searchModal .empty-state{
  min-height:220px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  padding:26px;
  border-radius:26px;
  border:1px dashed rgba(var(--crm-line-rgb,217,228,239),.92);
  background:#fff;
  color:var(--crm-text);
}

body.crm-body #searchModal .crm-search-state.is-loading{
  justify-content:flex-start;
}

body.crm-body #searchModal .crm-search-state-icon,
body.crm-body #searchModal .empty-state i{
  width:60px;
  height:60px;
  display:grid;
  place-items:center;
  flex-shrink:0;
  border-radius:20px;
  background:rgba(var(--crm-primary-rgb),.12);
  color:var(--crm-primary);
  font-size:1.3rem;
}

body.crm-body #searchModal .crm-search-state-copy{
  display:grid;
  gap:8px;
}

body.crm-body #searchModal .crm-search-state-copy h3{
  margin:0;
  color:var(--crm-text);
  font-size:1.15rem;
  font-weight:800;
  letter-spacing:-.03em;
}

body.crm-body #searchModal .crm-search-state-copy p,
body.crm-body #searchModal .empty-state p{
  margin:0;
  max-width:460px;
  color:var(--crm-muted);
  line-height:1.65;
}

body.crm-body #searchModal .crm-search-state-copy small{
  color:var(--crm-muted);
  font-size:.88rem;
  line-height:1.65;
}

body.crm-body #searchModal .empty-state.compact{
  min-height:180px;
}

body.crm-body #searchModal .spinner{
  margin:0;
  flex-shrink:0;
}

body.crm-body #searchModal .modal-card{
  display:block;
  margin:0 0 14px;
  padding:18px 20px;
  border-radius:22px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.88);
  background:rgba(255,255,255,.92);
  box-shadow:0 10px 22px rgba(12,21,35,.05);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

body.crm-body #searchModal a:hover .modal-card,
body.crm-body #searchModal .modal-card:hover{
  transform:translateY(-1px);
  border-color:rgba(var(--crm-primary-rgb),.22);
  box-shadow:0 14px 26px rgba(12,21,35,.07);
}

body.crm-body #searchModal .modal-title{
  margin:0 0 8px;
  font-size:1rem;
  font-weight:800;
  color:var(--crm-text);
}

body.crm-body #searchModal .modal-text p{
  color:var(--crm-muted);
  line-height:1.6;
}

body.crm-body #searchModal .modal-date{
  margin-top:10px;
  color:var(--crm-muted);
  font-size:.82rem;
}

/* =========================================================
   Legacy Single-View Shell
   ========================================================= */
body.crm-body .crm-legacy-shell{
  position:relative;
  width:auto;
  max-width:var(--crm-content-max);
  margin:0 auto;
  margin-left:calc(var(--crm-sidebar-width) + 36px);
  padding:24px 24px 36px 8px;
}

body.crm-body .crm-legacy-shell > .row{
  margin-left:0;
  margin-right:0;
}

body.crm-body .crm-legacy-shell > .row > [class*="col-"]{
  padding-left:0;
  padding-right:0;
}

body.crm-body .crm-legacy-shell .back{
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin:0 0 18px;
  padding:12px 16px;
  border-radius:16px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
  background:rgba(255,255,255,.82);
  color:var(--crm-text);
  text-decoration:none;
  font-weight:700;
  box-shadow:0 12px 24px rgba(12,21,35,.05);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
}

body.crm-body .crm-legacy-shell .back:hover{
  color:var(--crm-primary);
  transform:translateX(-2px);
  border-color:rgba(var(--crm-primary-rgb),.24);
  box-shadow:0 16px 30px rgba(12,21,35,.08);
}

body.crm-body .crm-legacy-shell .card{
  margin-bottom:0;
}

body.crm-body .crm-legacy-shell .flex{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:16px;
}

body.crm-body .crm-legacy-shell .info{
  width:100% !important;
  min-width:0;
  padding:18px;
  border-radius:20px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
  background:rgba(255,255,255,.76);
}

body.crm-body .crm-legacy-shell .info.full{
  grid-column:1 / -1;
}

body.crm-body .crm-legacy-shell .value{
  word-break:break-word;
}

body.crm-body .crm-legacy-shell #map{
  min-height:320px;
  border-radius:24px;
  overflow:hidden;
  background:rgba(19,36,61,.06);
}

body.crm-body .crm-legacy-shell .sub-row{
  gap:0;
  flex-wrap:wrap;
  border-color:rgba(var(--crm-line-rgb,217,228,239),.84);
}

body.crm-body .crm-legacy-shell .sub-col{
  min-width:160px;
}

body.crm-body .crm-legacy-shell #attachment-list{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

/* =========================================================
   Guided Onboarding
   ========================================================= */
body.crm-body .crm-onboarding-shell{
  display:grid;
  gap:22px;
}

body.crm-body .crm-onboarding-hero{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(280px,.9fr);
  gap:22px;
  align-items:start;
}

body.crm-body .crm-onboarding-hero-copy h2{
  margin:8px 0 10px;
}

body.crm-body .crm-onboarding-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

body.crm-body .crm-onboarding-summary-tile{
  padding:18px;
  border-radius:22px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.84);
  background:rgba(255,255,255,.78);
}

body.crm-body .crm-onboarding-summary-tile strong{
  display:block;
  font-size:1.4rem;
  line-height:1;
  color:var(--crm-text);
}

body.crm-body .crm-onboarding-summary-tile span{
  display:block;
  margin-top:8px;
  color:var(--crm-muted);
  font-weight:600;
}

body.crm-body .crm-onboarding-layout{
  display:grid;
  grid-template-columns:minmax(280px,320px) minmax(0,1fr);
  gap:22px;
  align-items:start;
}

body.crm-body .crm-onboarding-sidebar,
body.crm-body .crm-onboarding-card{
  display:flex;
  flex-direction:column;
  gap:18px;
}

body.crm-body .crm-onboarding-sidebar-head h3,
body.crm-body .crm-onboarding-card-head h3{
  margin:4px 0 8px;
}

body.crm-body .crm-onboarding-step-list{
  display:grid;
  gap:10px;
}

body.crm-body .crm-onboarding-step{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:15px 16px;
  border-radius:22px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.82);
  background:rgba(255,255,255,.74);
  color:var(--crm-text);
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}

body.crm-body .crm-onboarding-step:hover{
  color:var(--crm-text);
  transform:translateY(-1px);
  border-color:rgba(var(--crm-primary-rgb),.22);
  box-shadow:0 14px 28px rgba(12,21,35,.07);
}

body.crm-body .crm-onboarding-step.is-active{
  border-color:rgba(var(--crm-primary-rgb),.32);
  background:linear-gradient(135deg,rgba(var(--crm-primary-rgb),.12),rgba(255,255,255,.92));
  box-shadow:0 18px 34px rgba(var(--crm-primary-rgb),.12);
}

body.crm-body .crm-onboarding-step.is-complete{
  background:linear-gradient(135deg,rgba(12,176,104,.12),rgba(255,255,255,.94));
}

body.crm-body .crm-onboarding-step-index{
  width:38px;
  height:38px;
  flex-shrink:0;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:rgba(var(--crm-primary-rgb),.12);
  color:var(--crm-primary);
  font-weight:800;
}

body.crm-body .crm-onboarding-step.is-complete .crm-onboarding-step-index{
  background:rgba(12,176,104,.14);
  color:var(--crm-success);
}

body.crm-body .crm-onboarding-step-copy{
  display:grid;
  gap:5px;
}

body.crm-body .crm-onboarding-step-copy strong{
  display:block;
}

body.crm-body .crm-onboarding-step-copy small{
  color:var(--crm-muted);
  line-height:1.55;
}

body.crm-body .crm-onboarding-sidebar-actions{
  display:grid;
  gap:10px;
}

body.crm-body .crm-onboarding-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}

body.crm-body .crm-onboarding-link-grid,
body.crm-body .crm-onboarding-check-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

body.crm-body .crm-onboarding-link-card,
body.crm-body .crm-onboarding-check{
  display:grid;
  gap:8px;
  padding:18px;
  border-radius:22px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.82);
  background:rgba(255,255,255,.78);
  color:var(--crm-text);
}

body.crm-body .crm-onboarding-link-card:hover{
  color:var(--crm-primary);
  border-color:rgba(var(--crm-primary-rgb),.22);
}

body.crm-body .crm-onboarding-link-card span,
body.crm-body .crm-onboarding-check span{
  color:var(--crm-muted);
  line-height:1.55;
  word-break:break-word;
}

body.crm-body .crm-onboarding-check.is-complete{
  border-color:rgba(12,176,104,.2);
  background:linear-gradient(135deg,rgba(12,176,104,.12),rgba(255,255,255,.9));
}

body.crm-body .crm-onboarding-callout{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  border-radius:22px;
  border:1px dashed rgba(var(--crm-line-rgb,217,228,239),.92);
  background:rgba(255,255,255,.74);
}

body.crm-body .crm-onboarding-quick-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.crm-onboarding-public-next{
  margin-top:22px;
  padding:18px 20px;
  border-radius:20px;
  border:1px dashed rgba(19,36,61,.12);
  background:rgba(255,255,255,.72);
  color:#152235;
}

.crm-onboarding-public-next strong{
  display:block;
  margin-bottom:10px;
}

.crm-onboarding-public-next ul{
  margin:0;
  padding-left:18px;
  color:#617089;
}

@media (max-width:980px){
  body.crm-body #searchModal{
    padding:14px;
  }

  body.crm-body #searchModal .crm-search-modal{
    width:calc(100vw - 20px);
    min-height:0;
    max-height:calc(100vh - 20px);
    border-radius:26px;
  }

  body.crm-body #searchModal .crm-search-body{
    grid-template-columns:1fr;
  }

  body.crm-body #searchModal .crm-search-sidebar{
    padding:16px;
    border-right:0;
    border-bottom:1px solid rgba(var(--crm-line-rgb,217,228,239),.86);
  }

  body.crm-body #searchModal .crm-search-module-list{
    display:flex;
    gap:10px;
    overflow:auto;
    padding-bottom:4px;
  }

  body.crm-body #searchModal .crm-search-module{
    min-width:200px;
    transform:none !important;
  }

  body.crm-body #searchModal .crm-search-stage{
    padding:18px;
  }

  body.crm-body #searchModal .crm-search-welcome,
  body.crm-body #searchModal .crm-search-state,
  body.crm-body #searchModal .empty-state{
    min-height:180px;
  }

  body.crm-body .crm-legacy-shell{
    margin-left:0;
    padding:18px;
  }

  body.crm-body .crm-onboarding-hero,
  body.crm-body .crm-onboarding-layout{
    grid-template-columns:1fr;
  }

  body.crm-body .crm-onboarding-summary,
  body.crm-body .crm-onboarding-link-grid,
  body.crm-body .crm-onboarding-check-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:720px){
  body.crm-body #searchModal .crm-search-header{
    padding:14px;
    gap:12px;
  }

  body.crm-body #searchModal .crm-search-input-shell{
    min-height:54px;
    padding:0 16px;
    border-radius:18px;
  }

  body.crm-body #searchModal .crm-search-close{
    width:46px;
    min-width:46px;
    height:46px;
    border-radius:16px;
  }

  body.crm-body #searchModal .crm-search-module{
    min-width:170px;
  }

  body.crm-body #searchModal .crm-search-welcome,
  body.crm-body #searchModal .crm-search-state,
  body.crm-body #searchModal .empty-state{
    flex-direction:column;
    align-items:flex-start;
    text-align:left;
  }

  body.crm-body .crm-legacy-shell .flex{
    grid-template-columns:1fr;
  }

  body.crm-body .crm-onboarding-card-head,
  body.crm-body .crm-onboarding-callout{
    flex-direction:column;
    align-items:flex-start;
  }

  body.crm-body .crm-onboarding-summary{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   AI Assistant
   ========================================================= */
.ai-shell{
  display:grid;
  gap:22px;
  max-width:var(--crm-content-max);
  margin:0 auto;
  padding:28px 24px 34px;
}

.ai-hero{
  display:flex;
  gap:22px;
  align-items:start;
  flex-wrap: wrap;
}

.ai-hero h2{
  margin:6px 0 10px;
}

.ai-usage-grid{
      display: flex;
    gap: 14px;
    flex-wrap: wrap;
    width: 100%;
}

.ai-usage-tile{
  padding:18px;
  border-radius:20px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.72);
  background:rgba(255,255,255,.74);
  width: 23%;
}

.ai-usage-tile strong,
.ai-conversation-item strong{
  display:block;
}

.ai-usage-tile span{
  display:block;
  margin-top:8px;
  font-size:1.18rem;
  font-weight:600;
  color:var(--crm-text);
}

.ai-usage-tile small{
  display:block;
  margin-top:4px;
  color:var(--crm-muted);
}

.ai-layout{
  display:grid;
  grid-template-columns:minmax(280px, 320px) minmax(0, 1fr);
  gap:22px;
  min-height:680px;
}

.ai-sidebar,
.ai-chat-card{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.ai-sidebar-head,
.ai-chat-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}

.ai-sidebar-head h3,
.ai-chat-head h3{
  margin:6px 0 0;
}

.ai-prompt-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.ai-prompt-chip{
  border:1px solid rgba(var(--crm-primary-rgb),.18);
  background:rgba(var(--crm-primary-rgb),.08);
  color:var(--crm-text);
  border-radius:999px;
  padding:9px 14px;
  font:600 .88rem/1.1 var(--crm-body-font,CircularStd,"Segoe UI",sans-serif);
  transition:background .2s ease, border-color .2s ease, transform .2s ease;
}

.ai-prompt-chip:hover{
  transform:translateY(-1px);
  background:rgba(var(--crm-primary-rgb),.12);
  border-color:rgba(var(--crm-primary-rgb),.28);
}

.ai-conversation-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:0;
  overflow:auto;
  padding-right:2px;
}

.ai-conversation-item{
  display:block;
  padding:14px 15px;
  border-radius:18px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.7);
  background:rgba(255,255,255,.72);
  color:var(--crm-text);
  transition:border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.ai-conversation-item span,
.ai-conversation-item small{
  display:block;
  margin-top:6px;
}

.ai-conversation-item span{
  color:var(--crm-muted);
  font-size:.88rem;
}

.ai-conversation-item small{
  color:var(--crm-muted);
  font-size:.78rem;
}

.ai-conversation-item:hover,
.ai-conversation-item.active{
  color:var(--crm-text);
  border-color:rgba(var(--crm-primary-rgb),.24);
  box-shadow:0 14px 26px rgba(12,21,35,.08);
}

.ai-chat-log {
  flex:1 1 auto;
  min-height:440px;
  max-height:72vh;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:14px;
  background: #f7f7f7;
    border-radius: 15px;
    padding: 1vw;
    border: inset 2px #ffffff;
}

#aiMessageInput{
	background: #f7f7f7;
    border-radius: 15px;
    padding: 1vw;
    border: inset 2px #ffffff;
	
	
}

.ai-message{
  display:flex;
  flex-direction:column;
  gap:8px;
  
}

.ai-message.user{
  align-items:flex-end;
}

.ai-message.assistant{
  align-items:flex-start;
}

.ai-message-bubble{
  max-width:min(780px, 92%);
  padding:15px 16px;
  border-radius:20px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.78);
  background:rgba(255,255,255,.86);
  color:var(--crm-text);
  line-height:1.6;
  box-shadow:0 10px 18px rgba(12,21,35,.04);
}

.ai-message.user .ai-message-bubble{
      background: #5e5e5e;
    color: #ffffff;
  border-color:transparent;
}

.ai-message time{
  font-size:.78rem;
  color:var(--crm-muted);
  padding:0 6px;
}

.ai-message-support{
  width:min(780px,92%);
  display:grid;
  gap:10px;
  padding:0 4px;
}

.ai-message-support strong{
  font-size:.78rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--crm-muted);
}

.ai-rationale-list{
  margin:0;
  padding-left:18px;
  color:var(--crm-muted);
  display:grid;
  gap:6px;
}

.ai-source-list{
  display:grid;
  gap:10px;
}

.ai-source-chip{
  display:grid;
  gap:4px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.82);
  background:rgba(255,255,255,.72);
  color:var(--crm-text);
  text-decoration:none;
}

.ai-source-chip:hover{
  border-color:rgba(var(--crm-primary-rgb),.28);
  box-shadow:0 10px 18px rgba(12,21,35,.05);
  color:var(--crm-text);
}

.ai-source-title{
  font-weight:700;
}

.ai-source-summary,
.ai-source-why{
  font-size:.9rem;
  color:var(--crm-muted);
}

.ai-composer{
  display:grid;
  gap:14px;
  border-top:1px solid rgba(var(--crm-line-rgb,217,228,239),.76);
  padding-top:18px;
}

.ai-composer textarea{
  min-height:118px;
  resize:vertical;
}

.ai-composer-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.ai-notice{
  gap:12px;
}

.ai-empty-state{
  min-height:320px;
}

.ai-typing .ai-message-bubble{
  display:inline-flex;
  gap:7px;
  align-items:center;
}

.ai-typing .ai-message-bubble span{
  width:9px;
  height:9px;
  border-radius:50%;
  background:rgba(var(--crm-primary-rgb),.54);
  animation:crm-ai-bounce 1s infinite ease-in-out;
}

.ai-typing .ai-message-bubble span:nth-child(2){
  animation-delay:.15s;
}

.ai-typing .ai-message-bubble span:nth-child(3){
  animation-delay:.3s;
}

@keyframes crm-ai-bounce{
  0%, 80%, 100%{transform:translateY(0);opacity:.45}
  40%{transform:translateY(-4px);opacity:1}
}

@media (max-width:1180px){
  .ai-hero,
  .ai-layout{
    grid-template-columns:1fr;
  }
}

@media (max-width:720px){
  .ai-shell{
    padding:18px 16px 26px;
  }

  .ai-usage-grid{
    grid-template-columns:1fr;
  }

  .ai-composer-actions,
  .ai-chat-head,
  .ai-sidebar-head{
    flex-direction:column;
    align-items:stretch;
  }

  .ai-chat-log{
    min-height:360px;
    max-height:none;
  }

  .ai-message-bubble{
    max-width:100%;
  }

  .ai-message-support{
    width:100%;
  }
}

/* =========================================================
   Public SaaS Pricing And Signup
   ========================================================= */
body.public-crm-body{
  min-height:100vh;
  background:linear-gradient(180deg,#f6f8fc 0%,#eef3f8 100%);
}

.public-topbar{
  position:sticky;
  top:0;
  z-index:40;
  backdrop-filter:blur(10px);
  background:rgba(246,248,252,.9);
  border-bottom:1px solid rgba(var(--crm-line-rgb,217,228,239),.72);
}

.public-topbar-shell{
  width:min(1180px,calc(100% - 32px));
  margin:0 auto;
  min-height:84px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.public-brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.public-brand-mark{
  width:54px;
  height:54px;
  flex:0 0 54px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:18px;
  background:linear-gradient(180deg,#fff 0%,#eef5ff 100%);
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.88);
  color:var(--crm-primary);
  box-shadow:0 14px 28px rgba(12,21,35,.08);
}

.public-brand-mark img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.public-brand-mark i{
  font-size:1.2rem;
}

.public-brand-copy{
  display:grid;
  gap:4px;
  min-width:0;
}

.public-brand-copy strong{
  display:block;
  color:var(--crm-text);
  font-size:1rem;
  line-height:1.15;
}

.public-brand-copy small{
  display:block;
  color:var(--crm-muted);
  font-size:.85rem;
  line-height:1.35;
}

.public-topbar-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.public-topbar-actions a:not(.btn){
  color:var(--crm-muted);
  font-weight:600;
}

.public-topbar-actions a:not(.btn):hover{
  color:var(--crm-primary);
}

.health-preview-tile{
  gap:8px;
}

.health-status{
  font-weight:800;
}

.health-status-ok{
  color:#0f9f67;
}

.health-status-warning{
  color:#c27c17;
}

.health-status-error{
  color:#d14343;
}

.health-status-unknown{
  color:var(--crm-muted);
}

.public-shell{
  width:min(1180px,calc(100% - 32px));
  margin:0 auto;
  padding:36px 0 72px;
}

.public-hero{
  display:grid;
  gap:18px;
  padding:34px;
  margin-bottom:24px;
  border-radius:32px;
  background:linear-gradient(135deg,#ffffff 0%,#f4f8ff 100%);
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.85);
  box-shadow:0 20px 44px rgba(12,21,35,.06);
}

.public-hero.compact{
  padding:28px 30px;
}

.public-hero h1{
  margin:0;
  font-size:clamp(2rem,4vw,3.4rem);
  line-height:1.05;
}

.public-hero p{
  margin:0;
  max-width:760px;
  font-size:1.02rem;
}

.public-badge{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(var(--crm-primary-rgb),.08);
  color:var(--crm-primary);
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:.75rem;
}

.public-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.public-actions.justify-between{
  justify-content:space-between;
}

.billing-toggle{
  display:inline-flex;
  width:max-content;
  gap:6px;
  padding:6px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.82);
}

.billing-toggle a{
  padding:10px 16px;
  border-radius:999px;
  color:var(--crm-muted);
  font-weight:600;
}

.billing-toggle a.is-active{
  background:var(--crm-primary);
  color:#fff;
}

.pricing-grid,
.signup-layout{
  display:grid;
  gap:20px;
}

.pricing-grid{
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
}

.signup-layout{
  grid-template-columns:minmax(280px,340px) minmax(0,1fr);
}

.signup-layout.single{
  grid-template-columns:minmax(0,760px);
  justify-content:center;
}

.public-card,
.pricing-card{
  position:relative;
  display:grid;
  gap:16px;
  padding:28px;
  border-radius:30px;
  background:#fff;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.82);
  box-shadow:0 16px 34px rgba(12,21,35,.05);
}

.pricing-card.is-featured{
  border-color:rgba(var(--crm-primary-rgb),.26);
  box-shadow:0 24px 48px rgba(var(--crm-primary-rgb),.12);
}

.pricing-badge{
  position:absolute;
  top:20px;
  right:20px;
  display:inline-flex;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(var(--crm-primary-rgb),.1);
  color:var(--crm-primary);
  font-size:.78rem;
  font-weight:700;
}

.pricing-amount{
  display:flex;
  align-items:flex-end;
  gap:8px;
}

.pricing-amount strong{
  font-size:2.3rem;
  line-height:1;
  color:var(--crm-text);
}

.pricing-amount span,
.pricing-meta{
  color:var(--crm-muted);
}

.pricing-list{
  display:grid;
  gap:10px;
  padding:0;
  margin:0;
  list-style:none;
}

.pricing-list li{
  position:relative;
  padding-left:18px;
  color:var(--crm-text);
}

.pricing-list li::before{
  content:"";
  position:absolute;
  top:.65em;
  left:0;
  width:8px;
  height:8px;
  border-radius:50%;
  background:rgba(var(--crm-primary-rgb),.78);
}

.pricing-actions{
  margin-top:auto;
}

.public-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.public-section-head h2{
  margin:0;
}

.signup-form{
  display:grid;
  gap:18px;
}

.public-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.public-form-grid label{
  display:grid;
  gap:8px;
  color:var(--crm-text);
  font-weight:600;
}

.public-form-grid label.full{
  grid-column:1/-1;
}

.checkout-options{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
}

.checkout-choice,
.status-inline{
  display:grid;
  gap:6px;
  padding:16px;
  border-radius:20px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.85);
  background:rgba(var(--crm-primary-rgb),.03);
}

.checkout-choice input{
  display:none;
}

.checkout-choice.active,
.checkout-choice:has(input:checked){
  border-color:rgba(var(--crm-primary-rgb),.3);
  background:rgba(var(--crm-primary-rgb),.07);
  box-shadow:0 10px 24px rgba(var(--crm-primary-rgb),.08);
}

.status-card{
  text-align:left;
}

.status-links{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:6px;
}

@media (max-width:960px){
  .signup-layout{
    grid-template-columns:1fr;
  }
}

@media (max-width:720px){
  .public-topbar-shell{
    width:min(100% - 24px,100%);
    min-height:auto;
    padding:16px 0;
    align-items:flex-start;
    flex-direction:column;
  }

  .public-brand{
    width:100%;
  }

  .public-topbar-actions{
    width:100%;
    justify-content:flex-start;
  }

  .public-shell{
    width:min(100% - 24px,100%);
    padding:28px 0 42px;
  }

  .public-hero,
  .public-card,
  .pricing-card{
    padding:22px 18px;
    border-radius:24px;
  }

  .public-form-grid{
    grid-template-columns:1fr;
  }

  .public-actions.justify-between,
  .public-section-head{
    flex-direction:column;
    align-items:stretch;
  }

  .checkout-options{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   Notifications, Calendar, And Workflow Surfaces
   ========================================================= */
body.crm-body .crm-job-thread-panel{
  padding:0;
  background:transparent;
  border:0;
  box-shadow:none;
}

body.crm-body .crm-notification-list,
body.crm-body .crm-notification-pref-list{
  display:grid;
  gap:14px;
}

body.crm-body .crm-notification-item,
body.crm-body .crm-notification-pref-card{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(var(--crm-line-rgb,217,228,239),.85);
  border-radius: 0;
  background: rgba(255,255,255,.82);
}

body.crm-body .crm-notification-item.is-unread{
  border-color:rgba(var(--crm-primary-rgb),.28);
  box-shadow:0 14px 30px rgba(var(--crm-primary-rgb),.08);
}

body.crm-body .crm-notification-copy{
  display:grid;
  gap:8px;
  flex:1 1 auto;
}

body.crm-body .crm-notification-head{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

body.crm-body .crm-notification-copy p{
  margin:0;
  color:var(--crm-text);
}

body.crm-body .crm-notification-meta{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  font-size:.88rem;
  color:var(--crm-muted);
}

body.crm-body .crm-notification-pref-card h4{
  margin:0 0 6px;
}

body.crm-body .crm-notification-pref-toggles{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

body.crm-body .crm-calendar-shell{
  display:grid;
  grid-template-columns:minmax(0,1.8fr) minmax(280px,.9fr);
  gap:20px;
  align-items:start;
}

body.crm-body .crm-calendar-board{
  min-width:0;
  padding:18px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.85);
  border-radius:26px;
  background:rgba(255,255,255,.88);
  box-shadow:var(--crm-shadow);
}

body.crm-body .crm-calendar-sidebar{
  display:grid;
  gap:18px;
}

body.crm-body .crm-calendar-sidecard{
  padding:18px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.85);
  border-radius:24px;
  background:rgba(255,255,255,.86);
}

body.crm-body .crm-calendar-sidecard h4{
  margin:0 0 14px;
}

body.crm-body .crm-calendar-agenda{
  display:grid;
  gap:12px;
}

body.crm-body .crm-calendar-agenda-item{
  display:grid;
  gap:4px;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.85);
  background:rgba(var(--crm-primary-rgb),.04);
  color:var(--crm-text);
}

body.crm-body .crm-calendar-agenda-item:hover{
  border-color:rgba(var(--crm-primary-rgb),.28);
  background:rgba(var(--crm-primary-rgb),.07);
}

body.crm-body .crm-calendar-agenda-item span,
body.crm-body .crm-calendar-agenda-item small{
  color:var(--crm-muted);
}

body.crm-body .fc{
  font-family:var(--crm-body-font,CircularStd,"Segoe UI",sans-serif);
}

body.crm-body .fc-toolbar{
  margin-bottom:18px;
}

body.crm-body .fc button{
  border:0;
  border-radius:14px;
  background:rgba(var(--crm-primary-rgb),.08);
  color:var(--crm-text);
  box-shadow:none;
}

body.crm-body .fc button.fc-state-active,
body.crm-body .fc button:hover{
  background:var(--crm-primary);
  color:#fff;
}

body.crm-body .fc-event{
  border:0;
  border-radius:14px;
  padding:3px 8px;
  font-weight:600;
}

body.crm-body .fc-event.is-draggable{
  cursor:move;
}

body.crm-body .crm-calendar-modal-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}

body.crm-body .crm-calendar-modal-stat,
body.crm-body .crm-calendar-modal-block{
  display:grid;
  gap:6px;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(var(--crm-line-rgb,217,228,239),.85);
  background:rgba(255,255,255,.84);
}

body.crm-body .crm-calendar-modal-stat span,
body.crm-body .crm-calendar-modal-block span{
  color:var(--crm-muted);
  font-size:.8rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}

body.crm-body .crm-calendar-modal-block{
  margin-top:12px;
}

body.crm-body .crm-calendar-modal-block p{
  margin:0;
  color:var(--crm-text);
  line-height:1.6;
}

body.crm-body .fc-unthemed td,
body.crm-body .fc-unthemed th,
body.crm-body .fc-unthemed .fc-divider,
body.crm-body .fc-unthemed .fc-popover,
body.crm-body .fc-unthemed .fc-row,
body.crm-body .fc-unthemed tbody,
body.crm-body .fc-unthemed .fc-list-view,
body.crm-body .fc-unthemed .fc-list-heading td{
  border-color:rgba(var(--crm-line-rgb,217,228,239),.85);
}

@media (max-width:960px){
  body.crm-body .crm-calendar-shell{
    grid-template-columns:1fr;
  }
}

@media (max-width:720px){
  body.crm-body .crm-notification-item,
  body.crm-body .crm-notification-pref-card{
    flex-direction:column;
  }

  body.crm-body .crm-notification-pref-toggles{
    justify-content:flex-start;
  }

  body.crm-body .crm-calendar-board{
    padding:12px;
  }

  body.crm-body .crm-calendar-modal-grid{
    grid-template-columns:1fr;
  }
}
