/* Fusion access administration uses the existing shell, palette and typography. */
.access-workspace { color: var(--ui-fg); min-width: 0; font-size: 14px; }
.access-workspace, .access-sheet { --access-muted: var(--ui-secondary, #526175); accent-color: var(--fusion-accent); caret-color: var(--fusion-accent); }
.access-workspace ::selection, .access-sheet ::selection { background: var(--fusion-accent); color: white; }
.access-workspace :focus-visible, .access-sheet :focus-visible { outline: 2px solid var(--fusion-accent); outline-offset: 3px; }
.access-workspace :is(input,select), .access-sheet :is(input,select,textarea) { box-sizing: border-box; min-height: 40px; border: 1px solid var(--ui-line); border-radius: 6px; padding: 8px 10px; background: var(--ui-bg); color: var(--ui-fg); font: inherit; max-width: 100%; }
.access-workspace input::placeholder, .access-sheet input::placeholder { color: var(--access-muted); opacity: 1; }
.access-workspace label, .access-sheet label { display: grid; gap: 6px; font-weight: 500; min-width: 0; }
.access-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 22px; }
.access-toolbar .access-search { flex: 1 1 260px; }
.access-toolbar > label { flex: 0 1 160px; }
.access-toolbar .btn { min-height: 40px; }
.access-table-wrap { overflow: auto; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-bg); }
.access-table { border-collapse: collapse; width: 100%; text-align: left; font-variant-numeric: tabular-nums; }
.access-table th { font-size: 12px; font-weight: 600; color: var(--access-muted); background: var(--ui-bg-soft, var(--ui-bg)); }
.access-table :is(th,td) { padding: 14px 16px; border-bottom: 1px solid var(--ui-line); vertical-align: top; }
.access-table tr:last-child td { border-bottom: 0; }
.access-table td { line-height: 1.55; }
.access-table tbody tr:hover { background: color-mix(in srgb, var(--fusion-accent) 4%, var(--ui-bg)); }
.access-person { display: grid; gap: 2px; min-width: 180px; }
.access-person span, .access-note, .access-empty p, .access-sheet small { color: var(--access-muted); }
.access-person span { font-size: 12px; overflow-wrap: anywhere; }
.access-inline-list { display: grid; gap: 4px; min-width: 100px; }
.access-status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.access-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.access-status[data-active=true] { color: #16734d; }
.theme-dark .access-status[data-active=true] { color: #66d9a8; }
.access-status[data-active=false] { color: var(--access-muted); }
.access-row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.access-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; color: var(--access-muted); }
.access-pagination > div { display: flex; align-items: center; gap: 12px; }
.access-empty { padding: 48px 24px; text-align: center; }
.access-empty h2 { margin: 0 0 8px; font-size: 18px; }
.access-empty p { margin: 0 auto 18px; max-width: 55ch; line-height: 1.6; }
.access-error { color: #b42318; line-height: 1.5; }
.theme-dark .access-error { color: #ffaaa3; }
.access-note { font-size: 13px; line-height: 1.6; max-width: 72ch; }
.access-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.access-section-heading p { margin: 0; }
.access-role-list { border-top: 1px solid var(--ui-line); }
.access-role { padding: 20px 0; border-bottom: 1px solid var(--ui-line); display: grid; grid-template-columns: minmax(180px,1fr) 2fr auto; gap: 24px; }
.access-role h2 { margin: 0 0 6px; font-size: 15px; }
.access-role p { margin: 0; }
.access-role details { margin-top: 10px; }
.access-role summary { cursor: pointer; color: var(--fusion-accent); }
.access-role ul { margin: 10px 0 0; padding-left: 20px; line-height: 1.8; }
.access-sheet { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(640px,100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; box-sizing: border-box; padding: 0; border: 0; border-left: 1px solid var(--ui-line); border-radius: 0; color: var(--ui-fg); background: var(--ui-bg); font: inherit; }
.access-sheet[open] { display: flex; flex-direction: column; }
.access-sheet::backdrop { background: rgb(6 18 35 / .46); }
.access-sheet > header { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 24px; border-bottom: 1px solid var(--ui-line); flex-shrink: 0; }
.access-sheet h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.access-sheet header p { margin: 6px 0 0; }
.access-sheet form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.access-sheet-body { overflow: auto; padding: 24px; min-height: 0; flex: 1; scrollbar-color: var(--ui-line) var(--ui-bg); scrollbar-width: thin; }
.access-sheet footer { padding: 16px 24px; border-top: 1px solid var(--ui-line); background: var(--ui-bg); flex-shrink: 0; }
.access-sheet footer .access-row-actions { justify-content: flex-end; }
.access-sheet footer [role=alert]:empty { display: none; }
.access-sheet fieldset { padding: 0; margin: 0 0 28px; border: 0; min-width: 0; }
.access-sheet legend { font-size: 16px; font-weight: 600; margin-bottom: 12px; padding: 0; }
.access-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.access-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.access-sheet .access-check { display: flex; align-items: center; gap: 8px; font-weight: 400; min-height: 32px; }
.access-check input { width: 17px; min-height: 17px; margin: 0; }
.access-assignment { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--ui-line); }
.access-assignment .access-field-grid { margin: 12px 0; }
.access-assignment-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.access-assignment-head label { flex: 1; }
.access-effective { margin: 20px 0; padding: 16px 0; border-block: 1px solid var(--ui-line); }
.access-effective ul, .access-preview ul { padding-left: 20px; line-height: 1.7; }
.access-sheet textarea { width: 100%; min-height: 80px; resize: vertical; }
.access-sheet select[multiple] { min-height: 110px; width: 100%; }
.access-unsaved { padding: 12px 24px; border-bottom: 1px solid var(--ui-line); background: var(--ui-bg); }
.access-unsaved p { margin: 0 0 8px; }
.access-subnav { display: grid; gap: 2px; padding-left: 26px; }
.access-subnav .sidebar-nav-item { font-size: 13px; }
@media (max-width: 760px) {
  .access-toolbar > label { flex: 1 1 140px; }
  .access-toolbar .access-search { flex-basis: 100%; }
  .access-table { min-width: 680px; }
  .access-table :is(th,td) { padding: 12px; }
  .access-pagination { align-items: start; flex-direction: column; }
  .access-role { grid-template-columns: 1fr; gap: 10px; }
  .access-section-heading { align-items: start; }
  .access-sheet > header, .access-sheet-body { padding: 20px; }
  .access-field-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .access-sheet[open] { animation: access-open .18s cubic-bezier(.16,1,.3,1); }
  @keyframes access-open { from { translate: 24px 0; } to { translate: 0 0; } }
}
