.emp-am-overlay {
  position: fixed;
  inset: 0;
  z-index: 10090;
  display: grid;
  place-items: center;
  padding: 28px 32px;
  background: rgba(5, 6, 7, 0.66);
}

.emp-am-overlay > [data-emp-am-dialog-host],
.emp-am-overlay > [data-emp-am-position-dialog-host] {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10120;
}

.emp-am-overlay > [data-emp-am-position-dialog-host] {
  z-index: 10140;
}

.emp-am-overlay > [data-emp-am-dialog-host] > *,
.emp-am-overlay > [data-emp-am-position-dialog-host] > * {
  pointer-events: auto;
}

.emp-am-panel {
  position: relative;
  width: min(1280px, calc(100vw - 64px));
  height: min(820px, calc(100vh - 56px));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #16181b;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.emp-am-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.emp-am-head-copy {
  min-width: 0;
}

.emp-am-head-copy h2 {
  margin: 0;
  color: #f2f5f8;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.emp-am-head-copy p {
  margin: 4px 0 0;
  color: rgba(242, 245, 248, 0.62);
  font-size: 13px;
}

.emp-am-head-note {
  margin-top: 8px;
  color: rgba(242, 245, 248, 0.56);
  font-size: 12px;
}

.emp-am-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin-top: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f2f5f8;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.emp-am-close:hover,
.emp-am-close:focus-visible,
.emp-am-row:focus-visible,
.emp-am-act:focus-visible,
.emp-am-chip:focus-visible,
.emp-am-text-btn:focus-visible,
.emp-am-search input:focus-visible,
.emp-am-search select:focus-visible,
.emp-am-back:focus-visible {
  outline: 2px solid #59b7de;
  outline-offset: 2px;
}

.emp-am-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.emp-am-banner.is-error,
.emp-am-status.is-error {
  color: #f0b4b4;
}

.emp-am-banner p {
  margin: 0;
}

.emp-am-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(280px, 35%) minmax(0, 65%);
  min-height: 0;
}

.emp-am-directory,
.emp-am-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.emp-am-directory {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.emp-am-pane-head {
  display: grid;
  gap: 8px;
  padding: 12px 14px 8px;
  background: #16181b;
  position: relative;
  z-index: 1;
}

.emp-am-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.emp-am-search {
  flex: 1 1 auto;
  min-width: 0;
}

.emp-am-search input,
.emp-am-search select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #111315;
  color: #f2f5f8;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
}

.emp-am-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.emp-am-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.emp-am-toolbar-label {
  color: rgba(242, 245, 248, 0.56);
  font-size: 12px;
}

.emp-am-company-filter {
  flex: 1 1 160px;
  min-width: 140px;
}

.emp-am-chip,
.emp-am-text-btn,
.emp-am-back,
.emp-am-act {
  border: 0;
  background: transparent;
  color: rgba(242, 245, 248, 0.78);
  cursor: pointer;
  font: inherit;
}

.emp-am-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

.emp-am-chip.is-selected,
.emp-am-chip:hover {
  background: rgba(89, 183, 222, 0.14);
  color: #f2f5f8;
}

.emp-am-chip.is-selected {
  border-color: rgba(89, 183, 222, 0.45);
}

.emp-am-text-btn,
.emp-am-back {
  font-size: 12px;
  color: #59b7de;
  padding: 2px 0;
}

.emp-am-act.is-primary {
  border: 1px solid rgba(89, 183, 222, 0.45);
  border-radius: 8px;
  background: rgba(89, 183, 222, 0.14);
  color: #f2f5f8;
  padding: 6px 10px;
}

.emp-am-count,
.emp-am-status,
.emp-am-empty,
.emp-am-help {
  margin: 0;
  color: rgba(242, 245, 248, 0.56);
  font-size: 12px;
}

.emp-am-user-list,
.emp-am-detail-scroll {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.emp-am-user-list::-webkit-scrollbar,
.emp-am-detail-scroll::-webkit-scrollbar {
  width: 8px;
}

.emp-am-user-list::-webkit-scrollbar-thumb,
.emp-am-detail-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.emp-am-user-list {
  align-content: start;
  padding: 0 0 8px;
}

.emp-am-table {
  width: 100%;
}

.emp-am-table-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(108px, 0.85fr) 92px 68px;
  column-gap: 10px;
  align-items: center;
}

.emp-am-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 14px;
  border-left: 2px solid transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #16181b;
  color: rgba(242, 245, 248, 0.5);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.emp-am-row {
  width: 100%;
  padding: 7px 14px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.emp-am-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.emp-am-row.is-selected {
  border-left-color: #59b7de;
  background: rgba(89, 183, 222, 0.1);
}

.emp-am-col-account,
.emp-am-col-username,
.emp-am-col-role,
.emp-am-col-status {
  min-width: 0;
  overflow: hidden;
  text-align: left;
}

.emp-am-row-name,
.emp-am-row-user {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emp-am-row-name {
  color: #f2f5f8;
  font-size: 13px;
}

.emp-am-row-user {
  color: rgba(242, 245, 248, 0.55);
  font-size: 12px;
}

.emp-am-row-role,
.emp-am-row-state {
  font-size: 11px;
  white-space: nowrap;
}

.emp-am-row-role {
  color: #c7d7e2;
}

.emp-am-row-state {
  color: rgba(242, 245, 248, 0.56);
}

.emp-am-row-state.is-on {
  color: #9ad7b6;
}

.emp-am-row.is-inactive .emp-am-row-name {
  color: rgba(242, 245, 248, 0.7);
}

.emp-am-row-secondary {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: rgba(242, 245, 248, 0.56);
}

.emp-am-row-secondary.is-alert {
  color: #e0b15a;
}

.emp-am-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px 12px;
  background: #16181b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
}

.emp-am-main {
  grid-template-rows: minmax(0, 1fr);
}

.emp-am-detail-scroll {
  padding: 20px 22px 24px;
}

.emp-am-identity {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.emp-am-identity [data-emp-am-action-host] {
  margin-left: auto;
  flex: 0 0 auto;
}

.emp-am-identity.is-empty {
  display: block;
  min-height: 0;
  margin: 0;
  text-align: left;
}

.emp-am-back {
  display: none;
}

.emp-am-identity-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.emp-am-identity-copy strong,
.emp-am-field strong,
.emp-am-wrap,
.emp-am-metric strong {
  display: block;
  overflow-wrap: anywhere;
  color: #f2f5f8;
}

.emp-am-identity-copy strong {
  font-size: 15px;
}

.emp-am-identity-copy span {
  display: block;
  margin-top: 4px;
  color: rgba(242, 245, 248, 0.56);
  font-size: 12px;
}

.emp-am-warning {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(224, 177, 90, 0.12);
  color: #f3e2c0;
}

.emp-am-warning strong,
.emp-am-warning p {
  margin: 0;
}

.emp-am-warning p {
  margin-top: 4px;
}

.emp-am-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0 0 16px;
}

.emp-am-field {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.emp-am-field span,
.emp-am-metric span {
  display: block;
  margin-bottom: 4px;
  color: rgba(242, 245, 248, 0.55);
  font-size: 12px;
}

.emp-am-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.emp-am-metric {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.emp-am-metric strong {
  font-size: 20px;
}

.emp-am-help + .emp-am-help {
  margin-top: 6px;
}

.emp-am-search .visually-hidden,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 1100px) {
  .emp-am-overlay {
    padding: 16px 18px;
  }

  .emp-am-panel {
    width: calc(100vw - 36px);
    height: calc(100vh - 32px);
  }

  .emp-am-body {
    grid-template-columns: minmax(240px, 38%) minmax(0, 62%);
  }

  .emp-am-facts,
  .emp-am-metrics {
    grid-template-columns: 1fr;
  }

  .emp-am-table-columns {
    grid-template-columns: minmax(0, 1fr) 80px 72px 56px;
  }
}

@media (max-width: 860px) {
  .emp-am-overlay {
    padding: 10px;
    place-items: stretch;
  }

  .emp-am-panel {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 12px;
  }

  .emp-am-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
  }

  .emp-am-directory {
    border-right: 0;
  }

  .emp-am-back {
    display: inline-flex;
  }

  .emp-am-panel.is-account-open .emp-am-directory,
  .emp-am-panel:not(.is-account-open) .emp-am-main {
    display: none;
  }

  .emp-am-toolbar {
    gap: 6px;
  }

  .emp-am-table-columns {
    grid-template-columns: minmax(0, 1fr) 72px 64px 52px;
  }

  .emp-am-table-head,
  .emp-am-row {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (max-height: 800px) {
  .emp-am-overlay {
    padding: 16px 20px;
  }

  .emp-am-panel {
    height: calc(100vh - 32px);
  }

  .emp-am-head {
    padding: 12px 16px 10px;
  }
}

@media (min-width: 1366px) {
  .emp-am-panel {
    width: min(1320px, calc(100vw - 72px));
  }
}

@media (min-width: 1920px) {
  .emp-am-panel {
    width: min(1480px, calc(100vw - 120px));
    height: min(900px, calc(100vh - 80px));
  }
}

@media (max-width: 800px) {
  html:has(.emp-am-overlay),
  body:has(.emp-am-overlay) {
    overflow-x: hidden;
  }
}
