.access-panel {
  padding: 24px;
  margin-bottom: 24px;
  color: #102039;
}
.access-heading,
.access-toolbar,
.access-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.access-heading {
  align-items: flex-start;
  margin-bottom: 20px;
}
.access-heading h2 {
  margin: 5px 0;
  font-size: 23px;
  letter-spacing: -0.04em;
}
.access-heading p,
.access-toolbar p {
  color: #526581;
  font-size: 13px;
  line-height: 1.6;
}
.access-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.access-actions .button {
  font-size: 12px;
}
.access-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid #dce4ee;
  gap: 4px;
}
.access-tabs button {
  padding: 13px 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #526581;
  cursor: pointer;
  white-space: nowrap;
}
.access-tabs button.active {
  color: #102039;
  border-bottom-color: #2563eb;
}
.access-content {
  padding-top: 20px;
}
.access-member {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(160px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #e8edf4;
}
.access-member strong,
.access-role-card h3 {
  font-size: 14px;
}
.access-member small,
.access-role-card small,
.access-table small {
  display: block;
  color: #526581;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.access-tag {
  display: inline-block;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #edf2fa;
  color: #345276;
}
.access-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.access-role-card {
  border: 1px solid #dce4ee;
  border-top: 3px solid #102039;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.access-role-card h3 {
  margin: 0;
}
.access-role-card p {
  color: #526581;
  font-size: 12px;
  margin: 0;
}
.access-role-card .access-actions {
  margin-top: auto;
  padding-top: 12px;
}
.access-scope {
  font-size: 21px;
  letter-spacing: -0.025em;
}
.access-dialog {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 24px;
}
.access-dialog-head {
  border-bottom: 1px solid #dce4ee;
  padding-bottom: 14px;
  margin-bottom: 20px;
}
.access-dialog-head h2 {
  font-size: 21px;
  margin: 0;
}
.access-form {
  display: grid;
  gap: 16px;
}
.access-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
}
.access-field > span {
  font-weight: 600;
  color: #345276;
}
.access-field input,
.access-field select,
.access-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 9px 12px;
  background: #fff;
  color: #102039;
  border: 1px solid #cbd7e7;
  border-radius: 7px;
  font: inherit;
}
.access-field input[readonly],
.access-field select:disabled {
  background: #f4f7fa;
  color: #526581;
}
.access-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.access-checkbox input,
.access-table input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}
.access-menu-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  padding: 18px;
  border: 1px solid #dce4ee;
  border-radius: 8px;
}
.access-callout {
  background: #f4f7fa;
  border-left: 3px solid #2563eb;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: #345276;
}
.access-department-tree {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid #dce4ee;
  border-radius: 8px;
}
.access-department-tree legend { padding: 0 6px; font-size: 13px; font-weight: 600; }
.access-department-tree p, .access-tree-node small { color: #526581; font-size: 12px; line-height: 1.6; }
.access-tree-node { padding: 10px 12px; border-top: 1px solid #e8edf4; flex-wrap: wrap; overflow-wrap: anywhere; }
.access-tree-node input { flex-shrink: 0; }
.access-tree-node:focus-within { outline: 2px solid #2563eb; outline-offset: -2px; }
.access-assignment {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 14px;
  margin: 18px 0;
}
.access-table-wrap {
  overflow-x: auto;
}
.access-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.access-table th {
  background: #f4f7fa;
  font-size: 12px;
  font-weight: 600;
  color: #526581;
}
.access-table th,
.access-table td {
  padding: 12px;
  border-bottom: 1px solid #e8edf4;
}
.access-table th:first-child {
  width: 36px;
}
.access-table td:nth-child(2) {
  min-width: 170px;
  max-width: 360px;
  overflow-wrap: anywhere;
}
.access-empty {
  color: #526581;
  padding: 32px 12px;
  text-align: center;
  font-size: 13px;
}
.access-content > .access-toolbar {
  margin-top: 14px;
}
.access-readonly {
  padding: 10px 16px;
  margin-bottom: 16px;
  border-left: 3px solid #526581;
  background: #f4f7fa;
  font-size: 12px;
  color: #345276;
}
.access-panel button:focus-visible,
.access-dialog button:focus-visible,
.access-field input:focus-visible,
.access-field select:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}
@media (max-width: 1100px) {
  .access-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .access-panel {
    padding: 16px;
  }
  .access-member {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .access-assignment,
  .access-menu-matrix {
    grid-template-columns: 1fr;
  }
  .access-dialog {
    padding: 18px;
  }
  .access-heading > .access-actions {
    width: 100%;
  }
  .access-role-grid {
    grid-template-columns: 1fr;
  }
}
