.ms-explorer {
  width: 100%;
  min-width: 0;
}

.ms-explorer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  margin-bottom: 12px;

  flex-wrap: wrap;
}

.ms-explorer-actions,
.ms-explorer-right {
  display: flex;
  align-items: center;

  gap: 7px;

  flex-wrap: wrap;
}

.ms-explorer-toolbar-divider {
  width: 1px;
  height: 25px;

  margin: 0 2px;

  background: var(--border);
}

.ms-explorer-button {
  height: 38px;

  padding: 0 13px;

  border:
    1px solid var(--border);

  border-radius: 10px;

  background: #fff;

  color: #4f586c;

  font-size: 10.5px;
  font-weight: 680;
}

.ms-explorer-button:hover {
  background: #fafaff;
}

.ms-explorer-button.primary {
  border: 0;

  background:
    linear-gradient(
      135deg,
      #7168ed,
      #5755d7
    );

  color: #fff;

  box-shadow:
    0 4px 10px
    rgba(79,72,190,.15);
}

.ms-explorer-button.danger {
  color: #cf4e59;
}

.ms-explorer-button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.ms-explorer-search {
  height: 38px;

  min-width: 280px;

  padding: 0 11px;

  border:
    1px solid var(--border);

  border-radius: 10px;

  background: #fff;

  display: flex;
  align-items: center;

  gap: 8px;
}

.ms-explorer-search input {
  width: 100%;

  border: 0;
  outline: 0;

  background: transparent;

  font-size: 11px;

  color: var(--text);
}

.ms-explorer-card {
  overflow: hidden;
}

.ms-explorer-table-wrap {
  width: 100%;

  overflow: auto;

  scrollbar-width: thin;
}

.ms-explorer-table {
  width: max-content;
  min-width: 100%;

  table-layout: fixed;

  border-collapse: separate;
  border-spacing: 0;
}

.ms-explorer-table th {
  height: 43px;

  position: relative;

  padding: 0 12px;

  border-bottom:
    1px solid var(--border);

  background: #fbfcfe;

  color: #51596d;

  font-size: 9.5px;
  font-weight: 760;

  text-align: left;

  white-space: nowrap;

  user-select: none;
}

.ms-explorer-table th.is-dragging {
  opacity: .48;
}

.ms-explorer-table th.is-drop-target {
  background: #f0efff;

  box-shadow:
    inset 3px 0 0
    #6c62e8;
}

.ms-explorer-table th.is-resizing {
  background: #f6f5ff;
}

.ms-explorer-table td {
  height: 56px;

  padding:
    7px 12px;

  overflow: hidden;

  border-bottom:
    1px solid var(--border-soft);

  color: #4d5669;

  font-size: 10.2px;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.ms-explorer-table tr[data-record-id] {
  cursor: pointer;
}

.ms-explorer-table tr[data-record-id]:hover td {
  background: #fafaff;
}

.ms-explorer-table tr.is-selected td {
  background: #f0efff;
}

.ms-explorer-th-inner {
  height: 100%;

  display: flex;
  align-items: center;

  gap: 7px;

  overflow: hidden;
}

.ms-explorer-column-title {
  overflow: hidden;

  text-overflow: ellipsis;
}

.ms-explorer-drag {
  width: 17px;
  height: 27px;

  flex: 0 0 17px;

  display: grid;
  place-items: center;

  border-radius: 6px;

  color: #9ca4b5;

  font-size: 12px;

  cursor: grab;
}

.ms-explorer-drag:hover {
  color: #5e58cf;

  background: #eeedff;
}

.ms-explorer-drag:active {
  cursor: grabbing;
}

.ms-explorer-resizer {
  width: 9px;
  height: 100%;

  position: absolute;

  top: 0;
  right: -4px;

  z-index: 5;

  cursor: col-resize;

  touch-action: none;
}

.ms-explorer-resizer::after {
  content: "";

  width: 2px;
  height: 18px;

  position: absolute;

  top: 50%;
  left: 3px;

  transform:
    translateY(-50%);

  border-radius: 2px;

  background: #d4d9e4;

  transition:
    height .12s ease,
    background .12s ease;
}

.ms-explorer-resizer:hover::after,
.ms-explorer-table th.is-resizing
.ms-explorer-resizer::after {
  height: 29px;

  background: #6b62de;
}

body.ms-is-column-resizing {
  cursor: col-resize !important;

  user-select: none !important;
}

body.ms-is-column-resizing * {
  cursor: col-resize !important;
}

.ms-explorer-empty {
  min-height: 330px;

  display: grid;
  place-items: center;

  color: #98a0af;

  font-size: 10.5px;

  text-align: center;
}

.ms-explorer-footer {
  min-height: 46px;

  padding:
    0 13px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  border-top:
    1px solid #f3f4f7;

  background: #fff;

  color: #8992a3;

  font-size: 9px;
}

.ms-columns-menu {
  min-width: 200px;

  position: fixed;

  z-index: 200;

  padding: 8px;

  border:
    1px solid var(--border);

  border-radius: 11px;

  background: #fff;

  box-shadow:
    0 12px 30px
    rgba(40,45,80,.14);
}

.ms-columns-menu label {
  padding: 7px;

  display: flex;
  align-items: center;

  gap: 8px;

  border-radius: 7px;

  color: #596174;

  font-size: 10px;
}

.ms-columns-menu label:hover {
  background: #f6f7fb;
}

@media (max-width:800px) {

  .ms-explorer-search {
    min-width: 180px;

    flex: 1;
  }

  .ms-explorer-toolbar {
    align-items: stretch;
  }

  .ms-explorer-actions,
  .ms-explorer-right {
    width: 100%;
  }

}


/* ==========================================================================
   CRM EXPLORER TOOLBAR RETIRED
   Authority visuale:
   components/canonical-toolbar/canonical-toolbar.css
   ========================================================================== */

/* CRM-EXPLORER-MULTISELECT-V1 START */

/* Selection dimensions and native hit area: CanonicalUI tokens. */

/* CRM-EXPLORER-MULTISELECT-V1 END */

/* CRM-EXPLORER-FILTERS-V1 START */

.ms-filters-menu {
  position: fixed;
  z-index: 100050;

  width: min(360px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 40px));

  box-sizing: border-box;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  padding: 14px;

  border:
    1px solid
    rgba(203, 213, 225, 0.72);

  border-radius: 13px;

  background: #ffffff;

  box-shadow:
    0 18px 44px rgba(15, 23, 42, 0.14),
    0 4px 12px rgba(15, 23, 42, 0.06);
}

.ms-filters-menu-header {
  display: flex;
  flex-direction: column;
  gap: 3px;

  padding: 2px 2px 11px;

  border-bottom:
    1px solid
    rgba(226, 232, 240, 0.90);
}

.ms-filters-menu-header strong {
  color: #172033;
  font-size: 15px;
}

.ms-filters-menu-header span {
  color: #738095;
  font-size: 12px;
}

.ms-filters-menu-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;

  overflow-y: auto;

  padding: 12px 2px;
}

.ms-filters-menu-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ms-filters-menu-field > span {
  color: #475569;
  font-size: 12px;
  font-weight: 650;
}

.ms-filters-menu-field select {
  width: 100%;
  height: 36px;

  box-sizing: border-box;

  padding: 0 9px;

  border:
    1px solid
    rgba(203, 213, 225, 0.85);

  border-radius: 8px;

  background: #ffffff;
  color: #172033;

  font: inherit;
  font-size: 13px;
}

.ms-filters-menu-field select:focus {
  outline: none;

  border-color:
    rgba(59, 130, 246, 0.58);

  box-shadow:
    0 0 0 3px
    rgba(59, 130, 246, 0.08);
}

.ms-filters-menu-empty {
  padding: 12px;

  color: #7b8494;

  font-size: 13px;
  text-align: center;
}

.ms-filters-menu-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;

  padding-top: 11px;

  border-top:
    1px solid
    rgba(226, 232, 240, 0.90);
}

.ms-filters-menu-actions button {
  height: 36px;

  padding: 0 13px;

  border: 0;
  border-radius: 8px;

  font: inherit;
  font-size: 13px;
  font-weight: 700;

  cursor: pointer;
}

.ms-filters-reset {
  background: #eef4ff;
  color: #3478f6;
}

.ms-filters-apply {
  background: #3478f6;
  color: #ffffff;
}

/* CRM-EXPLORER-FILTERS-V1 END */
/* OMNIA DARK VISUAL REFINEMENT R1I — canonical shared explorer */
html:is(.ms-theme-light,.ms-theme-dark) :is(.ms-explorer-card,.ms-explorer-table,.ms-filters-menu){border-color:var(--ms-border-color);background:var(--ms-surface-primary);color:var(--ms-text-primary)}
html:is(.ms-theme-light,.ms-theme-dark) .ms-explorer-table th{background:var(--ms-surface-secondary);color:var(--ms-text-secondary)}
html:is(.ms-theme-light,.ms-theme-dark) .ms-explorer-table td{color:var(--ms-text-primary)}
html:is(.ms-theme-light,.ms-theme-dark) :is(.ms-explorer-table td strong,.ms-explorer-table td a){color:var(--ms-text-primary)}
html:is(.ms-theme-light,.ms-theme-dark) :is(.ms-explorer-table td small,.ms-explorer-table td span,.ms-explorer-card small,.ms-explorer-card p){color:var(--ms-text-secondary)}

/* OMNIA CRM EXPLORER ROW INTERACTION R1L */
html.ms-theme-dark .ms-explorer-table tr[data-record-id]:hover td{
  background:color-mix(in srgb,var(--ms-focus) 32%,var(--ms-surface-primary));
  color:var(--ms-text-primary);
}
html.ms-theme-dark .ms-explorer-table tr[data-record-id]:hover td :is(strong,button,[role="button"]){color:var(--ms-text-primary)}
html.ms-theme-dark .ms-explorer-table tr[data-record-id]:hover td :is(small,.ms-muted,.ms-secondary){color:var(--ms-text-secondary)}
html.ms-theme-dark .ms-explorer-table tr[data-record-id]:hover td a{color:color-mix(in srgb,var(--ms-accent-hover) 72%,var(--ms-text-primary))}
html.ms-theme-dark .ms-explorer-table tr[data-record-id]:hover td :is(.ms-data-cell-icon,.ms-company-row-icon,svg){color:var(--ms-text-primary)}

html.ms-theme-dark .ms-explorer-table tr[data-record-id]:active td{
  background:color-mix(in srgb,var(--ms-accent-soft) 74%,var(--ms-surface-primary));
}
html.ms-theme-dark .ms-explorer-table tr.is-selected td,
html.ms-theme-dark .ms-explorer-table tr.is-selected:hover td{
  background:color-mix(in srgb,var(--ms-focus) 42%,var(--ms-surface-secondary));
  color:var(--ms-text-primary);
}
html.ms-theme-dark .ms-explorer-table tr.is-selected td a{color:var(--ms-accent-hover)}
html.ms-theme-dark .ms-explorer-table tr[data-record-id]:focus-visible{outline:0}
html.ms-theme-dark .ms-explorer-table tr[data-record-id]:focus-visible td{
  box-shadow:inset 0 2px var(--ms-focus),inset 0 -2px var(--ms-focus);
}
html.ms-theme-dark .ms-explorer-table tr[data-record-id]:focus-visible td:first-child{border-left:2px solid var(--ms-focus)}
html.ms-theme-dark .ms-explorer-table tr[data-record-id]:focus-visible td:last-child{border-right:2px solid var(--ms-focus)}
html:is(.ms-theme-light,.ms-theme-dark) :is(.ms-filters-menu-header strong,.ms-filters-menu-field>span){color:var(--ms-text-primary)}
html:is(.ms-theme-light,.ms-theme-dark) :is(.ms-filters-menu-header span,.ms-filters-menu-empty){color:var(--ms-text-secondary)}
html:is(.ms-theme-light,.ms-theme-dark) .ms-filters-menu-field select{border-color:var(--ms-border-color);background:var(--ms-input-background);color:var(--ms-text-primary)}

/* OMNIA MASTER SHELL VISUAL CONSOLIDATION R1K — canonical CRM density */
html:is(.ms-theme-light,.ms-theme-dark) .ms-explorer-table th{height:36px;padding-inline:10px}
html:is(.ms-theme-light,.ms-theme-dark) .ms-explorer-table td{height:46px;padding:5px 10px}
html:is(.ms-theme-light,.ms-theme-dark) .ms-explorer-drag{height:24px}
html:is(.ms-theme-light,.ms-theme-dark) .ms-explorer-footer{min-height:40px}
html:is(.ms-theme-light,.ms-theme-dark) .ms-explorer-table td a{color:var(--ms-link-subtle);text-decoration-color:color-mix(in srgb,currentColor 48%,transparent);text-underline-offset:2px}
html:is(.ms-theme-light,.ms-theme-dark) :is(.ms-explorer-table td small,.ms-explorer-table td span,.ms-explorer-card small,.ms-explorer-card p){color:var(--ms-text-secondary)}
