:root{
  --wa-color-brand-50:#eff8f4;
  --wa-color-brand-100:#dcefe7;
  --wa-color-brand-200:#bddfcf;
  --wa-color-brand-300:#91c7af;
  --wa-color-brand-400:#5ca888;
  --wa-color-brand-500:#2f8768;
  --wa-color-brand-600:#176b50;
  --wa-color-brand-700:#115440;
  --wa-color-brand-800:#0b3b2e;
  --wa-color-brand-900:#082d24;
  --wa-border-radius-small:var(--ui-radius-xs);
  --wa-border-radius-medium:var(--ui-radius-sm);
  --wa-border-radius-large:var(--ui-radius-lg);
  --wa-font-sans:"Segoe UI",Arial,"Microsoft YaHei UI",sans-serif;
  --wa-focus-ring-color:rgba(23,107,80,.25);
}
wa-tooltip::part(body){padding:6px 9px;border-radius:var(--ui-radius-sm);color:#fff;background:#17352b;box-shadow:0 8px 24px rgba(7,35,26,.22);font-size:11px}
wa-badge.moos-status{display:inline-flex!important;width:auto!important;min-width:92px!important;max-width:100%!important;min-height:28px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important}
wa-badge.moos-status::before{display:none!important}
wa-badge.moos-status::part(base){display:flex;width:auto;min-width:92px;min-height:28px;align-items:center;justify-content:center;padding:5px 10px;border:1px solid transparent;border-radius:var(--ui-radius-sm);box-sizing:border-box;font-size:11px;font-weight:650;line-height:1.2;text-align:center;white-space:nowrap}
wa-badge.moos-status[variant="success"]::part(base){color:#155d45;background:#dcece6}
wa-badge.moos-status[variant="warning"]::part(base){color:#7a4b12;background:#f5e8d1}
wa-badge.moos-status[variant="danger"]::part(base){color:#8c443b;background:#f3e3df}
wa-badge.moos-status[variant="neutral"]::part(base){color:#53625c;background:#edf1ef}
wa-avatar.moos-avatar{--size:28px}wa-avatar.moos-avatar::part(base){color:#1b5945;background:#dfece6;font-size:9px;font-weight:800}
wa-callout.moos-message{display:block;margin-bottom:16px}wa-callout.moos-message::part(base){border-radius:8px}
wa-details.moos-details::part(base){border-color:#dce4e0;border-radius:8px}wa-details.moos-details::part(header){font-size:13px;font-weight:650}
wa-tooltip:not(:defined),wa-badge:not(:defined),wa-avatar:not(:defined),wa-callout:not(:defined),wa-details:not(:defined){visibility:hidden}
wa-tooltip:defined,wa-badge:defined,wa-avatar:defined,wa-callout:defined,wa-details:defined{visibility:visible}

/* Global data-display contract: consistent thumbnails, status pills and table
   headings across Project, Product, Workspace and management lists. */
.table-thumbnail,
img.table-thumbnail,
.product-list-thumb {
  display:inline-grid!important;
  width:var(--table-thumbnail-size,44px)!important;
  min-width:var(--table-thumbnail-size,44px)!important;
  max-width:var(--table-thumbnail-size,44px)!important;
  height:var(--table-thumbnail-size,44px)!important;
  min-height:var(--table-thumbnail-size,44px)!important;
  max-height:var(--table-thumbnail-size,44px)!important;
  aspect-ratio:1 / 1!important;
  place-items:center!important;
  object-fit:contain!important;
  object-position:center!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  background:#fff!important;
}

/* Bounded media contract: fixed thumbnail frames must size the replaced
   element explicitly. Percentage height alone can resolve to auto inside
   button/grid wrappers and let portrait images overflow before clipping. */
:where(
  .product-context-image,
  .supplier-product-thumb,
  .product-file-preview,
  .communication-product-thumb,
  .media-asset-preview
) {
  position:relative!important;
  overflow:hidden!important;
}

:where(
  .product-context-image,
  .supplier-product-thumb,
  .product-file-preview,
  .communication-product-thumb,
  .media-asset-preview
) > img {
  position:absolute!important;
  inset:4px!important;
  display:block!important;
  width:calc(100% - 8px)!important;
  height:calc(100% - 8px)!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  padding:0!important;
  box-sizing:border-box!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#fff!important;
}

/* Shared record-identity image: Project and Product headers use the same
   edge-to-edge contained image, border, background, and corner geometry. */
:where(.project-hero-image, .product-context-image) {
  position:relative!important;
  overflow:hidden!important;
  padding:0!important;
  border:1px solid #dce5e1!important;
  border-radius:6px!important;
  background:#fff!important;
}

:where(.project-hero-image, .product-context-image) > img {
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  padding:0!important;
  box-sizing:border-box!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#fff!important;
}

.status-pill,
.product-status,
.visibility-tag {
  display:inline-flex!important;
  width:auto!important;
  min-width:92px!important;
  max-width:100%!important;
  min-height:28px!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  padding:5px 10px!important;
  box-sizing:border-box!important;
  border-radius:var(--ui-radius-sm)!important;
  font-size:11px!important;
  font-weight:650!important;
  line-height:1.2!important;
  text-align:center!important;
  white-space:nowrap!important;
}

thead th,
.entity-table th,
.workspace-table th,
.moos-ag-grid .ag-header-cell {
  font-weight:600!important;
  letter-spacing:.025em!important;
}

/* Web Awesome removes native select chrome. Restore the platform caret so
   every dropdown remains visibly discoverable after page-level backgrounds
   and focus styles are applied. */
.horizon-workbench select:not([multiple]) {
  appearance: auto !important;
  -webkit-appearance: menulist !important;
  background-image: none !important;
  padding-inline-end: 30px !important;
}

/* Native checkbox rendering is inconsistent once Web Awesome's form reset is loaded.
   Give project access controls an explicit checked state instead of relying on accent-color. */
.checkbox-card input[type="checkbox"]{
  appearance:none!important;
  -webkit-appearance:none!important;
  display:inline-grid;
  flex:0 0 20px;
  width:20px;
  height:20px;
  margin:1px 0 0;
  place-content:center;
  border:1px solid #8fb3a4;
  border-radius:6px;
  background:#fff;
  background-position:center;
  background-repeat:no-repeat;
  background-size:12px 12px;
  box-shadow:0 0 0 3px rgba(23,107,80,.10);
  cursor:pointer;
}
.checkbox-card input[type="checkbox"]::before,
.checkbox-card input[type="checkbox"]::after{
  content:none!important;
  display:none!important;
}
.checkbox-card input[type="checkbox"]:checked{
  border-color:#176b50;
  background-color:#176b50;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.25' d='M3 8.5 6.4 12 13 4.5'/%3E%3C/svg%3E");
  box-shadow:0 0 0 3px rgba(23,107,80,.16);
}
.checkbox-card input[type="checkbox"]:focus-visible{outline:2px solid #176b50;outline-offset:3px}
.check-row input[type="checkbox"],
.customer-participant-options input[type="checkbox"]{
  appearance:none!important;
  -webkit-appearance:none!important;
  display:inline-grid;
  width:20px!important;
  min-width:20px!important;
  max-width:20px!important;
  height:20px!important;
  min-height:20px!important;
  max-height:20px!important;
  flex:0 0 20px;
  margin:0!important;
  padding:0!important;
  place-items:center;
  border:1px solid var(--ui-line-strong);
  border-radius:var(--ui-radius-xs);
  background:#fff center/12px 12px no-repeat;
  box-shadow:none;
  cursor:pointer;
}
.check-row input[type="checkbox"]::before,
.check-row input[type="checkbox"]::after,
.customer-participant-options input[type="checkbox"]::before,
.customer-participant-options input[type="checkbox"]::after{
  content:none!important;
  display:none!important;
}
.check-row input[type="checkbox"]:checked,
.customer-participant-options input[type="checkbox"]:checked{
  border-color:var(--ui-forest);
  background-color:var(--ui-forest);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.25' d='M3 8.5 6.4 12 13 4.5'/%3E%3C/svg%3E");
}
.check-row input[type="checkbox"]:focus-visible,
.customer-participant-options input[type="checkbox"]:focus-visible{
  outline:2px solid var(--ui-forest);
  outline-offset:2px;
}
.check-row:hover input[type="checkbox"],
.customer-participant-options label:hover input[type="checkbox"]{border-color:#8fa99f}
.customer-participant-options>div{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.customer-participant-options>div>div>label{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:9px 11px;
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius-sm);
  background:#fff;
  cursor:pointer;
}
.customer-participant-options>div>div>label:has(input:checked){
  border-color:#9cc5b5;
  background:#eef7f3;
}
@media (max-width:760px){
  .customer-participant-options>div{grid-template-columns:1fr}
}
.settings-grid>.checkbox-card{
  align-self:end;
  min-height:58px;
  box-sizing:border-box;
  align-items:center;
}
.checkbox-card>label{
  display:flex!important;
  min-width:0;
  flex-direction:column;
  justify-content:center;
  gap:3px;
  cursor:pointer;
}
.checkbox-card>label strong,.checkbox-card>label small{display:block}
