/* Cross-enterprise member invitations share the existing modal and theme. */
.en-dialog.emi-dialog { width: min(900px, 100%); height: min(830px, calc(100dvh - 48px)); min-width: 0; min-height: 0; }
.emi-dialog > .en-dialog-head { flex-shrink: 0; }
.emi-dialog > .en-dialog-body { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
#enterpriseMemberImportPanel.emi-panel { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; max-width: 100%; margin: 0; overflow: hidden; }
#enterpriseMemberImportPanel [hidden] { display: none !important; }
.emi-panel :is(h3, h4, p, ul, ol, dl) { margin: 0; }
.emi-panel :is(.en-field, .en-select-shell, .en-input, .en-select) { min-width: 0; max-width: 100%; }
.emi-panel :is(.en-input, .en-select) { width: 100%; box-sizing: border-box; }
.emi-panel input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; accent-color: var(--blue-700); cursor: var(--site-cursor-pointer, pointer); }
.emi-panel input[type="checkbox"]:disabled { cursor: default; }
.emi-toolbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 12px 20px; border-bottom: 1px solid var(--en-line); }
.emi-toolbar > .en-button { flex-shrink: 0; }
.emi-heading { display: grid; flex: 1; min-width: 0; gap: 3px; }
.emi-heading > strong, .emi-heading > h3 { color: var(--en-ink); font-size: 14px; line-height: 1.5; }
.emi-heading > :is(small, p, span) { color: var(--en-muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.emi-content { flex: 1 1 auto; min-height: 0; min-width: 0; padding: 16px 20px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--blue-300) transparent; font-size: 12px; line-height: 1.65; }
.emi-content > * + * { margin-top: 14px; }
.emi-content::-webkit-scrollbar, .emi-members-list::-webkit-scrollbar, .emi-review-list::-webkit-scrollbar, .emi-status::-webkit-scrollbar { width: 6px; height: 6px; }
.emi-content::-webkit-scrollbar-track, .emi-members-list::-webkit-scrollbar-track, .emi-review-list::-webkit-scrollbar-track, .emi-status::-webkit-scrollbar-track { background: transparent; }
.emi-content::-webkit-scrollbar-thumb, .emi-members-list::-webkit-scrollbar-thumb, .emi-review-list::-webkit-scrollbar-thumb, .emi-status::-webkit-scrollbar-thumb { border-radius: 99px; background: var(--blue-300); }
.emi-context { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 12px; }
.emi-target, .emi-source { display: grid; align-content: center; min-width: 0; gap: 5px; }
.emi-target { padding: 12px 14px; border: 1px solid var(--en-line); border-radius: 14px; background: var(--surface-control); box-shadow: inset 0 1px 0 var(--glass-line); }
.emi-target > strong { font-size: 14px; line-height: 1.5; color: var(--en-ink); overflow-wrap: anywhere; }
.emi-target > :is(small, span) { color: var(--en-muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.emi-source-note, .emi-warning { padding: 10px 12px; border: 1px solid var(--en-line); border-radius: 12px; background: var(--surface-control); color: var(--en-muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.emi-warning { border-color: color-mix(in srgb, var(--en-warning) 27%, var(--en-line)); background: color-mix(in srgb, var(--en-warning) 5%, var(--surface-control)); color: var(--en-ink); }
.emi-search-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; }
.emi-search-row > .en-input, .emi-search-row > .en-field { flex: 1 1 240px; }
.emi-search-row > :is(small, span) { flex: 0 0 auto; color: var(--en-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.emi-selection { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; min-width: 0; padding: 10px 12px; border: 1px solid var(--en-line); border-radius: 12px; background: var(--surface-control); }
.emi-selection > label { display: inline-flex; align-items: center; gap: 7px; min-width: 0; cursor: var(--site-cursor-pointer, pointer); }
.emi-selection > :is(span, small) { color: var(--en-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.emi-selection strong { color: var(--blue-700); }
.emi-members-list, .emi-review-list, .emi-batch-list { display: grid; gap: 8px; min-width: 0; padding: 0; list-style: none; }
.emi-member { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 12px; border: 1px solid var(--en-line); border-radius: 13px; background: var(--surface-control); cursor: var(--site-cursor-pointer, pointer); transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.emi-member:hover:not(.is-unavailable) { border-color: var(--blue-300); background: var(--surface-tint); }
.emi-member:has(input:checked), .emi-member.is-selected { border-color: var(--blue-300); background: color-mix(in srgb, var(--blue-200) 28%, var(--surface-control)); box-shadow: inset 0 1px 0 var(--glass-line); }
.emi-member:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.emi-member.is-unavailable { cursor: default; background: color-mix(in srgb, var(--surface-control) 65%, transparent); }
.emi-member > :is(.en-avatar, .emi-avatar) { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; overflow: hidden; border-radius: 11px; color: var(--blue-700); background: var(--surface-tint); font-size: 14px; }
.emi-member > img, .emi-member > :is(.en-avatar, .emi-avatar) img { width: 34px; height: 34px; object-fit: cover; border-radius: 11px; }
.emi-member-copy { display: grid; flex: 1 1 120px; min-width: 0; gap: 2px; }
.emi-member-copy > strong { display: block; min-width: 0; color: var(--en-ink); font-size: 13px; line-height: 1.55; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emi-member-copy > :is(small, span) { color: var(--en-muted); font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.emi-member-role { display: inline-flex; flex: 0 0 auto; align-items: center; max-width: 100%; padding: 3px 7px; border: 1px solid var(--en-line); border-radius: 8px; color: var(--blue-700); background: var(--surface-tint); font-size: 10px; line-height: 1.5; white-space: nowrap; }
.emi-member-result { flex: 0 1 180px; min-width: 0; color: var(--emi-state-color, var(--en-muted)); font-size: 11px; line-height: 1.6; text-align: right; overflow-wrap: anywhere; }
.emi-status--imported, .emi-status--accepted { --emi-state-color: var(--en-success); }
.emi-status--pending { --emi-state-color: var(--en-warning); }
.emi-status--blocked, .emi-status--rejected, .emi-status--invalid { --emi-state-color: var(--en-danger); }
.emi-status--existing { --emi-state-color: var(--en-muted); }
.emi-status-pill { display: inline-flex; align-items: center; max-width: 100%; padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--emi-state-color, var(--blue-700)) 23%, var(--en-line)); border-radius: 8px; color: var(--emi-state-color, var(--blue-700)); background: color-mix(in srgb, var(--emi-state-color, var(--blue-700)) 6%, var(--surface-control)); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.emi-owner-section { display: grid; gap: 9px; min-width: 0; padding: 13px 14px; border: 1px solid var(--en-line); border-radius: 14px; background: var(--surface-control); }
.emi-owner-section > :is(header, .emi-owner-heading) { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.emi-owner-section strong { color: var(--en-ink); font-size: 12px; }
.emi-owner-section :is(p, small) { color: var(--en-muted); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.emi-owner-section > .en-field { max-width: 420px; }
.emi-preview-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; min-width: 0; }
.emi-preview-card { display: grid; gap: 4px; min-width: 0; padding: 11px 12px; border: 1px solid var(--en-line); border-radius: 13px; color: var(--en-muted); background: var(--surface-control); font-size: 11px; line-height: 1.5; }
.emi-preview-card strong { color: var(--emi-state-color, var(--blue-700)); font-size: 23px; font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.emi-review-item { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; min-width: 0; padding: 10px 12px; border: 1px solid var(--en-line); border-radius: 12px; background: var(--surface-control); }
.emi-review-item > :is(div, span, p) { min-width: 0; overflow-wrap: anywhere; }
.emi-review-item strong { color: var(--en-ink); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.emi-review-item small { display: block; margin-top: 2px; color: var(--en-muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.emi-review-item .emi-member-result { flex-basis: auto; max-width: 55%; }
.emi-password { width: min(420px, 100%); }
.emi-batch-card { display: grid; gap: 5px; min-width: 0; width: 100%; padding: 13px 14px; border: 1px solid var(--en-line); border-radius: 14px; color: var(--en-ink); background: var(--surface-control); font: inherit; text-align: left; cursor: var(--site-cursor-pointer, pointer); transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.emi-batch-card:hover { border-color: var(--blue-300); background: var(--surface-tint); box-shadow: inset 0 1px 0 var(--glass-line); }
.emi-batch-card:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.emi-batch-card > strong { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.emi-batch-card > :is(small, span, p) { color: var(--en-muted); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.emi-consent-card { display: grid; gap: 14px; min-width: 0; padding: 16px; border: 1px solid var(--en-line); border-radius: 16px; background: var(--surface-control); box-shadow: inset 0 1px 0 var(--glass-line); }
.emi-consent-card > strong { color: var(--en-ink); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.emi-consent-card :is(p, small) { color: var(--en-muted); font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.emi-consent-card dl { display: grid; gap: 11px; min-width: 0; }
.emi-consent-card dl > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: baseline; gap: 8px; min-width: 0; }
.emi-consent-card dt { color: var(--en-muted); font-size: 11px; }
.emi-consent-card dd { margin: 0; min-width: 0; color: var(--en-ink); font-size: 12px; overflow-wrap: anywhere; }
.emi-consent-card .en-inline-actions { justify-content: flex-end; flex-wrap: wrap; }
.emi-pagination { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px 10px; min-width: 0; color: var(--en-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.emi-pagination > span { margin-right: auto; }
.emi-pagination > .en-button { min-height: 32px; padding: 5px 10px; }
.emi-empty { display: grid; min-width: 0; min-height: 150px; place-content: center; gap: 7px; padding: 24px 14px; border: 1px dashed var(--en-line); border-radius: 14px; color: var(--en-muted); font-size: 12px; line-height: 1.7; text-align: center; overflow-wrap: anywhere; }
.emi-empty > strong { color: var(--en-ink); font-size: 14px; }
.emi-status { flex: 0 0 auto; min-width: 0; max-height: 92px; margin: 0; padding: 8px 20px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--blue-300) transparent; color: var(--en-muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.emi-status:empty { display: none; }
.emi-status:is(.error, .is-error, [data-kind="error"]) { color: var(--en-danger); }
.emi-status:is(.success, [data-kind="success"]) { color: var(--en-success); }
.emi-actions { position: relative; z-index: 2; display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 10px; min-width: 0; margin: 0 12px 12px; padding: 12px; border: 1px solid var(--en-line); border-radius: 16px; background: var(--surface-sheet); box-shadow: inset 0 1px 0 var(--glass-line), 0 -5px 18px color-mix(in srgb, var(--accent-shadow) 25%, transparent); }
.emi-actions:empty { display: none; }
.emi-actions > .en-button { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.emi-actions > :is(small, span, p) { flex: 1 1 160px; min-width: 0; color: var(--en-muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.emi-actions .primary { min-width: 126px; }
.emi-panel :is(.emi-member, .emi-batch-card, .en-button):is(:hover, :active, .pressing) { transform: none; }
@media (max-width: 600px) {
  .en-dialog.emi-dialog { width: 100%; height: calc(100dvh - 24px); }
  .emi-toolbar { padding: 10px 12px; gap: 8px; }
  .emi-toolbar > .en-button { min-height: 36px; }
  .emi-content { padding: 12px; }
  .emi-content > * + * { margin-top: 11px; }
  .emi-context { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .emi-search-row > .en-input, .emi-search-row > .en-field { flex-basis: 100%; }
  .emi-selection { padding: 9px 10px; }
  .emi-member { flex-wrap: wrap; gap: 7px 8px; padding: 10px; }
  .emi-member > :is(.en-avatar, .emi-avatar) { flex-basis: 30px; width: 30px; height: 30px; }
  .emi-member > img, .emi-member > :is(.en-avatar, .emi-avatar) img { width: 30px; height: 30px; }
  .emi-member-copy { flex-basis: calc(100% - 82px); }
  .emi-member-role { margin-left: 66px; }
  .emi-member-result { flex: 1 1 90px; text-align: left; }
  .emi-owner-section { padding: 11px 12px; }
  .emi-preview-summary { gap: 7px; }
  .emi-preview-card { padding: 9px; font-size: 10px; }
  .emi-preview-card strong { font-size: 21px; }
  .emi-review-item { padding: 10px; }
  .emi-review-item .emi-member-result { max-width: 100%; text-align: left; }
  .emi-consent-card { gap: 11px; padding: 12px; }
  .emi-consent-card dl > div { grid-template-columns: 66px minmax(0, 1fr); gap: 6px; }
  .emi-status { max-height: 86px; padding: 7px 12px; }
  .emi-actions { margin: 0 8px 8px; padding: 10px; gap: 8px; border-radius: 14px; }
  .emi-actions > .en-button { flex: 1 1 auto; min-height: 40px; }
  .emi-actions > :is(small, span, p) { flex-basis: 100%; }
  .emi-actions .primary { min-width: 0; }
}
@media (max-width: 360px) {
  .emi-preview-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .emi-toolbar > .en-button { flex: 1 1 auto; }
  .emi-heading { flex-basis: 100%; }
  .emi-pagination > span { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .emi-member, .emi-batch-card { transition: none; }
}
