.operations-access-registry { min-width: 0; }

.operations-access-hero .workspace-hero-copy .eyebrow { color: var(--hero-kicker); }
.operations-access-hero .workspace-hero-copy > p:last-child { color: var(--hero-muted); }

.operations-access-summary {
  display: grid;
  width: min(100%, 420px);
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-self: end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 15px;
  background: rgba(255, 255, 255, .045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(12px);
}

.operations-access-metric {
  display: grid;
  min-width: 0;
  min-height: var(--hero-kpi-min-height);
  grid-template-rows: var(--hero-kpi-label-height) auto var(--hero-kpi-label-height);
  align-content: center;
  justify-items: center;
  padding: var(--hero-kpi-padding);
  border-right: 1px solid rgba(255, 255, 255, .1);
  text-align: center;
}

.operations-access-metric:last-of-type { border-right: 0; }
.operations-access-metric span,
.operations-access-metric small {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  color: #b8bcb0;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  line-height: var(--leading-ui);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  text-wrap: balance;
}
.operations-access-metric strong {
  display: block;
  align-self: center;
  margin: 6px 0;
  font-size: var(--hero-kpi-value-size);
  letter-spacing: var(--tracking-heading);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.operations-access-metric small {
  align-self: start;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.operations-access-readonly {
  grid-column: 1 / -1;
  padding: 7px 12px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #c0c3b9;
  font-size: var(--text-xs);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--tracking-label);
  text-align: center;
  text-transform: uppercase;
}

.operations-access-content { min-width: 0; margin-top: 16px; }

.operations-access-toolbar {
  display: grid;
  grid-template-columns: minmax(230px, 1.35fr) minmax(150px, .75fr) minmax(170px, .8fr) minmax(150px, .7fr) minmax(150px, .72fr) auto;
  align-items: end;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--panel-border);
  border-radius: 16px 16px 0 0;
  background: var(--panel-surface);
}

.operations-access-field { min-width: 0; }
.operations-access-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.operations-access-field input,
.operations-access-field select,
.operations-access-field textarea { width: 100%; min-height: 44px; }
.operations-access-field small {
  display: block;
  margin-top: 6px;
  color: var(--subtle);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
}

.operations-access-toolbar-meta {
  display: grid;
  min-width: 92px;
  gap: 6px;
}
.operations-access-count {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.operations-access-reset { min-height: 44px; }

.operations-access-results { min-width: 0; }
.operations-access-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--panel-border);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: var(--panel-surface);
  box-shadow: var(--shadow-panel);
}

.operations-access-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: var(--text-md);
}

.operations-access-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 50px;
  padding: var(--space-2) var(--space-3);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border-strong);
  background: var(--table-head-surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--tracking-label);
  line-height: var(--leading-ui);
  text-align: left;
  text-transform: uppercase;
  vertical-align: middle;
}

.operations-access-table td {
  height: 72px;
  padding: var(--space-3);
  overflow: hidden;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  line-height: var(--leading-body);
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.operations-access-table th:last-child,
.operations-access-table td:last-child { border-right: 0; }
.operations-access-table thead th:last-child {
  position: sticky;
  z-index: 4;
  right: 0;
  background: var(--table-head-surface);
}
.operations-access-table tbody tr:not(.operations-access-inline-feedback-row, .operations-access-state-row) td:last-child {
  position: sticky;
  z-index: 1;
  right: 0;
  background: var(--panel-surface);
  box-shadow: -1px 0 0 var(--border);
}
.operations-access-table tbody tr:not(.operations-access-inline-feedback-row, .operations-access-state-row):hover td:last-child {
  background: var(--surface-hover);
}
.operations-access-table tbody tr:last-child td { border-bottom: 0; }
.operations-access-table tbody tr { transition: background-color 130ms ease-out; }
.operations-access-table tbody tr:hover td { background: var(--surface-hover); }
.operations-access-table th:nth-child(1) { width: 13%; }
.operations-access-table th:nth-child(2) { width: 8%; }
.operations-access-table th:nth-child(3) { width: 8%; }
.operations-access-table th:nth-child(4) { width: 12%; }
.operations-access-table th:nth-child(5) { width: 9%; }
.operations-access-table th:nth-child(6) { width: 9%; }
.operations-access-table th:nth-child(7),
.operations-access-table th:nth-child(8),
.operations-access-table th:nth-child(9) { width: 4%; text-align: center; }
.operations-access-table th:nth-child(10) { width: 8%; }
.operations-access-table th:nth-child(11) { width: 9%; }
.operations-access-table th:nth-child(12) { width: 12%; text-align: center; }

.operations-access-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}
.operations-access-person strong {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}
.operations-access-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--tracking-label);
}
.operations-access-identifier {
  display: block;
  min-width: 0;
  max-width: 100%;
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
  white-space: normal;
}
.operations-access-notes {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.operations-access-check-cell { text-align: center; }
.operations-access-checkbox {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}
.operations-access-checkbox:disabled { opacity: 1; }

.operations-access-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}
.operations-access-status.is-active {
  border-color: var(--state-success-border);
  background: var(--state-success-bg);
  color: var(--state-success-text);
}
.operations-access-status.is-inactive {
  border-color: var(--state-neutral-border);
  background: var(--state-neutral-bg);
  color: var(--state-neutral-text);
}
.operations-access-status.is-risk {
  border-color: var(--state-danger-border);
  background: var(--state-danger-bg);
  color: var(--state-danger-text);
}
.operations-access-offboarding-warning {
  max-width: 620px;
  margin-top: 10px !important;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--border));
  border-radius: 9px;
  background: color-mix(in srgb, var(--danger) 8%, var(--surface-strong));
  color: var(--danger) !important;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.operations-access-action-cell { min-width: 196px; padding-inline: 12px; text-align: center; }
.operations-access-actions {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.operations-access-open { width: 100%; min-height: var(--control-height-sm); padding: var(--control-padding-block) var(--control-padding-inline); font-size: var(--text-xs); }
.operations-access-actions .operations-access-open { width: auto; min-width: 78px; }
.operations-access-edit-trigger,
.operations-access-delete-trigger {
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-inline-start: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.operations-access-edit-trigger .ui-icon,
.operations-access-delete-trigger .ui-icon {
  display: block;
  margin: 0;
  vertical-align: 0;
}
.operations-access-edit-trigger:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.operations-access-delete-trigger { color: var(--danger); }
.operations-access-delete-trigger:hover {
  border-color: var(--state-danger-border);
  background: var(--state-danger-bg);
}

.operations-access-delete-dialog {
  width: min(540px, calc(100vw - 24px));
  overflow: hidden;
}
.operations-access-delete-content {
  display: grid;
  gap: 20px;
  padding: clamp(22px, 4vw, 32px);
  text-align: center;
}
.operations-access-delete-content .dialog-header {
  display: grid;
  justify-items: center;
}
.operations-access-delete-content .dialog-header p { max-width: 52ch; }
.operations-access-delete-content .operation-status:empty { display: none; }
.operations-access-delete-content .dialog-actions {
  justify-content: center;
  margin-top: 0;
  gap: 10px;
}
.operations-access-delete-content .dialog-actions button { min-width: 170px; }

.operations-access-edit-row td {
  height: auto;
  min-height: 84px;
  overflow: visible;
  background: var(--surface-muted);
}
.operations-access-edit-row:hover td { background: var(--surface-muted) !important; }
.operations-access-table tbody .operations-access-edit-row td:last-child,
.operations-access-table tbody .operations-access-edit-row:hover td:last-child { background: var(--surface-muted) !important; }
.operations-access-inline-control {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 7px 8px;
  font-size: var(--text-sm);
}
.operations-access-edit-row textarea.operations-access-inline-control {
  min-height: 64px;
  resize: vertical;
}
.operations-access-edit-row input[type="checkbox"].operations-access-inline-control {
  width: 20px;
  min-height: 20px;
  padding: 0;
  accent-color: var(--accent);
}
.operations-access-inline-actions {
  display: grid;
  min-width: 104px;
  gap: 7px;
}
.operations-access-inline-actions button {
  min-height: 34px;
  padding: 6px 8px;
  font-size: var(--text-xs);
}
.operations-access-inline-feedback-row td {
  height: auto;
  min-height: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}
.operations-access-inline-feedback-row:hover td { background: var(--surface-muted) !important; }
.operations-access-inline-feedback-row.is-success td { background: var(--state-success-bg); }
.operations-access-inline-feedback-row.is-success:hover td { background: var(--state-success-bg) !important; }
.operations-access-inline-feedback:empty { display: none; }
.operations-access-inline-feedback,
.operations-access-inline-feedback-row.is-success .operations-access-inline-message {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  padding: 8px var(--space-3);
  color: var(--muted);
  font-size: var(--text-sm);
}
.operations-access-inline-feedback[data-state="loading"] { color: var(--text); }
.operations-access-inline-feedback[data-state="error"] {
  border-left: 3px solid var(--state-danger-text);
  color: var(--state-danger-text);
}
.operations-access-inline-feedback-row.is-success .operations-access-inline-message {
  color: var(--state-success-text);
  font-weight: var(--weight-bold);
}
.operations-access-inline-message { margin: 0; }
.operations-access-inline-refresh { min-height: 34px; margin-inline-start: auto; white-space: nowrap; }

.operations-access-table-wrap.has-operations-access-state { container-type: inline-size; }
.operations-access-state-cell {
  height: 210px !important;
  padding: 24px !important;
  text-align: left;
}
.operations-access-state-cell > .state-kit {
  position: sticky;
  left: max(24px, calc(50cqw - 310px));
  width: 620px;
  max-width: calc(100cqw - 48px);
  margin-left: max(0px, calc(50cqw - 334px));
}

.operations-access-dialog {
  width: min(780px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: auto;
}
.operations-access-dialog-header {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-6) var(--dialog-padding-inline) var(--space-5);
  border-bottom: 1px solid var(--border);
  background: var(--dialog-chrome-bg);
  backdrop-filter: blur(14px);
}
.operations-access-dialog-header > div { min-width: 0; max-width: 100%; }
.operations-access-dialog-header h2 {
  margin: 3px 0 7px;
  font-size: var(--text-display-workspace);
  letter-spacing: var(--tracking-heading);
}
.operations-access-dialog-header p:last-child { margin: 0; color: var(--muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.operations-access-form { display: grid; gap: 18px; }
.operations-access-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px 28px 0;
}
.operations-access-form-grid > :nth-child(3),
.operations-access-form-grid > :nth-child(4),
.operations-access-form-grid > :nth-child(5) { grid-column: 1 / -1; }
.operations-access-form textarea { min-height: 96px; resize: vertical; }
.operations-access-form :disabled { opacity: var(--control-disabled-field-opacity); cursor: not-allowed; }
.operations-access-form button:disabled { opacity: var(--control-disabled-action-opacity); }
.operations-access-form .operations-access-checkbox:disabled { opacity: 1; }
.operations-access-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: -4px 0 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
}
.operations-access-checks legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.operations-access-checks label {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}
.operations-access-checks label:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.operations-access-checks label:has(input:checked) { border-color: var(--state-accent-border); background: var(--state-accent-bg); color: var(--state-accent-text); }
.operations-access-checks label:has(input:focus-visible) { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.operations-access-checks input { width: 19px; height: 19px; accent-color: var(--accent); }
.operations-access-form-feedback { min-height: 20px; margin: 0 28px; color: var(--muted); font-size: var(--text-sm); }
.operations-access-progress-message { margin: 0; }
.operations-access-validation-message {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--state-danger-text);
  background: var(--state-danger-bg);
  color: var(--state-danger-text);
}
.operations-access-form-state { margin: 0; }
.operations-access-form .dialog-actions { margin: 0; padding: 0 28px 28px; }

.operations-access-loading {
  display: grid;
  min-height: 260px;
  align-content: center;
  gap: 12px;
  padding: 30px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel-surface);
}
.operations-access-loading-hero,
.operations-access-loading-line {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-muted), var(--surface-hover), var(--surface-muted));
  background-size: 200% 100%;
  animation: operations-access-shimmer 1.25s linear infinite;
}
.operations-access-loading-hero { height: 150px; }
.operations-access-loading-line { height: 18px; }
.operations-access-loading-line.is-short { width: 62%; }

@keyframes operations-access-shimmer { to { background-position: -200% 0; } }

@media (max-width: 1320px) {
  .operations-access-toolbar { grid-template-columns: minmax(240px, 1.35fr) repeat(2, minmax(160px, 1fr)); }
  .operations-access-toolbar-meta { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .operations-access-summary { width: 100%; }
  .operations-access-toolbar { grid-template-columns: 1fr 1fr; border-radius: 14px; }
  .operations-access-toolbar .operations-access-field:first-child { grid-column: 1 / -1; }
  .operations-access-toolbar-meta { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; align-items: center; }
  .operations-access-table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .operations-access-table { display: block; min-width: 0; }
  .operations-access-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .operations-access-table tbody { display: grid; gap: 10px; }
  .operations-access-table tr {
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(21, 22, 18, .045);
  }
  .operations-access-table td {
    display: grid;
    width: auto;
    min-width: 0;
    grid-template-columns: minmax(128px, .42fr) minmax(0, 1fr);
    gap: 12px;
    height: auto;
    min-height: 50px;
    align-items: center;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    text-align: left;
  }
  .operations-access-table td > * { min-width: 0; max-width: 100%; }
  .operations-access-table thead th:last-child,
  .operations-access-table tbody tr:not(.operations-access-inline-feedback-row, .operations-access-state-row) td:last-child {
    position: static;
    box-shadow: none;
  }
  .operations-access-table td::before {
    color: var(--subtle);
    font-size: var(--text-xs);
    font-weight: var(--weight-heavy);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    content: attr(data-label);
  }
  .operations-access-table tbody tr:hover td { background: transparent; }
  .operations-access-check-cell { text-align: left; }
  .operations-access-action-cell { display: block !important; }
  .operations-access-action-cell::before { display: none; }
  .operations-access-actions { justify-content: flex-start; }
  .operations-access-edit-trigger { margin-inline-start: 0; }
  .operations-access-edit-row { border-radius: 13px 13px 0 0 !important; }
  .operations-access-edit-row td { overflow: hidden; }
  .operations-access-inline-actions { grid-template-columns: 1fr 1fr; }
  .operations-access-inline-feedback-row {
    margin-top: -10px;
    border-top: 0 !important;
    border-radius: 0 0 13px 13px !important;
  }
  .operations-access-inline-feedback-cell {
    display: block !important;
    padding: 0 !important;
    border-bottom: 0 !important;
  }
  .operations-access-inline-feedback-cell::before { display: none; }
  .operations-access-state-cell {
    display: block !important;
    width: 100%;
    min-height: 0;
  }
  .operations-access-state-cell::before { display: none; }
  .operations-access-state-cell > .state-kit {
    position: static;
    width: 100%;
    max-width: none;
    margin-left: 0;
  }
  .operations-access-notes { display: block; overflow: visible; -webkit-line-clamp: unset; }
}

@media (max-width: 560px) {
  .operations-access-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .operations-access-metric { padding: 13px 10px; }
  .operations-access-metric strong { font-size: var(--text-2xl); }
  .operations-access-toolbar { grid-template-columns: 1fr; }
  .operations-access-toolbar .operations-access-field:first-child,
  .operations-access-toolbar-meta { grid-column: auto; }
  .operations-access-toolbar-meta { grid-template-columns: 1fr; }
  .operations-access-table td { grid-template-columns: 112px minmax(0, 1fr); }
  .operations-access-form-grid { grid-template-columns: 1fr; padding: 20px 20px 0; }
  .operations-access-form-grid > * { grid-column: auto !important; }
  .operations-access-checks { grid-template-columns: 1fr; }
  .operations-access-dialog { width: calc(100vw - 14px); max-height: calc(100dvh - 14px); }
  .operations-access-dialog-header { padding: 20px; }
  .operations-access-form-feedback { margin-inline: 20px; }
  .operations-access-form .dialog-actions { padding: 0 20px 20px; }
}

@media (max-width: 480px) {
  .operations-access-summary { grid-template-columns: 1fr; }
  .operations-access-metric {
    min-height: 0;
    grid-template-rows: auto auto;
    grid-template-columns: 1fr auto;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    text-align: left;
  }
  .operations-access-metric span,
  .operations-access-metric small { justify-content: flex-start; }
  .operations-access-metric strong { grid-row: 1 / span 2; grid-column: 2; margin: 0; }
  .operations-access-metric:last-of-type { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .operations-access-loading-hero,
  .operations-access-loading-line { animation: none; }
  .operations-access-table tbody tr { transition: none; }
}
