.access-email-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 14px;
  color: #7a4d0b;
  background: #fff8e8;
  border: 1px solid #ecd7a5;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(24, 38, 56, .04);
}
.access-email-warning > span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  color: #b86a11;
  background: rgba(255, 255, 255, .72);
  border-radius: 8px;
}
.access-email-warning svg { width: 16px; height: 16px; }
.access-email-warning strong { display: block; font-size: .84rem; }
.access-email-warning p { margin: 2px 0 0; font-size: .76rem; line-height: 1.4; }

.access-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce4ec;
  border-radius: 15px;
  box-shadow: 0 10px 28px rgba(26, 45, 67, .055);
}
.access-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(150px, .8fr)) auto;
  gap: 8px;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid #e4eaf0;
  background: #fbfcfe;
}
.access-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  color: #617285;
  background: #fff;
  border: 1px solid #ced8e2;
  border-radius: 9px;
}
.access-search:focus-within {
  border-color: #2d78a8;
  box-shadow: 0 0 0 3px rgba(45, 120, 168, .12);
}
.access-search svg { width: 15px; height: 15px; flex: 0 0 auto; }
.access-search input {
  min-width: 0;
  width: 100%;
  height: 34px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: .79rem;
}
.access-filters select {
  min-width: 0;
  height: 36px;
  padding: 0 30px 0 10px;
  color: #27384b;
  background-color: #fff;
  border: 1px solid #ced8e2;
  border-radius: 9px;
  font: inherit;
  font-size: .77rem;
}
.access-result-count {
  justify-self: end;
  padding: 5px 9px;
  color: #5f6f80;
  background: #eef3f7;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.access-table-scroll {
  width: 100%;
  overflow-x: auto;
  scrollbar-color: #9dabb9 #eef2f5;
  scrollbar-width: thin;
}
.access-table {
  width: 100%;
  min-width: 1110px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  color: #26384a;
  font-size: .78rem;
}
.access-col-name { width: 15%; }
.access-col-email { width: 18%; }
.access-col-function { width: 15%; }
.access-col-process { width: 7%; }
.access-col-role { width: 12%; }
.access-col-status { width: 15%; }
.access-col-login { width: 13%; }
.access-col-actions { width: 5%; }
.access-table th {
  height: 39px;
  padding: 0 10px;
  color: #3a5269;
  background: #edf4f8;
  border-bottom: 1px solid #cedbe5;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .025em;
  line-height: 1.2;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.access-table th:first-child { padding-left: 15px; }
.access-table th:last-child { text-align: center; }
.access-table td {
  height: 54px;
  padding: 7px 10px;
  vertical-align: middle;
  border-bottom: 1px solid #e8edf2;
  background: #fff;
}
.access-table td:first-child { padding-left: 15px; }
.access-table tbody tr:last-child td { border-bottom: 0; }
.access-table tbody tr:hover td { background: #f7fbfd; }
.access-table tbody tr:focus-within td { background: #f3f9fc; }
.access-truncate {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.access-name-button {
  display: block;
  overflow: hidden;
  width: 100%;
  padding: 0;
  color: #153b5b;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.access-name-button:hover,
.access-name-button:focus-visible { color: #2875a4; text-decoration: underline; text-underline-offset: 2px; }
.access-email-cell .access-truncate { color: #596b7e; }
.access-process {
  display: inline-flex;
  justify-content: center;
  min-width: 42px;
  padding: 4px 7px;
  color: #174b70;
  background: #e8f3f9;
  border: 1px solid #c8e0ed;
  border-radius: 7px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.access-status {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .67rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.access-status > span {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}
.access-status--gray { color: #667381; background: #f1f3f5; border-color: #d9dfe4; }
.access-status--blue { color: #176490; background: #e8f4fb; border-color: #bfdeef; }
.access-status--orange { color: #a45a0b; background: #fff3df; border-color: #efd3a5; }
.access-status--green { color: #237148; background: #e8f6ee; border-color: #bfe3ce; }
.access-status--red { color: #a83e47; background: #fbecee; border-color: #efc5ca; }
.access-status:focus-visible { outline: 2px solid #2d78a8; outline-offset: 2px; }
.access-last-login { display: block; white-space: nowrap; color: #506275; }
.access-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  padding: 5px 8px;
  text-align: center;
  box-shadow: -7px 0 12px -13px rgba(20, 43, 64, .9);
}
.access-table th:last-child {
  position: sticky;
  right: 0;
  z-index: 3;
  box-shadow: -7px 0 12px -13px rgba(20, 43, 64, .9);
}
.access-more-button {
  display: inline-grid;
  place-items: center;
  width: 33px;
  height: 31px;
  padding: 0 0 7px;
  color: #164f75;
  background: #eef5f9;
  border: 1px solid #c9dce8;
  border-radius: 8px;
  font: 800 1.35rem/1 sans-serif;
  cursor: pointer;
}
.access-more-button:hover,
.access-more-button:focus-visible,
.access-more-button[aria-expanded="true"] {
  color: #fff;
  background: #174f75;
  border-color: #174f75;
  outline: 0;
}
.access-action-menu {
  position: fixed;
  z-index: 1500;
  width: 252px;
  padding: 6px;
  background: #fff;
  border: 1px solid #d2dde6;
  border-radius: 11px;
  box-shadow: 0 18px 45px rgba(19, 39, 59, .2);
}
.access-action-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 35px;
  padding: 7px 10px;
  color: #273a4c;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-size: .78rem;
  text-align: left;
  cursor: pointer;
}
.access-action-menu button:hover,
.access-action-menu button:focus-visible { background: #edf5f9; outline: 0; }
.access-action-menu button.danger { color: #a33c45; }
.access-action-menu button.danger:hover,
.access-action-menu button.danger:focus-visible { background: #fcecee; }
.access-action-menu svg { width: 15px; height: 15px; flex: 0 0 auto; }
.access-empty,
.access-no-result {
  padding: 22px;
  color: #637486;
  text-align: center;
  font-size: .8rem;
}

.access-user-modal { width: min(840px, calc(100vw - 28px)); }
.access-detail-modal { width: min(760px, calc(100vw - 28px)); }
.access-manual-link-modal { width: min(720px, calc(100vw - 28px)); }
.access-manual-invite-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #c9dfeb;
  border-radius: 10px;
  background: #f1f8fb;
  color: #183f5d;
}
.access-manual-invite-note > svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; color: #24759e; }
.access-manual-invite-note strong { display: block; font-size: .85rem; }
.access-manual-invite-note p { margin: 3px 0 0; font-size: .78rem; line-height: 1.45; }
.access-manual-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.access-manual-link-row input { min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .76rem; }
.access-manual-link-row .secondary-button { white-space: nowrap; }
.access-readonly-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.access-readonly-status small { color: #6d7c8b; font-size: .68rem; }
.access-permissions {
  margin-top: 15px;
  border: 1px solid #dae3eb;
  border-radius: 10px;
}
.access-permissions summary {
  padding: 10px 12px;
  color: #24445e;
  background: #f4f8fa;
  border-radius: 10px;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
}
.access-permissions[open] summary { border-bottom: 1px solid #dae3eb; border-radius: 10px 10px 0 0; }
.access-permissions .permission-matrix { max-height: 300px; overflow-y: auto; padding: 10px; }
.access-detail-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) .6fr 1fr auto;
  gap: 10px;
  padding: 12px;
  background: #f4f8fb;
  border: 1px solid #dce6ed;
  border-radius: 11px;
}
.access-detail-summary > div { min-width: 0; }
.access-detail-summary small {
  display: block;
  margin-bottom: 4px;
  color: #718191;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.access-detail-summary strong {
  display: block;
  overflow: hidden;
  color: #25394b;
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.access-invitation-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  padding: 8px 10px;
  color: #236847;
  background: #eaf7ef;
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 700;
}
.access-invitation-summary svg { width: 15px; height: 15px; }
.access-history { margin-top: 16px; }
.access-section-title h3 { margin: 0; color: #21394e; font-size: .92rem; }
.access-section-title p { margin: 3px 0 0; color: #708091; font-size: .72rem; }
.access-history ol {
  position: relative;
  margin: 12px 0 0 7px;
  padding: 0 0 0 18px;
  list-style: none;
}
.access-history ol::before {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 1px;
  background: #d7e1e9;
  content: "";
}
.access-history-item {
  position: relative;
  min-height: 43px;
  padding: 0 0 12px 4px;
}
.access-history-dot {
  position: absolute;
  top: 4px;
  left: -18px;
  z-index: 1;
  width: 9px;
  height: 9px;
  background: #6b8294;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #b9c8d4;
}
.access-history-item--sent .access-history-dot { background: #2b7a54; }
.access-history-item--failed .access-history-dot,
.access-history-item--rejected .access-history-dot { background: #b3414b; }
.access-history-item--deferred .access-history-dot { background: #ba6b10; }
.access-history-item strong { display: inline; color: #293d4e; font-size: .76rem; }
.access-history-item time { margin-left: 7px; color: #718191; font-size: .68rem; }
.access-history-item p {
  overflow: hidden;
  margin: 3px 0 0;
  color: #607183;
  font-size: .7rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1220px) {
  .access-filters { grid-template-columns: minmax(220px, 1.3fr) repeat(2, minmax(145px, .8fr)) auto; }
  #access-role { display: none; }
  .access-table { min-width: 860px; }
  .access-col-name { width: 21%; }
  .access-col-email { width: 23%; }
  .access-col-function { width: 19%; }
  .access-col-process { width: 9%; }
  .access-col-role { width: 0; }
  .access-col-status { width: 18%; }
  .access-col-login { width: 0; }
  .access-col-actions { width: 10%; }
  .access-table th:nth-child(5), .access-table td:nth-child(5),
  .access-table th:nth-child(7), .access-table td:nth-child(7) { display: none; }
}
@media (max-width: 780px) {
  .access-manual-link-row { grid-template-columns: 1fr; }
  .access-filters { grid-template-columns: 1fr 1fr; }
  .access-search { grid-column: 1 / -1; }
  .access-result-count { justify-self: start; }
  .access-table { min-width: 590px; }
  .access-col-name { width: 28%; }
  .access-col-email { width: 0; }
  .access-col-function { width: 27%; }
  .access-col-process { width: 0; }
  .access-col-status { width: 31%; }
  .access-col-actions { width: 14%; }
  .access-table th:nth-child(2), .access-table td:nth-child(2),
  .access-table th:nth-child(4), .access-table td:nth-child(4) { display: none; }
  .access-detail-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .access-email-warning { margin-inline: 0; }
  .access-filters { grid-template-columns: 1fr; }
  .access-search { grid-column: auto; }
  .access-filters select { width: 100%; }
  .access-result-count { justify-self: start; }
  .access-table { min-width: 0; }
  .access-col-name { width: 31%; }
  .access-col-function { width: 27%; }
  .access-col-status { width: 31%; }
  .access-col-actions { width: 11%; }
  .access-table th, .access-table td { padding-inline: 6px; }
  .access-table th { font-size: .58rem; }
  .access-table td { font-size: .7rem; }
  .access-table th:first-child, .access-table td:first-child { padding-left: 8px; }
  .access-status { padding: 4px 5px; font-size: .59rem; }
  .access-status > span { display: none; }
  .access-more-button { width: 29px; }
  .access-detail-summary { grid-template-columns: 1fr; }
}
